Fix backward compatibility.
[vuplus_transtreamproxy] / src / Demuxer.h
1 /*
2  * Demux.h
3  *
4  *  Created on: 2014. 6. 11.
5  *      Author: oskwon
6  */
7
8 #ifndef DEMUX_H_
9 #define DEMUX_H_
10
11 #include <vector>
12 #include <string>
13
14 #include "trap.h"
15
16 #include "Util.h"
17 #include "Http.h"
18 #include "Source.h"
19 //----------------------------------------------------------------------
20
21 class Demuxer : public Source
22 {
23 public:
24         int     pmt_pid;
25         int     video_pid;
26         int     audio_pid;
27
28 private:
29         int fd;
30         int sock;
31
32         int demux_id;
33         int pat_pid;
34         std::vector<unsigned long> pids;
35
36 protected:
37         std::string webif_reauest(std::string request) throw(http_trap);
38         bool already_exist(std::vector<unsigned long> &pidlist, int pid);
39         void set_filter(std::vector<unsigned long> &new_pids) throw(trap);
40         bool parse_webif_response(std::string& response, std::vector<unsigned long> &new_pids);
41
42 public:
43         Demuxer(HttpHeader *header) throw(http_trap);
44         virtual ~Demuxer() throw();
45         int get_fd() const throw();
46 };
47 //----------------------------------------------------------------------
48
49 #endif /* DEMUX_H_ */