1 // $Id: ULEdec.cc 355 2007-07-26 14:17:02Z tho $
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.
23 // Definition of non-inline non-template functions
25 #include <senf/Scheduler/Scheduler.hh>
26 #include <senf/Packets/MPEGDVBBundle/TransportPacket.hh>
27 #include <senf/Packets/MPEGDVBBundle/SNDUPacket.hh>
28 #include <senf/Socket/Protocols/DVB.hh>
34 ULEdec(unsigned short adapter=0, unsigned short device=0);
37 typedef senf::PacketData::iterator iterator;
44 senf::DVBDemuxPESHandle demuxHandle;
45 senf::DVBDvrHandle dvrHandle;
47 senf::SNDUPacket snduPacket;
49 ReceiverState receiver_state;
50 unsigned char priv_tscc;
51 bool priv_sndu_type_1;
52 iterator snduPacketData_iter;
54 void handleEvent(senf::Scheduler::EventId event);
55 void handleTSPacket(senf::TransportPacket tsPacket);
56 void handleSNDUPacket();
58 iterator readNewSNDUPacket(iterator i, const iterator i_end);
59 iterator readContSNDUPacket(iterator i, const iterator i_end);
60 iterator readRawSNDUPacketData(iterator i, iterator const i_end);
62 inline bool isSDNUPacketComplete();
63 inline iterator::difference_type snduPacketBytesLeft();
68 struct ULEdecException : public senf::Exception
70 ULEdecException(std::string const & what)
71 : senf::Exception(what) {}
79 // c-file-style: "senf"
80 // indent-tabs-mode: nil
81 // ispell-local-dictionary: "american"
82 // compile-command: "scons -u"