<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>ccRTP: rtcppkt.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a> | <a class="qindex" href="examples.html">Examples</a></div> <div class="nav"> <a class="el" href="dir_000000.html">src</a> » <a class="el" href="dir_000001.html">ccrtp</a></div> <h1>rtcppkt.h</h1><a href="rtcppkt_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2001, 2002, 2004 Federico Montesino Pouzols <fedemp@altern.org>.</span> <a name="l00002"></a>00002 <span class="comment">// </span> <a name="l00003"></a>00003 <span class="comment">// This program is free software; you can redistribute it and/or modify</span> <a name="l00004"></a>00004 <span class="comment">// it under the terms of the GNU General Public License as published by</span> <a name="l00005"></a>00005 <span class="comment">// the Free Software Foundation; either version 2 of the License, or</span> <a name="l00006"></a>00006 <span class="comment">// (at your option) any later version.</span> <a name="l00007"></a>00007 <span class="comment">// </span> <a name="l00008"></a>00008 <span class="comment">// This program is distributed in the hope that it will be useful,</span> <a name="l00009"></a>00009 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00010"></a>00010 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span> <a name="l00011"></a>00011 <span class="comment">// GNU General Public License for more details.</span> <a name="l00012"></a>00012 <span class="comment">// </span> <a name="l00013"></a>00013 <span class="comment">// You should have received a copy of the GNU General Public License</span> <a name="l00014"></a>00014 <span class="comment">// along with this program; if not, write to the Free Software </span> <a name="l00015"></a>00015 <span class="comment">// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</span> <a name="l00016"></a>00016 <span class="comment">// </span> <a name="l00017"></a>00017 <span class="comment">// As a special exception, you may use this file as part of a free software</span> <a name="l00018"></a>00018 <span class="comment">// library without restriction. Specifically, if other files instantiate</span> <a name="l00019"></a>00019 <span class="comment">// templates or use macros or inline functions from this file, or you compile</span> <a name="l00020"></a>00020 <span class="comment">// this file and link it with other files to produce an executable, this</span> <a name="l00021"></a>00021 <span class="comment">// file does not by itself cause the resulting executable to be covered by</span> <a name="l00022"></a>00022 <span class="comment">// the GNU General Public License. This exception does not however </span> <a name="l00023"></a>00023 <span class="comment">// invalidate any other reasons why the executable file might be covered by</span> <a name="l00024"></a>00024 <span class="comment">// the GNU General Public License. </span> <a name="l00025"></a>00025 <span class="comment">//</span> <a name="l00026"></a>00026 <span class="comment">// This exception applies only to the code released under the name GNU</span> <a name="l00027"></a>00027 <span class="comment">// ccRTP. If you copy code from other releases into a copy of GNU</span> <a name="l00028"></a>00028 <span class="comment">// ccRTP, as the General Public License permits, the exception does</span> <a name="l00029"></a>00029 <span class="comment">// not apply to the code that you add in this way. To avoid misleading</span> <a name="l00030"></a>00030 <span class="comment">// anyone as to the status of such modified files, you must delete</span> <a name="l00031"></a>00031 <span class="comment">// this exception notice from them.</span> <a name="l00032"></a>00032 <span class="comment">//</span> <a name="l00033"></a>00033 <span class="comment">// If you write modifications of your own for GNU ccRTP, it is your choice</span> <a name="l00034"></a>00034 <span class="comment">// whether to permit this exception to apply to your modifications.</span> <a name="l00035"></a>00035 <span class="comment">// If you do not wish that, delete this exception notice.</span> <a name="l00036"></a>00036 <span class="comment">//</span> <a name="l00037"></a>00037 <a name="l00038"></a>00038 <span class="preprocessor">#ifndef CCXX_RTP_RTCPPKT_H_</span> <a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define CCXX_RTP_RTCPPKT_H_</span> <a name="l00040"></a>00040 <span class="preprocessor"></span> <a name="l00041"></a>00041 <span class="preprocessor">#include <<a class="code" href="base_8h.html">ccrtp/base.h</a>></span> <a name="l00042"></a>00042 <a name="l00043"></a>00043 <span class="preprocessor">#ifdef CCXX_NAMESPACES</span> <a name="l00044"></a>00044 <span class="preprocessor"></span><span class="keyword">namespace </span>ost { <a name="l00045"></a>00045 <span class="preprocessor">#endif</span> <a name="l00046"></a>00046 <span class="preprocessor"></span> <a name="l00067"></a><a class="code" href="group__rtcppacket.html#ga2">00067</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a name="l00068"></a>00068 { <a name="l00069"></a>00069 <a class="code" href="group__rtcppacket.html#gga2a0">SDESItemTypeEND</a> = 0, <a name="l00070"></a>00070 <a class="code" href="group__rtcppacket.html#gga2a1">SDESItemTypeCNAME</a>, <a name="l00071"></a>00071 <a class="code" href="group__rtcppacket.html#gga2a2">SDESItemTypeNAME</a>, <a name="l00072"></a>00072 <a class="code" href="group__rtcppacket.html#gga2a3">SDESItemTypeEMAIL</a>, <a name="l00073"></a>00073 <a class="code" href="group__rtcppacket.html#gga2a4">SDESItemTypePHONE</a>, <a name="l00074"></a>00074 <a class="code" href="group__rtcppacket.html#gga2a5">SDESItemTypeLOC</a>, <a name="l00075"></a>00075 <a class="code" href="group__rtcppacket.html#gga2a6">SDESItemTypeTOOL</a>, <a name="l00076"></a>00076 <a class="code" href="group__rtcppacket.html#gga2a7">SDESItemTypeNOTE</a>, <a name="l00077"></a>00077 <a class="code" href="group__rtcppacket.html#gga2a8">SDESItemTypePRIV</a>, <a name="l00078"></a>00078 <a class="code" href="group__rtcppacket.html#gga2a9">SDESItemTypeH323CADDR</a>, <a name="l00079"></a><a class="code" href="group__rtcppacket.html#gga2a10">00079</a> <a class="code" href="group__rtcppacket.html#gga2a10">SDESItemTypeLast</a> = SDESItemTypeH323CADDR <a name="l00080"></a>00080 } <a class="code" href="group__rtcppacket.html#ga2">SDESItemType</a>; <a name="l00081"></a>00081 <a name="l00092"></a><a class="code" href="class_r_t_c_p_compound_handler.html">00092</a> <span class="keyword">class </span>__EXPORT RTCPCompoundHandler <a name="l00093"></a>00093 { <a name="l00094"></a>00094 <span class="keyword">public</span>: <a name="l00095"></a><a class="code" href="class_r_t_c_p_compound_handler.html#a0">00095</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> setPathMTU(uint16 mtu) <a name="l00096"></a>00096 { pathMTU = mtu; } <a name="l00097"></a>00097 <a name="l00098"></a><a class="code" href="class_r_t_c_p_compound_handler.html#a1">00098</a> <span class="keyword">inline</span> uint16 getPathMTU() <a name="l00099"></a>00099 { <span class="keywordflow">return</span> pathMTU; } <a name="l00100"></a>00100 <a name="l00101"></a>00101 <span class="preprocessor">#ifdef CCXX_PACKED</span> <a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#pragma pack(1) </span> <a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00104"></a>00104 <span class="preprocessor"></span> <a name="l00111"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html">00111</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html">ReceiverInfo</a> <a name="l00112"></a>00112 { <a name="l00113"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html#o0">00113</a> uint8 fractionLost; <a name="l00114"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html#o1">00114</a> uint8 lostMSB; <a name="l00115"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html#o2">00115</a> uint16 lostLSW; <a name="l00116"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html#o3">00116</a> uint32 highestSeqNum; <a name="l00117"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html#o4">00117</a> uint32 jitter; <a name="l00118"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html#o5">00118</a> uint32 lsr; <a name="l00119"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html#o6">00119</a> uint32 dlsr; <a name="l00120"></a>00120 }; <a name="l00121"></a>00121 <a name="l00128"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_r_block.html">00128</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_r_block.html">RRBlock</a> <a name="l00129"></a>00129 { <a name="l00130"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_r_block.html#o0">00130</a> uint32 ssrc; <a name="l00131"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_r_block.html#o1">00131</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html">ReceiverInfo</a> rinfo; <a name="l00132"></a>00132 }; <a name="l00133"></a>00133 <a name="l00140"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_recv_report.html">00140</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_recv_report.html">RecvReport</a> <a name="l00141"></a>00141 { <a name="l00142"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_recv_report.html#o0">00142</a> uint32 ssrc; <a name="l00143"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_recv_report.html#o1">00143</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_r_block.html">RRBlock</a> blocks[1]; <a name="l00144"></a>00144 }; <a name="l00145"></a>00145 <a name="l00152"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_sender_info.html">00152</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_sender_info.html">SenderInfo</a> <a name="l00153"></a>00153 { <a name="l00154"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_sender_info.html#o0">00154</a> uint32 NTPMSW; <a name="l00155"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_sender_info.html#o1">00155</a> uint32 NTPLSW; <a name="l00156"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_sender_info.html#o2">00156</a> uint32 RTPTimestamp; <a name="l00157"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_sender_info.html#o3">00157</a> uint32 packetCount; <a name="l00158"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_sender_info.html#o4">00158</a> uint32 octetCount; <a name="l00159"></a>00159 }; <a name="l00160"></a>00160 <a name="l00166"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_send_report.html">00166</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_send_report.html">SendReport</a> <a name="l00167"></a>00167 { <a name="l00168"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_send_report.html#o0">00168</a> uint32 ssrc; <a name="l00169"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_send_report.html#o1">00169</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_sender_info.html">SenderInfo</a> sinfo; <a name="l00170"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_send_report.html#o2">00170</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_r_block.html">RRBlock</a> blocks[1]; <a name="l00171"></a>00171 }; <a name="l00172"></a>00172 <a name="l00178"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_item.html">00178</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_item.html">SDESItem</a> <a name="l00179"></a>00179 { <a name="l00180"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_item.html#o0">00180</a> uint8 type; <a name="l00181"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_item.html#o1">00181</a> uint8 len; <a name="l00182"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_item.html#o2">00182</a> <span class="keywordtype">char</span> data[1]; <a name="l00183"></a>00183 }; <a name="l00184"></a>00184 <a name="l00190"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_chunk.html">00190</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_chunk.html">SDESChunk</a> <a name="l00191"></a>00191 { <a name="l00192"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_chunk.html#a0">00192</a> uint32 getSSRC()<span class="keyword"> const</span> <a name="l00193"></a>00193 <span class="keyword"> </span>{ <span class="keywordflow">return</span> (ntohl(ssrc)); } <a name="l00194"></a>00194 <a name="l00195"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_chunk.html#o0">00195</a> uint32 ssrc; <a name="l00196"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_chunk.html#o1">00196</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_item.html">SDESItem</a> item; <a name="l00197"></a>00197 }; <a name="l00198"></a>00198 <a name="l00204"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_b_y_e_packet.html">00204</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_b_y_e_packet.html">BYEPacket</a> <a name="l00205"></a>00205 { <a name="l00206"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_b_y_e_packet.html#o0">00206</a> uint32 ssrc; <a name="l00207"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_b_y_e_packet.html#o1">00207</a> uint8 length; <a name="l00208"></a>00208 }; <a name="l00209"></a>00209 <a name="l00215"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_a_p_p_packet.html">00215</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_a_p_p_packet.html">APPPacket</a> <a name="l00216"></a>00216 { <a name="l00217"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_a_p_p_packet.html#o0">00217</a> uint32 ssrc; <a name="l00218"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_a_p_p_packet.html#o1">00218</a> <span class="keywordtype">char</span> name [4]; <a name="l00219"></a>00219 <a name="l00220"></a>00220 <a name="l00221"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_a_p_p_packet.html#o2">00221</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> data[1]; <a name="l00222"></a>00222 }; <a name="l00223"></a>00223 <a name="l00230"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_f_i_r_packet.html">00230</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_f_i_r_packet.html">FIRPacket</a> <a name="l00231"></a>00231 { <a name="l00232"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_f_i_r_packet.html#o0">00232</a> uint32 ssrc; <a name="l00233"></a>00233 }; <a name="l00234"></a>00234 <a name="l00241"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_n_a_c_k_packet.html">00241</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_n_a_c_k_packet.html">NACKPacket</a> <a name="l00242"></a>00242 { <a name="l00243"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_n_a_c_k_packet.html#o0">00243</a> uint32 ssrc; <a name="l00244"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_n_a_c_k_packet.html#o1">00244</a> uint16 fsn; <a name="l00245"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_n_a_c_k_packet.html#o2">00245</a> uint16 blp; <a name="l00246"></a>00246 }; <a name="l00247"></a>00247 <a name="l00253"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_fixed_header.html">00253</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_fixed_header.html">RTCPFixedHeader</a> <a name="l00254"></a>00254 { <a name="l00255"></a>00255 <span class="preprocessor">#if __BYTE_ORDER == __BIG_ENDIAN</span> <a name="l00256"></a>00256 <span class="preprocessor"></span> <a name="l00257"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_fixed_header.html#o0">00257</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> version:2; <a name="l00258"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_fixed_header.html#o1">00258</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> padding:1; <a name="l00259"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_fixed_header.html#o2">00259</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> block_count:5; <a name="l00260"></a>00260 <span class="preprocessor">#else</span> <a name="l00261"></a>00261 <span class="preprocessor"></span> <a name="l00262"></a>00262 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> block_count:5; <a name="l00263"></a>00263 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> padding:1; <a name="l00264"></a>00264 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> version:2; <a name="l00265"></a>00265 <span class="preprocessor">#endif</span> <a name="l00266"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_fixed_header.html#o3">00266</a> <span class="preprocessor"></span> uint8 type; <a name="l00267"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_fixed_header.html#o4">00267</a> uint16 length; <a name="l00268"></a>00268 }; <a name="l00269"></a>00269 <a name="l00280"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html">00280</a> <span class="keyword">struct </span><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html">RTCPPacket</a> <a name="l00281"></a>00281 { <a name="l00287"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#w8">00287</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> { <a name="l00288"></a>00288 tSR = 200, <a name="l00289"></a>00289 tRR, <a name="l00290"></a>00290 tSDES, <a name="l00291"></a>00291 tBYE, <a name="l00292"></a>00292 tAPP, <a name="l00293"></a>00293 tFIR = 192, <a name="l00294"></a>00294 tNACK = 193, <a name="l00295"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#w8w7">00295</a> tXR <a name="l00296"></a>00296 } Type; <a name="l00297"></a>00297 <a name="l00302"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#a0">00302</a> uint32 getLength()<span class="keyword"> const</span> <a name="l00303"></a>00303 <span class="keyword"> </span>{ <span class="keywordflow">return</span> ((ntohs(fh.length) + 1) << 2); } <a name="l00304"></a>00304 <a name="l00309"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#a1">00309</a> uint32 getSSRC()<span class="keyword"> const </span> <a name="l00310"></a>00310 <span class="keyword"> </span>{ <span class="keywordflow">return</span> (ntohl(info.RR.ssrc)); } <span class="comment">// SSRC is always the first</span> <a name="l00311"></a>00311 <span class="comment">// word after fh.</span> <a name="l00312"></a>00312 <a name="l00313"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#o0">00313</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_fixed_header.html">RTCPFixedHeader</a> fh; <a name="l00314"></a>00314 <a name="l00315"></a>00315 <span class="comment">// An RTCP packet may be of any of the types defined</span> <a name="l00316"></a>00316 <span class="comment">// above, including APP specific ones.</span> <a name="l00317"></a>00317 <span class="keyword">union</span> <a name="l00318"></a>00318 <span class="keyword"> </span>{ <a name="l00319"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#o1">00319</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_send_report.html">SendReport</a> SR; <a name="l00320"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#o2">00320</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_recv_report.html">RecvReport</a> RR; <a name="l00321"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#o3">00321</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_s_d_e_s_chunk.html">SDESChunk</a> SDES; <a name="l00322"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#o4">00322</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_b_y_e_packet.html">BYEPacket</a> BYE; <a name="l00323"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#o5">00323</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_a_p_p_packet.html">APPPacket</a> APP; <a name="l00324"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#o6">00324</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_n_a_c_k_packet.html">NACKPacket</a> NACK; <a name="l00325"></a><a class="code" href="struct_r_t_c_p_compound_handler_1_1_r_t_c_p_packet.html#o7">00325</a> <a class="code" href="struct_r_t_c_p_compound_handler_1_1_f_i_r_packet.html">FIRPacket</a> FIR; <a name="l00326"></a>00326 } info; <a name="l00327"></a>00327 }; <a name="l00328"></a>00328 <span class="preprocessor">#ifdef CCXX_PACKED</span> <a name="l00329"></a>00329 <span class="preprocessor"></span><span class="preprocessor">#pragma pack()</span> <a name="l00330"></a>00330 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00331"></a>00331 <span class="preprocessor"></span> <a name="l00332"></a>00332 <span class="keyword">protected</span>: <a name="l00333"></a>00333 <span class="keyword">enum</span> { defaultPathMTU = 1500 }; <a name="l00334"></a>00334 <a name="l00335"></a>00335 RTCPCompoundHandler(uint16 mtu = defaultPathMTU); <a name="l00336"></a>00336 <a name="l00337"></a>00337 ~RTCPCompoundHandler(); <a name="l00338"></a>00338 <a name="l00350"></a>00350 <span class="keywordtype">bool</span> <a name="l00351"></a>00351 checkCompoundRTCPHeader(size_t len); <a name="l00352"></a>00352 <a name="l00353"></a>00353 <span class="comment">// buffer to hold RTCP compound packets being sent. Allocated</span> <a name="l00354"></a>00354 <span class="comment">// in construction time</span> <a name="l00355"></a><a class="code" href="class_r_t_c_p_compound_handler.html#p0">00355</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* rtcpSendBuffer; <a name="l00356"></a>00356 <span class="comment">// buffer to hold RTCP compound packets being</span> <a name="l00357"></a>00357 <span class="comment">// received. Allocated at construction time</span> <a name="l00358"></a><a class="code" href="class_r_t_c_p_compound_handler.html#p1">00358</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* rtcpRecvBuffer; <a name="l00359"></a>00359 <a name="l00360"></a><a class="code" href="class_r_t_c_p_compound_handler.html#n0">00360</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_r_t_c_p_sender_info.html">RTCPSenderInfo</a>; <a name="l00361"></a><a class="code" href="class_r_t_c_p_compound_handler.html#n1">00361</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_r_t_c_p_receiver_info.html">RTCPReceiverInfo</a>; <a name="l00362"></a>00362 <span class="keyword">private</span>: <a name="l00363"></a>00363 <span class="comment">// path MTU. RTCP packets should not be greater than this</span> <a name="l00364"></a>00364 uint16 pathMTU; <a name="l00365"></a>00365 <span class="comment">// masks for RTCP header validation;</span> <a name="l00366"></a>00366 <span class="keyword">static</span> <span class="keyword">const</span> uint16 RTCP_VALID_MASK; <a name="l00367"></a>00367 <span class="keyword">static</span> <span class="keyword">const</span> uint16 RTCP_VALID_VALUE; <a name="l00368"></a>00368 }; <a name="l00369"></a>00369 <a name="l00376"></a><a class="code" href="class_r_t_c_p_receiver_info.html">00376</a> <span class="keyword">class </span>__EXPORT RTCPReceiverInfo <a name="l00377"></a>00377 { <a name="l00378"></a>00378 <span class="keyword">public</span>: <a name="l00379"></a><a class="code" href="class_r_t_c_p_receiver_info.html#a0">00379</a> RTCPReceiverInfo(<span class="keywordtype">void</span>* ri) <a name="l00380"></a>00380 { memcpy(&receiverInfo,&ri, <a name="l00381"></a>00381 <span class="keyword">sizeof</span>(<a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html">RTCPCompoundHandler::ReceiverInfo</a>));} <a name="l00382"></a>00382 <a name="l00383"></a><a class="code" href="class_r_t_c_p_receiver_info.html#a1">00383</a> ~RTCPReceiverInfo() <a name="l00384"></a>00384 { } <a name="l00385"></a>00385 <a name="l00390"></a>00390 <span class="keyword">inline</span> uint8 <a name="l00391"></a><a class="code" href="class_r_t_c_p_receiver_info.html#a2">00391</a> getFractionLost()<span class="keyword"> const</span> <a name="l00392"></a>00392 <span class="keyword"> </span>{ <span class="keywordflow">return</span> receiverInfo.fractionLost; } <a name="l00393"></a>00393 <a name="l00394"></a>00394 <span class="keyword">inline</span> uint32 <a name="l00395"></a><a class="code" href="class_r_t_c_p_receiver_info.html#a3">00395</a> getCumulativePacketLost()<span class="keyword"> const</span> <a name="l00396"></a>00396 <span class="keyword"> </span>{ <span class="keywordflow">return</span> ( ((uint32)ntohs(receiverInfo.lostLSW)) + <a name="l00397"></a>00397 (((uint32)receiverInfo.lostMSB) << 16) ); } <a name="l00398"></a>00398 <a name="l00399"></a>00399 <span class="keyword">inline</span> uint32 <a name="l00400"></a><a class="code" href="class_r_t_c_p_receiver_info.html#a4">00400</a> getExtendedSeqNum()<span class="keyword"> const</span> <a name="l00401"></a>00401 <span class="keyword"> </span>{ <span class="keywordflow">return</span> ntohl(receiverInfo.highestSeqNum); } <a name="l00402"></a>00402 <a name="l00409"></a>00409 uint32 <a name="l00410"></a><a class="code" href="class_r_t_c_p_receiver_info.html#a5">00410</a> getJitter()<span class="keyword"> const</span> <a name="l00411"></a>00411 <span class="keyword"> </span>{ <span class="keywordflow">return</span> ntohl(receiverInfo.jitter); } <a name="l00412"></a>00412 <a name="l00418"></a>00418 uint16 <a name="l00419"></a><a class="code" href="class_r_t_c_p_receiver_info.html#a6">00419</a> getLastSRNTPTimestampInt()<span class="keyword"> const</span> <a name="l00420"></a>00420 <span class="keyword"> </span>{ <span class="keywordflow">return</span> (uint16)((ntohl(receiverInfo.lsr) & 0xFFFF0000) >> 16); } <a name="l00421"></a>00421 <a name="l00427"></a>00427 uint16 <a name="l00428"></a><a class="code" href="class_r_t_c_p_receiver_info.html#a7">00428</a> getLastSRNTPTimestampFrac()<span class="keyword"> const</span> <a name="l00429"></a>00429 <span class="keyword"> </span>{ <span class="keywordflow">return</span> (uint16)(ntohl(receiverInfo.lsr) & 0xFFFF); } <a name="l00430"></a>00430 <a name="l00437"></a>00437 uint32 <a name="l00438"></a><a class="code" href="class_r_t_c_p_receiver_info.html#a8">00438</a> getDelayLastSR()<span class="keyword"> const</span> <a name="l00439"></a>00439 <span class="keyword"> </span>{ <span class="keywordflow">return</span> ntohl(receiverInfo.dlsr); } <a name="l00440"></a>00440 <a name="l00441"></a>00441 <span class="keyword">private</span>: <a name="l00442"></a>00442 <a class="code" href="struct_r_t_c_p_compound_handler_1_1_receiver_info.html">RTCPCompoundHandler::ReceiverInfo</a> receiverInfo; <a name="l00443"></a>00443 }; <a name="l00444"></a>00444 <a name="l00451"></a><a class="code" href="class_r_t_c_p_sender_info.html">00451</a> <span class="keyword">class </span>__EXPORT RTCPSenderInfo <a name="l00452"></a>00452 { <a name="l00453"></a>00453 <span class="keyword">public</span>: <a name="l00454"></a><a class="code" href="class_r_t_c_p_sender_info.html#a0">00454</a> RTCPSenderInfo(<span class="keywordtype">void</span>* si) <a name="l00455"></a>00455 { memcpy(&senderInfo,&si, <a name="l00456"></a>00456 <span class="keyword">sizeof</span>(<a class="code" href="struct_r_t_c_p_compound_handler_1_1_sender_info.html">RTCPCompoundHandler::SenderInfo</a>));} <a name="l00457"></a>00457 <a name="l00458"></a><a class="code" href="class_r_t_c_p_sender_info.html#a1">00458</a> ~RTCPSenderInfo() <a name="l00459"></a>00459 { } <a name="l00460"></a>00460 <a name="l00465"></a>00465 uint32 <a name="l00466"></a><a class="code" href="class_r_t_c_p_sender_info.html#a2">00466</a> getNTPTimestampInt()<span class="keyword"> const</span> <a name="l00467"></a>00467 <span class="keyword"> </span>{ <span class="keywordflow">return</span> ntohl(senderInfo.NTPMSW); } <a name="l00468"></a>00468 <a name="l00473"></a>00473 uint32 <a name="l00474"></a><a class="code" href="class_r_t_c_p_sender_info.html#a3">00474</a> getNTPTimestampFrac()<span class="keyword"> const</span> <a name="l00475"></a>00475 <span class="keyword"> </span>{ <span class="keywordflow">return</span> ntohl(senderInfo.NTPLSW); } <a name="l00476"></a>00476 <a name="l00477"></a>00477 <span class="keyword">inline</span> uint32 <a name="l00478"></a><a class="code" href="class_r_t_c_p_sender_info.html#a4">00478</a> getRTPTimestamp()<span class="keyword"> const</span> <a name="l00479"></a>00479 <span class="keyword"> </span>{ <span class="keywordflow">return</span> ntohl(senderInfo.RTPTimestamp); } <a name="l00480"></a>00480 <a name="l00484"></a>00484 <span class="keyword">inline</span> uint32 <a name="l00485"></a><a class="code" href="class_r_t_c_p_sender_info.html#a5">00485</a> getPacketCount()<span class="keyword"> const</span> <a name="l00486"></a>00486 <span class="keyword"> </span>{ <span class="keywordflow">return</span> ntohl(senderInfo.octetCount); } <a name="l00487"></a>00487 <a name="l00488"></a>00488 <span class="keyword">inline</span> uint32 <a name="l00489"></a><a class="code" href="class_r_t_c_p_sender_info.html#a6">00489</a> getOctetCount()<span class="keyword"> const</span> <a name="l00490"></a>00490 <span class="keyword"> </span>{ <span class="keywordflow">return</span> ntohl(senderInfo.packetCount); } <a name="l00491"></a>00491 <a name="l00492"></a>00492 <span class="keyword">private</span>: <a name="l00493"></a>00493 <a class="code" href="struct_r_t_c_p_compound_handler_1_1_sender_info.html">RTCPCompoundHandler::SenderInfo</a> senderInfo; <a name="l00494"></a>00494 }; <a name="l00495"></a>00495 <a name="l00504"></a>00504 timeval <a name="l00505"></a>00505 <a class="code" href="group__rtcppacket.html#ga0">NTP2Timeval</a>(uint32 msw, uint32 lsw); <a name="l00506"></a>00506 <a name="l00514"></a>00514 uint32 <a name="l00515"></a>00515 <a class="code" href="group__rtcppacket.html#ga1">timevalIntervalTo65536</a>(timeval& t); <a name="l00516"></a>00516 <span class="comment">// rtcppacket</span> <a name="l00518"></a>00518 <a name="l00519"></a>00519 <span class="preprocessor">#ifdef CCXX_NAMESPACES</span> <a name="l00520"></a>00520 <span class="preprocessor"></span>} <a name="l00521"></a>00521 <span class="preprocessor">#endif</span> <a name="l00522"></a>00522 <span class="preprocessor"></span> <a name="l00523"></a>00523 <span class="preprocessor">#endif // ndef CCXX_RTP_RTCPPKT_H_</span> <a name="l00524"></a>00524 <span class="preprocessor"></span> </pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Dec 9 22:32:03 2005 for ccRTP by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> </html>