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"
29 #include <senf/Utils/Console/ParsedCommand.hh>
30 #include <senf/Utils/Console/Utility.hh>
33 //-/////////////////////////////////////////////////////////////////////////////////////////////////
35 prefix_ senf::DVBSectionProtocolWrapper::DVBSectionProtocolWrapper(senf::DVBDemuxSectionHandle sh)
36 : protocol(sh.protocol()), dir(this)
38 namespace kw = console::kw;
39 namespace fty = console::factory;
41 dir.add("buffersize", fty::Command(&DVBSectionProtocolWrapper::setBufferSize, this)
42 .doc("Set the size of the circular buffer used for filtered data.")
43 .arg("size", "in byte") );
45 dir.add("start", fty::Command(&DVBSectionProtocolWrapper::startFiltering, this)
46 .doc("Starts filtering") );
48 dir.add("stop", fty::Command(&DVBSectionProtocolWrapper::setBufferSize, this)
49 .doc("Stops filtering") );
52 fty::Command<void (unsigned short int,
54 senf::console::FlagCollection<Flags>,
58 >(&DVBSectionProtocolWrapper::setSectionFilter, this)
59 .arg("pid", "pid to filter")
60 .arg("filter", "filter",
61 kw::default_value = 62,
62 kw::default_doc = "0x3e")
63 .arg("flags", "or-able: CHECK_CRC, ONESHOT, IMMEDIATE_START, KERNEL_CLIENT",
64 kw::default_value = DMX_IMMEDIATE_START | DMX_CHECK_CRC,
65 kw::default_doc = "(IMMEDIATE_START CHECK_CRC)")
67 kw::default_value = 0xff,
68 kw::default_doc = "0xff")
70 kw::default_value = 0,
71 kw::default_doc = "0x00")
72 .arg("timeout", "timeout",
73 kw::default_value = 0,
74 kw::default_doc = "0x00")
75 .doc("Sets parameters for section filter.") );
77 dir.add("stop", fty::Command(&DVBSectionProtocolWrapper::setBufferSize, this)
78 .doc("Stops filtering") );
82 prefix_ senf::DVBPESProtocolWrapper::DVBPESProtocolWrapper(senf::DVBDemuxPESHandle sh)
83 : protocol(sh.protocol()), dir(this)
85 namespace kw = console::kw;
86 namespace fty = console::factory;
89 fty::Command<void (unsigned short int,
93 senf::console::FlagCollection<Flags>)
94 >(&DVBPESProtocolWrapper::setPESFilter, this)
95 .arg("pid", "pid to filter")
96 .arg("input", "input-filter: DMX_IN_FRONTEND DMX_IN_DVR ")
97 .arg("output", "output-filter: DMX_OUT_DECODER DMX_OUT_TAP DMX_OUT_TS_TAP ")
98 .arg("pesType", "PES type: DMX_PES_AUDIO[0-3] DMX_PES_VIDEO[0-3] "
99 "DMX_PES_TELETEXT[0-3], DMX_PES_SUBTITLE[0-3], DMX_PES_PCR[0-3], "
101 .arg("flags", "or-able: CHECK_CRC, ONESHOT, IMMEDIATE_START, KERNEL_CLIENT",
102 kw::default_value = DMX_IMMEDIATE_START | DMX_CHECK_CRC,
103 kw::default_doc = "(IMMEDIATE_START CHECK_CRC)")
104 .doc("Sets parameters for PES filter.") );
106 dir.add("start", fty::Command(&DVBPESProtocolWrapper::startFiltering, this)
107 .doc("Starts filtering") );
109 dir.add("stop", fty::Command(&DVBPESProtocolWrapper::stopFiltering, this)
110 .doc("Stops filtering") );
113 //-/////////////////////////////////////////////////////////////////////////////////////////////////
120 // c-file-style: "senf"
121 // indent-tabs-mode: nil
122 // ispell-local-dictionary: "american"
123 // compile-command: "scons -u test"
124 // comment-column: 40