From: atx23 Date: Wed, 17 Dec 2008 15:13:55 +0000 (+0000) Subject: wrong paremeter in DVBDemuxHandles::setSectionFiltler iocall X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=5eebfcfe6069717a261872ff7bf01adf203738b9;p=senf.git wrong paremeter in DVBDemuxHandles::setSectionFiltler iocall removed debug output from DVBSocketController git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1021 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Socket/Protocols/DVB/DVBDemuxHandles.cc b/Socket/Protocols/DVB/DVBDemuxHandles.cc index 3a66a06..da8a189 100644 --- a/Socket/Protocols/DVB/DVBDemuxHandles.cc +++ b/Socket/Protocols/DVB/DVBDemuxHandles.cc @@ -32,6 +32,8 @@ #include #include #include "../../../Utils/Exception.hh" +// TODO REMOVE V +#include //#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 dd24d7b..c2409d2 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 DVBDemuxSectionHandle; diff --git a/Socket/Protocols/DVB/DVBSocketController.cc b/Socket/Protocols/DVB/DVBSocketController.cc index 1242ff2..a53ea11 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 12e018a..9d21440 100644 --- a/Socket/Protocols/DVB/DVBSocketController.hh +++ b/Socket/Protocols/DVB/DVBSocketController.hh @@ -9,6 +9,9 @@ #include #include "DVBConfigParser.hh" #include + +#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,