4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Anton Gillert <atx@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief DVBSocketController non-inline non-template implementation */
26 #include "DVBProtocolWrapper.hh"
31 ///////////////////////////////cc.p////////////////////////////////////////
33 prefix_ senf::DVBSectionProtocolWrapper::DVBSectionProtocolWrapper(senf::DVBDemuxSectionHandle sh)
34 : protocol(sh.protocol()), dir(this)
36 namespace kw = senf::console::kw;
37 dir.add("buffersize", &DVBSectionProtocolWrapper::setBufferSize)
38 .doc("Set the size of the circular buffer used for filtered data.")
39 .arg("size", "in byte");
41 dir.add("start", &DVBSectionProtocolWrapper::startFiltering)
42 .doc("Starts filtering");
44 dir.add("stop", &DVBSectionProtocolWrapper::setBufferSize)
45 .doc("Stops filtering");
47 dir.node().add("filter", boost::function<void (unsigned short int, unsigned, senf::console::FlagCollection<Flags>, unsigned, unsigned, unsigned)>(senf::membind(&DVBSectionProtocolWrapper::setSectionFilter, this)))
48 .arg("pid", "pid to filter")
49 .arg("filter", "filter", kw::default_value = 62, kw::default_doc = "0x3e")
50 .arg("flags", "or-able: CHECK_CRC, ONESHOT, IMMEDIATE_START, KERNEL_CLIENT", kw::default_value = DMX_IMMEDIATE_START | DMX_CHECK_CRC, kw::default_doc = "(IMMEDIATE_START CHECK_CRC)")
51 .arg("mask", "mask", kw::default_value = 0xff, kw::default_doc = "0xff")
52 .arg("mode", "mode", kw::default_value = 0, kw::default_doc = "0x00")
53 .arg("timeout", "timeout", kw::default_value = 0, kw::default_doc = "0x00")
54 .doc("Sets parameters for section filter.");
56 dir.add("stop", &DVBSectionProtocolWrapper::setBufferSize)
57 .doc("Stops filtering");
61 prefix_ senf::DVBPESProtocolWrapper::DVBPESProtocolWrapper(senf::DVBDemuxPESHandle sh)
62 : protocol(sh.protocol()), dir(this)
64 namespace kw = senf::console::kw;
66 dir.node().add("filter", boost::function<void ( unsigned short int, dmx_input_t, dmx_output_t, dmx_pes_type_t, senf::console::FlagCollection<Flags>)>(senf::membind(&DVBPESProtocolWrapper::setPESFilter, this)))
67 .arg("pid", "pid to filter")
68 .arg("input", "input-filter: DMX_IN_FRONTEND DMX_IN_DVR ")
69 .arg("output", "output-filter: DMX_OUT_DECODER DMX_OUT_TAP DMX_OUT_TS_TAP ")
70 .arg("pesType", "PES type: DMX_PES_AUDIO[0-3] DMX_PES_VIDEO[0-3] DMX_PES_TELETEXT[0-3], DMX_PES_SUBTITLE[0-3], DMX_PES_PCR[0-3], DMX_PES_OTHER")
71 .arg("flags", "or-able: CHECK_CRC, ONESHOT, IMMEDIATE_START, KERNEL_CLIENT", kw::default_value = DMX_IMMEDIATE_START | DMX_CHECK_CRC, kw::default_doc = "(IMMEDIATE_START CHECK_CRC)")
72 .doc("Sets parameters for PES filter.");
74 dir.add("start", &DVBPESProtocolWrapper::startFiltering)
75 .doc("Starts filtering");
77 dir.add("stop", &DVBPESProtocolWrapper::stopFiltering)
78 .doc("Stops filtering");
81 ///////////////////////////////cc.e////////////////////////////////////////