4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Thorsten Horstmann <tho@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 DVBDemuxHandles non-inline non-template implementation */
26 #include "DVBDemuxHandles.hh"
27 //#include "DVBDemuxHandles.ih"
30 #include <boost/format.hpp>
31 #include <sys/socket.h>
32 #include <sys/ioctl.h>
34 #include "../../../Utils/Exception.hh"
36 //#include "DVBDemuxHandles.mpp"
38 ///////////////////////////////cc.p////////////////////////////////////////
40 ///////////////////////////////////////////////////////////////////////////
41 // senf::DVBDemuxHandles
43 prefix_ void senf::DVBDemuxSectionProtocol::init_client(unsigned short adapter, unsigned short device)
46 std::string devDemux = str( boost::format(
47 "/dev/dvb/adapter%d/demux%d") % adapter % device);
48 int f = open(devDemux.c_str(), O_RDONLY | O_NONBLOCK);
54 prefix_ unsigned senf::DVBDemuxSectionProtocol::available()
60 prefix_ void senf::DVBDemuxSectionProtocol::setSectionFilter(struct dmx_sct_filter_params *filter)
63 if (::ioctl(fd(), DMX_SET_FILTER, filter) < 0)
67 // ----------------------------------------------------------------
69 prefix_ void senf::DVBDemuxPESProtocol::init_client(unsigned short adapter, unsigned short device)
72 std::string devDemux = str( boost::format(
73 "/dev/dvb/adapter%d/demux%d") % adapter % device);
74 int f = open(devDemux.c_str(), O_RDONLY | O_NONBLOCK);
80 prefix_ unsigned senf::DVBDemuxPESProtocol::available()
86 prefix_ void senf::DVBDemuxPESProtocol::setPESFilter(struct dmx_pes_filter_params *filter)
89 if (::ioctl(fd(), DMX_SET_PES_FILTER, filter) < 0)
93 // ----------------------------------------------------------------
95 prefix_ void senf::DVBDvrProtocol::init_client(unsigned short adapter, unsigned short device)
98 std::string devDvr = str( boost::format(
99 "/dev/dvb/adapter%d/dvr%d") % adapter % device);
100 int f = open(devDvr.c_str(), O_RDONLY | O_NONBLOCK);
106 prefix_ unsigned senf::DVBDvrProtocol::available()
112 ///////////////////////////////cc.e////////////////////////////////////////
114 //#include "DVBDemuxHandles.mpp"
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