21 #include <boost/format.hpp> 22 #include <sys/socket.h> 23 #include <sys/ioctl.h> 38 std::string devDemux =
str( boost::format(
"/dev/dvb/adapter%d/demux%d") % adapter % device);
39 int f = open(devDemux.c_str(), O_RDONLY | O_NONBLOCK);
55 struct dmx_sct_filter_params sec_filter;
56 ::memset(&sec_filter, 0,
sizeof(
struct dmx_sct_filter_params));
58 sec_filter.filter.filter[0] = filter;
59 sec_filter.filter.mask[0] = mask;
60 sec_filter.filter.mode[0] = mode;
61 sec_filter.flags = flags;
63 if (::ioctl(
fd(), DMX_SET_FILTER, &sec_filter) < 0)
72 std::string devDemux =
str( boost::format(
73 "/dev/dvb/adapter%d/demux%d") % adapter % device);
74 int f = open(devDemux.c_str(), O_RDONLY | O_NONBLOCK);
90 struct dmx_pes_filter_params pes_filter;
91 ::memset(&pes_filter, 0,
sizeof(
struct dmx_pes_filter_params));
93 pes_filter.input = input;
94 pes_filter.output = output;
95 pes_filter.pes_type = pesType;
96 pes_filter.flags = flags;
98 if (::ioctl(
fd(), DMX_SET_PES_FILTER, &pes_filter) < 0)
107 std::string devDvr =
str( boost::format(
108 "/dev/dvb/adapter%d/dvr%d") % adapter % device);
109 int f = open(devDvr.c_str(), O_RDONLY | O_NONBLOCK);
#define SENF_THROW_SYSTEM_EXCEPTION(desc)
unsigned available() const
Return (maximum) number of bytes available for reading without < blocking.
std::string str(T const &t)
int fd() const
Get file descriptor.
void setPESFilter(unsigned short int pid, dmx_input_t input, dmx_output_t output, dmx_pes_type_t pesType, unsigned int flags) const
unsigned available() const
Return (maximum) number of bytes available for reading without < blocking.
void init_client(unsigned short adapter=0, unsigned short device=0) const
xxx
void init_client(unsigned short adapter=0, unsigned short device=0) const
xxx
void init_client(unsigned short adapter=0, unsigned short device=0) const
xxx
DVBDemuxHandles public header.
void setSectionFilter(unsigned short int pid, unsigned char filter=0x3e, unsigned int flags=DMX_IMMEDIATE_START|DMX_CHECK_CRC, unsigned char mask=0xff, unsigned char mode=0x00, unsigned int timeout=0x00) const
unsigned available() const
Return (maximum) number of bytes available for reading without < blocking.