4 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
5 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
6 // Stefan Bund <stefan.bund@fokus.fraunhofer.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 "RTPPacket.hh"
26 //#include "RTPPacket.ih"
31 ///////////////////////////////cc.p////////////////////////////////////////
34 prefix_ void senf::RTPPacket::v_nextInterpreter()
39 Packet::registerInterpreter<RTPUnknownExtensionPacket>(begin()+bytes(),end());
42 int paddingOctets = 0;
44 paddingOctets = paddingOctet();
46 registerInterpreter(payloadType(),begin()+bytes(),end()-paddingOctets);
50 prefix_ void senf::RTPPacket::v_finalize()
53 prefix_ void senf::RTPPacket::v_dump(std::ostream & os)
57 << " version : " << version() << "\n"
58 << " padding : " << padding() << "\n"
59 << " extension : " << extension() << "\n"
60 << " csrc count : " << csrcCount() << "\n"
61 << " marker : " << marker() << "\n"
62 << " payload type : " << payloadType() << "\n"
63 << " sequence nr : " << seqNumber() << "\n"
64 << " timestamp : " << timestamp() << "\n"
65 << " ssrc : " << ssrc() << "\n"
66 << " csrc list : <not shown>\n";
69 prefix_ void senf::RTPExtensionBasePacket::v_nextInterpreter()
73 // We don't want to inherit Parse_RTPExtensionBase to avoid
74 // virtual inheritance problems. Since we need the size of the
75 // extension, we just allocate ourselves a ExtensionBase parser
77 Parse_RTPExtensionBase<iterator> p (begin());
78 if (!p.check(begin(),end()))
79 throw TruncatedPacketException();
81 int paddingOctets = 0;
82 if(get_prev<RTPPacket>()->padding()){
83 paddingOctets = get_prev<RTPPacket>()->paddingOctet();
85 registerInterpreter(get_prev<RTPPacket>()->payloadType(),begin()+p.bytes(),end()-paddingOctets);
88 prefix_ void senf::RTPExtensionBasePacket::v_dump(std::ostream & os)
91 os << "RTP extension packet:\n"
92 << " content not shown\n";
95 prefix_ void senf::RTPUnknownExtensionPacket::v_finalize()
98 ///////////////////////////////cc.e////////////////////////////////////////
105 // c-file-style: "senf"
106 // indent-tabs-mode: nil
107 // ispell-local-dictionary: "american"
108 // compile-command: "scons -u test"
109 // comment-column: 40