4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
6 // The contents of this file are subject to the Fraunhofer FOKUS Public License
7 // Version 1.0 (the "License"); you may not use this file except in compliance
8 // with the License. You may obtain a copy of the License at
9 // http://senf.berlios.de/license.html
11 // The Fraunhofer FOKUS Public License Version 1.0 is based on,
12 // but modifies the Mozilla Public License Version 1.1.
13 // See the full license text for the amendments.
15 // Software distributed under the License is distributed on an "AS IS" basis,
16 // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
17 // for the specific language governing rights and limitations under the License.
19 // The Original Code is Fraunhofer FOKUS code.
21 // The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V.
22 // (registered association), Hansastraße 27 c, 80686 Munich, Germany.
23 // All Rights Reserved.
26 // Philipp Batroff <pug@berlios.de>
29 \brief RTPPacket non-inline non-template implementation */
31 #include "RTPPacket.hh"
34 #include <boost/io/ios_state.hpp>
37 //-/////////////////////////////////////////////////////////////////////////////////////////////////
41 std::string ptName(int pt)
48 static pt_item ptList[27] = {
49 {0,"PCMU"},{1,"1016"},{2,"G721"},{3,"GSM"},
50 {5,"DVI8"},{6,"DVI16"},{7,"LPC"},{8,"PCMA"},
51 {9,"G722"},{10,"L16"},{11,"L16S"},{14,"MPA"},
52 {25,"CELB"},{26,"JPEG"},{31,"H261"},{32,"MPV"},
53 {33,"MP2T"},{34,"263"},{110,"MPEG AAC"},{111,"11L16"},
54 {112,"11L16S"},{113,"22L16"},{114,"22L16S"},{115,"32L16"},
55 {116,"32L16S"},{127,"HTML"},{-1,""}
58 while (ptList[n].pt != -1)
60 if (ptList[n].pt == pt)
61 return ptList[n].name;
69 prefix_ void senf::RTPPacketType::dump(packet p, std::ostream & os)
71 boost::io::ios_all_saver ias(os);
72 os << "Real Time Protocol:\n"
73 << senf::fieldName("version") << p->version() << "\n"
74 << senf::fieldName("padding") << p->padding() << "\n"
75 << senf::fieldName("extension") << p->extension() << "\n"
76 << senf::fieldName("contributing source cnt") << p->csrcCount() << "\n"
77 << senf::fieldName("marker") << p->marker() << "\n"
78 << senf::fieldName("payload type") << p->payloadType() << " "
79 << ptName(p->payloadType() ) <<"\n"
80 << senf::fieldName("sequence number") << p->seqNumber() << "\n"
81 << senf::fieldName("timestamp") << p->timeStamp() << "\n"
82 << senf::fieldName("sync source id") << p->synSourceId() << "\n";
85 //-/////////////////////////////////////////////////////////////////////////////////////////////////