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){
42 static pt_item ptList[27] = {
43 {0,"PCMU"},{1,"1016"},{2,"G721"},{3,"GSM"},
44 {5,"DVI8"},{6,"DVI16"},{7,"LPC"},{8,"PCMA"},
45 {9,"G722"},{10,"L16"},{11,"L16S"},{14,"MPA"},
46 {25,"CELB"},{26,"JPEG"},{31,"H261"},{32,"MPV"},
47 {33,"MP2T"},{34,"263"},{110,"MPEG AAC"},{111,"11L16"},
48 {112,"11L16S"},{113,"22L16"},{114,"22L16S"},{115,"32L16"},
49 {116,"32L16S"},{127,"HTML"},{-1,""}
52 while ( ptList[n].pt != -1)
54 if( ptList[n].pt == pt)
55 return ptList[n].name;
63 prefix_ void senf::RTPPacketType::dump(packet p, std::ostream &os)
65 boost::io::ios_all_saver ias(os);
66 os << "Real Time Protocol:\n"
67 << " Version : " << p->version() << "\n"
68 << " Padding : " << p->padding() << "\n"
69 << " Extension : " << p->extension() << "\n"
70 << " Contributing Source Count(CC) : " << p->csrcCount() << "\n"
71 << " Marker : " << p->marker() << "\n"
72 << " Payload Type : " << p->payloadType() << " "<< ptName(p->payloadType() ) <<"\n"
73 << " Sequence number : " << p->seqNumber() << "\n"
74 << " Timestamp : " << p->timeStamp() << "\n"
75 << " Synchronisation Source Identifier : " << p->synSourceId() << "\n";