4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Philipp Batroff <pug@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 RTPPacket non-inline non-template implementation */
26 #include "RTPPacket.hh"
27 //#include "UDPPacket.ih"
30 #include <boost/io/ios_state.hpp>
36 std::string ptName(int pt)
43 static pt_item ptList[27] = {
44 {0,"PCMU"},{1,"1016"},{2,"G721"},{3,"GSM"},
45 {5,"DVI8"},{6,"DVI16"},{7,"LPC"},{8,"PCMA"},
46 {9,"G722"},{10,"L16"},{11,"L16S"},{14,"MPA"},
47 {25,"CELB"},{26,"JPEG"},{31,"H261"},{32,"MPV"},
48 {33,"MP2T"},{34,"263"},{110,"MPEG AAC"},{111,"11L16"},
49 {112,"11L16S"},{113,"22L16"},{114,"22L16S"},{115,"32L16"},
50 {116,"32L16S"},{127,"HTML"},{-1,""}
53 while (ptList[n].pt != -1)
55 if (ptList[n].pt == pt)
56 return ptList[n].name;
64 prefix_ void senf::RTPPacketType::dump(packet p, std::ostream &os)
66 boost::io::ios_all_saver ias(os);
67 os << "Real Time Protocol:\n"
68 << senf::fieldName("version") << p->version() << "\n"
69 << senf::fieldName("padding") << p->padding() << "\n"
70 << senf::fieldName("extension") << p->extension() << "\n"
71 << senf::fieldName("contributing source cnt") << p->csrcCount() << "\n"
72 << senf::fieldName("marker") << p->marker() << "\n"
73 << senf::fieldName("payload type") << p->payloadType() << " "
74 << ptName(p->payloadType() ) <<"\n"
75 << senf::fieldName("sequence number") << p->seqNumber() << "\n"
76 << senf::fieldName("timestamp") << p->timeStamp() << "\n"
77 << senf::fieldName("sync source id") << p->synSourceId() << "\n";