diff --git a/Socket/Protocols/DVB/DVBDemuxHandles.cc b/Socket/Protocols/DVB/DVBDemuxHandles.cc index 3a66a06246f2306c037323f2f08b2e0d57ca5ac9..da8a1890fd9c87a9788e87a51b8003ef3df4265f 100644 --- a/Socket/Protocols/DVB/DVBDemuxHandles.cc +++ b/Socket/Protocols/DVB/DVBDemuxHandles.cc @@ -32,6 +32,8 @@ #include <sys/ioctl.h> #include <fcntl.h> #include "../../../Utils/Exception.hh" +// TODO REMOVE V +#include <iostream> //#include "DVBDemuxHandles.mpp" #define prefix_ @@ -58,20 +60,19 @@ prefix_ unsigned senf::DVBDemuxSectionSocketProtocol::available() return 4096; } -prefix_ void senf::DVBDemuxSectionSocketProtocol::setSectionFilter(unsigned short int pid, unsigned int timeout, unsigned int flags, unsigned char filter, unsigned char mask, unsigned char mode) +prefix_ void senf::DVBDemuxSectionSocketProtocol::setSectionFilter(unsigned short int pid, unsigned char filter, unsigned int flags, unsigned char mask, unsigned char mode, unsigned int timeout) const { struct dmx_sct_filter_params sec_filter; ::memset(&sec_filter, 0, sizeof(struct dmx_sct_filter_params)); - - sec_filter.pid = pid; - sec_filter.filter.filter[0] = filter; - sec_filter.filter.mask[0] = mask; - sec_filter.filter.mode[0] = mode; - sec_filter.flags = flags; + sec_filter.pid = pid; + sec_filter.filter.filter[0] = filter; + sec_filter.filter.mask[0] = mask; + sec_filter.filter.mode[0] = mode; + sec_filter.flags = flags; - if (::ioctl(fd(), DMX_SET_FILTER, filter) < 0) - SENF_THROW_SYSTEM_EXCEPTION("Could not set section filter of DVB adapter."); + if (::ioctl(fd(), DMX_SET_FILTER, &sec_filter) < 0) + SENF_THROW_SYSTEM_EXCEPTION("Could not set section filter of DVB adapter."); } // ---------------------------------------------------------------- diff --git a/Socket/Protocols/DVB/DVBDemuxHandles.hh b/Socket/Protocols/DVB/DVBDemuxHandles.hh index dd24d7b364e942f9046cc336763cabeb24619be2..c2409d2935ba3daab15c67e28572744509f34c6f 100644 --- a/Socket/Protocols/DVB/DVBDemuxHandles.hh +++ b/Socket/Protocols/DVB/DVBDemuxHandles.hh @@ -76,11 +76,11 @@ namespace senf { ///@} void setSectionFilter(unsigned short int pid, - unsigned int timeout, + unsigned char filter, unsigned int flags, - unsigned char filter, unsigned char mask, - unsigned char mode) const; + unsigned char mode, + unsigned int timeout ) const; }; typedef ProtocolClientSocketHandle<DVBDemuxSectionSocketProtocol> DVBDemuxSectionHandle; diff --git a/Socket/Protocols/DVB/DVBSocketController.cc b/Socket/Protocols/DVB/DVBSocketController.cc index 1242ff2370253638ceeb98f551d6d084efc800d9..a53ea1163bf786638c7688e21c5fd2deb182b3d3 100644 --- a/Socket/Protocols/DVB/DVBSocketController.cc +++ b/Socket/Protocols/DVB/DVBSocketController.cc @@ -83,7 +83,6 @@ prefix_ void senf::DVBSocketController::tuneTo(const string & channel) string configLine = parser.getConfigLine(channel); - SENF_LOG((senf::log::MESSAGE) ("async: configline found: " << channel) ); frontend = parser.getFrontendParam(configLine); switch (type) { case FE_QPSK: @@ -156,7 +155,6 @@ prefix_ dvb_frontend_event senf::DVBSocketController::tuneTo_sync(const string & dvb_frontend_event ev; string configLine = parser.getConfigLine(channel); - SENF_LOG((senf::log::MESSAGE) ("sync: configline found: " << channel) ); frontend = parser.getFrontendParam(configLine); switch (type) { case FE_QPSK: diff --git a/Socket/Protocols/DVB/DVBSocketController.hh b/Socket/Protocols/DVB/DVBSocketController.hh index 12e018a9e6631b5d277fea313e17eaf5ccbc9549..9d214408192f9b31abe1274ad75fcccfed5722fb 100644 --- a/Socket/Protocols/DVB/DVBSocketController.hh +++ b/Socket/Protocols/DVB/DVBSocketController.hh @@ -9,6 +9,9 @@ #include <senf/Scheduler/Scheduler.hh> #include "DVBConfigParser.hh" #include <senf/Console.hh> + +#define MPE_TABLEID 62 + namespace senf { std::string status2String(fe_status_t status); class DVBSocketController : boost::noncopyable @@ -69,7 +72,7 @@ public: unsigned int signalStrength(); void setSectionFilter(unsigned short int pid, - unsigned char filter = 62, + unsigned char filter = MPE_TABLEID, unsigned int flags = DMX_IMMEDIATE_START | DMX_CHECK_CRC, unsigned char mask = 0xff, unsigned char mode = 0,