From 0b9fdfa04526fdecc4fbf441bf4cff6c587c4a96 Mon Sep 17 00:00:00 2001 From: atx23 <atx23@wiback.org> Date: Wed, 17 Dec 2008 15:13:55 +0000 Subject: [PATCH] wrong paremeter in DVBDemuxHandles::setSectionFiltler iocall removed debug output from DVBSocketController --- Socket/Protocols/DVB/DVBDemuxHandles.cc | 19 ++++++++++--------- Socket/Protocols/DVB/DVBDemuxHandles.hh | 6 +++--- Socket/Protocols/DVB/DVBSocketController.cc | 2 -- Socket/Protocols/DVB/DVBSocketController.hh | 5 ++++- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Socket/Protocols/DVB/DVBDemuxHandles.cc b/Socket/Protocols/DVB/DVBDemuxHandles.cc index 3a66a0624..da8a1890f 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 dd24d7b36..c2409d293 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 1242ff237..a53ea1163 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 12e018a9e..9d2144081 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, -- GitLab