4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
6 // The contents of this file are subject to the Fraunhofer FOKUS Public License
7 // Version 1.0 (the "License"); you may not use this file except in compliance
8 // with the License. You may obtain a copy of the License at
9 // http://senf.berlios.de/license.html
11 // The Fraunhofer FOKUS Public License Version 1.0 is based on,
12 // but modifies the Mozilla Public License Version 1.1.
13 // See the full license text for the amendments.
15 // Software distributed under the License is distributed on an "AS IS" basis,
16 // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
17 // for the specific language governing rights and limitations under the License.
19 // The Original Code is Fraunhofer FOKUS code.
21 // The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V.
22 // (registered association), Hansastraße 27 c, 80686 Munich, Germany.
23 // All Rights Reserved.
26 // Anton Gillert <atx@berlios.de>
28 \brief DVBSocketController non-inline non-template implementation */
30 #include "DVBProtocolWrapper.hh"
33 #include <senf/Utils/Console/ParsedCommand.hh>
34 #include <senf/Utils/Console/Utility.hh>
37 //-/////////////////////////////////////////////////////////////////////////////////////////////////
39 prefix_ senf::DVBSectionProtocolWrapper::DVBSectionProtocolWrapper(senf::DVBDemuxSectionHandle sh)
40 : protocol(sh.protocol()), dir(this)
42 namespace kw = console::kw;
43 namespace fty = console::factory;
45 dir.add("buffersize", fty::Command(&DVBSectionProtocolWrapper::setBufferSize, this)
46 .doc("Set the size of the circular buffer used for filtered data.")
47 .arg("size", "in byte") );
49 dir.add("start", fty::Command(&DVBSectionProtocolWrapper::startFiltering, this)
50 .doc("Starts filtering") );
52 dir.add("stop", fty::Command(&DVBSectionProtocolWrapper::setBufferSize, this)
53 .doc("Stops filtering") );
56 fty::Command<void (unsigned short int,
58 senf::console::FlagCollection<Flags>,
62 >(&DVBSectionProtocolWrapper::setSectionFilter, this)
63 .arg("pid", "pid to filter")
64 .arg("filter", "filter",
65 kw::default_value = 62,
66 kw::default_doc = "0x3e")
67 .arg("flags", "or-able: CHECK_CRC, ONESHOT, IMMEDIATE_START, KERNEL_CLIENT",
68 kw::default_value = DMX_IMMEDIATE_START | DMX_CHECK_CRC,
69 kw::default_doc = "(IMMEDIATE_START CHECK_CRC)")
71 kw::default_value = 0xff,
72 kw::default_doc = "0xff")
74 kw::default_value = 0,
75 kw::default_doc = "0x00")
76 .arg("timeout", "timeout",
77 kw::default_value = 0,
78 kw::default_doc = "0x00")
79 .doc("Sets parameters for section filter.") );
81 dir.add("stop", fty::Command(&DVBSectionProtocolWrapper::setBufferSize, this)
82 .doc("Stops filtering") );
86 prefix_ senf::DVBPESProtocolWrapper::DVBPESProtocolWrapper(senf::DVBDemuxPESHandle sh)
87 : protocol(sh.protocol()), dir(this)
89 namespace kw = console::kw;
90 namespace fty = console::factory;
93 fty::Command<void (unsigned short int,
97 senf::console::FlagCollection<Flags>)
98 >(&DVBPESProtocolWrapper::setPESFilter, this)
99 .arg("pid", "pid to filter")
100 .arg("input", "input-filter: DMX_IN_FRONTEND DMX_IN_DVR ")
101 .arg("output", "output-filter: DMX_OUT_DECODER DMX_OUT_TAP DMX_OUT_TS_TAP ")
102 .arg("pesType", "PES type: DMX_PES_AUDIO[0-3] DMX_PES_VIDEO[0-3] "
103 "DMX_PES_TELETEXT[0-3], DMX_PES_SUBTITLE[0-3], DMX_PES_PCR[0-3], "
105 .arg("flags", "or-able: CHECK_CRC, ONESHOT, IMMEDIATE_START, KERNEL_CLIENT",
106 kw::default_value = DMX_IMMEDIATE_START | DMX_CHECK_CRC,
107 kw::default_doc = "(IMMEDIATE_START CHECK_CRC)")
108 .doc("Sets parameters for PES filter.") );
110 dir.add("start", fty::Command(&DVBPESProtocolWrapper::startFiltering, this)
111 .doc("Starts filtering") );
113 dir.add("stop", fty::Command(&DVBPESProtocolWrapper::stopFiltering, this)
114 .doc("Stops filtering") );
117 //-/////////////////////////////////////////////////////////////////////////////////////////////////
124 // c-file-style: "senf"
125 // indent-tabs-mode: nil
126 // ispell-local-dictionary: "american"
127 // compile-command: "scons -u test"
128 // comment-column: 40