<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>ccRTP: cqueue.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <h1>cqueue.h</h1><a href="cqueue_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="l00044"></a>00044 <span class="preprocessor">#ifndef CCXX_RTP_CQUEUE_H_</span> <a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define CCXX_RTP_CQUEUE_H_</span> <a name="l00046"></a>00046 <span class="preprocessor"></span> <a name="l00047"></a>00047 <span class="preprocessor">#include <<a class="code" href="ioqueue_8h.html" title="Generic RTP input/output queues.">ccrtp/ioqueue.h</a>></span> <a name="l00048"></a>00048 <a name="l00049"></a>00049 <span class="preprocessor">#ifdef CCXX_NAMESPACES</span> <a name="l00050"></a>00050 <span class="preprocessor"></span><span class="keyword">namespace </span>ost { <a name="l00051"></a>00051 <span class="preprocessor">#endif</span> <a name="l00052"></a>00052 <span class="preprocessor"></span> <a name="l00080"></a><a class="code" href="class_queue_r_t_c_p_manager.html">00080</a> <span class="keyword">class </span>__EXPORT <a class="code" href="class_queue_r_t_c_p_manager.html" title="Adds generic management of RTCP functions to an RTP data queue.">QueueRTCPManager</a> : <span class="keyword">public</span> <a class="code" href="class_r_t_p_data_queue.html" title="A packet queue handler for building different kinds of RTP protocol systems.">RTPDataQueue</a>, <a name="l00081"></a>00081 <span class="keyword">protected</span> <a class="code" href="class_r_t_c_p_compound_handler.html" title="low level structs and RTCP packet parsing and building methods.">RTCPCompoundHandler</a> <a name="l00082"></a>00082 { <a name="l00083"></a>00083 <span class="keyword">public</span>: <a name="l00093"></a>00093 <a class="code" href="class_r_t_c_p_sender_info.html" title="Sender block information of SR RTCP reports.">RTCPSenderInfo</a>* getMRSenderInfo(<a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>& src); <a name="l00094"></a>00094 <a name="l00105"></a>00105 <a class="code" href="class_r_t_c_p_receiver_info.html" title="Report block information of SR/RR RTCP reports.">RTCPReceiverInfo</a>* getMRReceiverInfo(<a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>& srcFrom); <a name="l00106"></a>00106 <a name="l00115"></a><a class="code" href="class_queue_r_t_c_p_manager.html#9c4ab816bbf557620e3d7a7549182070">00115</a> <span class="keywordtype">void</span> setLeavingDelay(<a class="code" href="base_8h.html#c16d853255145e6a903914eb376a84bb" title="Time interval expressed in microseconds.">microtimeout_t</a> delay) <a name="l00116"></a>00116 { leavingDelay = delay; } <a name="l00117"></a>00117 <a name="l00132"></a>00132 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a name="l00133"></a><a class="code" href="class_queue_r_t_c_p_manager.html#cad6dcdad85ba5f1ec11a924f3c11cd5">00133</a> setEnd2EndDelay(<a class="code" href="base_8h.html#c16d853255145e6a903914eb376a84bb" title="Time interval expressed in microseconds.">microtimeout_t</a> t) <a name="l00134"></a>00134 { end2EndDelay = t; } <a name="l00135"></a>00135 <a name="l00136"></a>00136 <span class="keyword">inline</span> <a class="code" href="base_8h.html#c16d853255145e6a903914eb376a84bb" title="Time interval expressed in microseconds.">microtimeout_t</a> <a name="l00137"></a><a class="code" href="class_queue_r_t_c_p_manager.html#8e09a4e9e97186616d2caead071c8b92">00137</a> getDefaultEnd2EndDelay()<span class="keyword"> const</span> <a name="l00138"></a>00138 <span class="keyword"> </span>{ <span class="keywordflow">return</span> defaultEnd2EndDelay; } <a name="l00139"></a>00139 <a name="l00140"></a>00140 <span class="keyword">inline</span> <a class="code" href="base_8h.html#c16d853255145e6a903914eb376a84bb" title="Time interval expressed in microseconds.">microtimeout_t</a> <a name="l00141"></a><a class="code" href="class_queue_r_t_c_p_manager.html#631947cbf56979db30e9627205fbc730">00141</a> getEnd2EndDelay()<span class="keyword"> const</span> <a name="l00142"></a>00142 <span class="keyword"> </span>{ <span class="keywordflow">return</span> end2EndDelay; } <a name="l00143"></a>00143 <a name="l00157"></a>00157 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a name="l00158"></a><a class="code" href="class_queue_r_t_c_p_manager.html#7c6efe7996833704f038c36c92a24644">00158</a> setSendersControlFraction(<span class="keywordtype">float</span> fraction) <a name="l00159"></a>00159 { sendControlBwFract = fraction; recvControlBwFract = 1 - fraction;} <a name="l00160"></a>00160 <a name="l00170"></a>00170 <span class="keywordtype">void</span> <a name="l00171"></a><a class="code" href="class_queue_r_t_c_p_manager.html#1362a8073d3e28ff6f3da22361e13cc7">00171</a> setMinRTCPInterval(<a class="code" href="base_8h.html#c16d853255145e6a903914eb376a84bb" title="Time interval expressed in microseconds.">microtimeout_t</a> interval) <a name="l00172"></a>00172 { rtcpMinInterval = interval; } <a name="l00173"></a>00173 <a name="l00177"></a>00177 <span class="keyword">inline</span> uint32 <a name="l00178"></a><a class="code" href="class_queue_r_t_c_p_manager.html#d7bef7e3e3d4c483639ca41d0a48c465">00178</a> getSendRTCPPacketCount()<span class="keyword"> const</span> <a name="l00179"></a>00179 <span class="keyword"> </span>{ <span class="keywordflow">return</span> ctrlSendCount; } <a name="l00180"></a>00180 <a name="l00181"></a>00181 <span class="keyword">protected</span>: <a name="l00182"></a>00182 <a class="code" href="class_queue_r_t_c_p_manager.html" title="Adds generic management of RTCP functions to an RTP data queue.">QueueRTCPManager</a>(uint32 size = <a class="code" href="class_membership_bookkeeping.html#53ba5e9495dfdb9ec16c551206796d99">RTPDataQueue::defaultMembersHashSize</a>, <a name="l00183"></a>00183 <a class="code" href="class_r_t_p_application.html" title="An RTP application, holding identifying RTCP SDES item values.">RTPApplication</a>& app = <a class="code" href="group__sources.html#g206420a8423d0c261e9bfc5a388a9534" title="Get the RTPApplication object for the &quot;default&quot; application (the only one...">defaultApplication</a>()); <a name="l00184"></a>00184 <a name="l00185"></a>00185 <a class="code" href="class_queue_r_t_c_p_manager.html" title="Adds generic management of RTCP functions to an RTP data queue.">QueueRTCPManager</a>(uint32 ssrc, <a name="l00186"></a>00186 uint32 size = <a class="code" href="class_membership_bookkeeping.html#53ba5e9495dfdb9ec16c551206796d99">RTPDataQueue::defaultMembersHashSize</a>, <a name="l00187"></a>00187 <a class="code" href="class_r_t_p_application.html" title="An RTP application, holding identifying RTCP SDES item values.">RTPApplication</a>& app = <a class="code" href="group__sources.html#g206420a8423d0c261e9bfc5a388a9534" title="Get the RTPApplication object for the &quot;default&quot; application (the only one...">defaultApplication</a>()); <a name="l00188"></a>00188 <a name="l00189"></a>00189 <span class="keyword">virtual</span> <a name="l00190"></a>00190 ~<a class="code" href="class_queue_r_t_c_p_manager.html" title="Adds generic management of RTCP functions to an RTP data queue.">QueueRTCPManager</a>(); <a name="l00191"></a>00191 <a name="l00192"></a>00192 <span class="keyword">const</span> <a class="code" href="class_r_t_p_application.html" title="An RTP application, holding identifying RTCP SDES item values.">RTPApplication</a>& <a name="l00193"></a><a class="code" href="class_queue_r_t_c_p_manager.html#7fe1d832922bb976277d11d3348b5b00">00193</a> getApplication() <a name="l00194"></a>00194 { <span class="keywordflow">return</span> queueApplication; } <a name="l00195"></a>00195 <a name="l00196"></a>00196 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a name="l00197"></a><a class="code" href="class_queue_r_t_c_p_manager.html#eaa27c32efc622663a8b1d62945887ce">00197</a> setControlBandwidth(<span class="keywordtype">float</span> fraction) <a name="l00198"></a>00198 { controlBwFract = fraction; } <a name="l00199"></a>00199 <a name="l00200"></a>00200 <span class="keywordtype">float</span> <a name="l00201"></a><a class="code" href="class_queue_r_t_c_p_manager.html#f0be89a7b891cbe5328ae47bb8108db3">00201</a> getControlBandwidth()<span class="keyword"> const</span> <a name="l00202"></a>00202 <span class="keyword"> </span>{ <span class="keywordflow">return</span> controlBwFract; } <a name="l00203"></a>00203 <a name="l00208"></a>00208 <span class="keywordtype">void</span> <a name="l00209"></a>00209 controlTransmissionService(); <a name="l00210"></a>00210 <a name="l00215"></a>00215 <span class="keywordtype">void</span> <a name="l00216"></a>00216 controlReceptionService(); <a name="l00217"></a>00217 <a name="l00230"></a>00230 <span class="keywordtype">bool</span> checkSSRCInRTCPPkt(SyncSourceLink& sourceLink, <span class="keywordtype">bool</span> is_new, <a name="l00231"></a>00231 InetAddress& na, tpport_t tp); <a name="l00232"></a>00232 <a name="l00233"></a>00233 <span class="keywordtype">void</span> <a name="l00234"></a>00234 endQueueRTCPManager(); <a name="l00235"></a>00235 <a name="l00246"></a>00246 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a name="l00247"></a>00247 onGotSR(<a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>& source, SendReport& SR, uint8 blocks); <a name="l00248"></a>00248 <a name="l00259"></a>00259 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a name="l00260"></a>00260 onGotRR(<a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>& source, RecvReport& RR, uint8 blocks); <a name="l00261"></a>00261 <a name="l00266"></a>00266 <span class="keywordtype">bool</span> <a name="l00267"></a>00267 onGotSDES(<a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>& source, RTCPPacket& pkt); <a name="l00268"></a>00268 <a name="l00278"></a>00278 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a name="l00279"></a>00279 onGotSDESChunk(<a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>& source, SDESChunk& chunk, <span class="keywordtype">size_t</span> len); <a name="l00280"></a>00280 <a name="l00290"></a>00290 <span class="keyword">inline</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a name="l00291"></a><a class="code" href="class_queue_r_t_c_p_manager.html#dd4a4d60d6fd3a0076ed24fe64428529">00291</a> onGotAPP(<a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>&, <a class="code" href="struct_r_t_c_p_compound_handler_1_1_a_p_p_packet.html" title="Struct for APP (application specific) RTCP packets.">RTCPCompoundHandler::APPPacket</a>&, <a name="l00292"></a>00292 <span class="keywordtype">size_t</span>) <a name="l00293"></a>00293 { <span class="keywordflow">return</span>; } <a name="l00294"></a>00294 <a name="l00295"></a>00295 <span class="keyword">inline</span> timeval <a name="l00296"></a><a class="code" href="class_queue_r_t_c_p_manager.html#89d67fb1b7ff7e8bd7c6b22e79970361">00296</a> getRTCPCheckInterval() <a name="l00297"></a>00297 { <span class="keywordflow">return</span> rtcpCheckInterval; } <a name="l00298"></a>00298 <a name="l00303"></a>00303 uint32 <a name="l00304"></a><a class="code" href="class_queue_r_t_c_p_manager.html#41f382b96fcd398fa8f12cf6ced38305">00304</a> getLastSendPacketCount()<span class="keyword"> const</span> <a name="l00305"></a>00305 <span class="keyword"> </span>{ <span class="keywordflow">return</span> lastSendPacketCount; } <a name="l00306"></a>00306 <a name="l00310"></a>00310 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a name="l00311"></a><a class="code" href="class_queue_r_t_c_p_manager.html#54826899b713cd6a9a6108ae2859b194">00311</a> setPrevMembersNum(uint32 n) <a name="l00312"></a>00312 { reconsInfo.rtcpPMembers = n; } <a name="l00313"></a>00313 <a name="l00314"></a>00314 <span class="keyword">inline</span> uint32 <a name="l00315"></a><a class="code" href="class_queue_r_t_c_p_manager.html#6ae4968e0bb49088ae91930cc2f16cb9">00315</a> getPrevMembersCount()<span class="keyword"> const</span> <a name="l00316"></a>00316 <span class="keyword"> </span>{ <span class="keywordflow">return</span> reconsInfo.rtcpPMembers; } <a name="l00317"></a>00317 <a name="l00336"></a>00336 <span class="keywordtype">size_t</span> <a name="l00337"></a>00337 dispatchBYE(<span class="keyword">const</span> std::string& reason); <a name="l00338"></a>00338 <a name="l00339"></a>00339 <span class="keywordtype">size_t</span> <a name="l00340"></a>00340 sendControlToDestinations(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buffer, <span class="keywordtype">size_t</span> len); <a name="l00341"></a>00341 <a name="l00342"></a>00342 <span class="keyword">private</span>: <a name="l00343"></a>00343 <a class="code" href="class_queue_r_t_c_p_manager.html" title="Adds generic management of RTCP functions to an RTP data queue.">QueueRTCPManager</a>(<span class="keyword">const</span> <a class="code" href="class_queue_r_t_c_p_manager.html" title="Adds generic management of RTCP functions to an RTP data queue.">QueueRTCPManager</a> &o); <a name="l00344"></a>00344 <a name="l00345"></a>00345 <a class="code" href="class_queue_r_t_c_p_manager.html" title="Adds generic management of RTCP functions to an RTP data queue.">QueueRTCPManager</a>& <a name="l00346"></a>00346 operator=(<span class="keyword">const</span> <a class="code" href="class_queue_r_t_c_p_manager.html" title="Adds generic management of RTCP functions to an RTP data queue.">QueueRTCPManager</a> &o); <a name="l00347"></a>00347 <a name="l00353"></a>00353 <span class="keywordtype">size_t</span> <a name="l00354"></a>00354 dispatchControlPacket(); <a name="l00355"></a>00355 <a name="l00367"></a>00367 <span class="keywordtype">void</span> <a name="l00368"></a>00368 takeInControlPacket(); <a name="l00369"></a>00369 <a name="l00383"></a>00383 <span class="keyword">virtual</span> timeval <a name="l00384"></a>00384 computeRTCPInterval(); <a name="l00385"></a>00385 <a name="l00393"></a>00393 <span class="keyword">virtual</span> <a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> <a name="l00394"></a>00394 scheduleSDESItem(); <a name="l00395"></a>00395 <a name="l00401"></a>00401 <span class="keyword">inline</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a name="l00402"></a>00402 onSSRCCollision(<span class="keyword">const</span> <a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>&) <a name="l00403"></a>00403 { } <a name="l00404"></a>00404 <a name="l00408"></a>00408 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a name="l00409"></a>00409 end2EndDelayed(IncomingRTPPktLink& p); <a name="l00410"></a>00410 <a name="l00419"></a>00419 <span class="keyword">inline</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a name="l00420"></a>00420 onGotRRSRExtension(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*, <span class="keywordtype">size_t</span>) <a name="l00421"></a>00421 { <span class="keywordflow">return</span>; } <a name="l00422"></a>00422 <a name="l00432"></a>00432 <span class="keyword">inline</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a name="l00433"></a>00433 onGotGoodbye(<span class="keyword">const</span> <a class="code" href="class_sync_source.html" title="Synchronization source in an RTP session.">SyncSource</a>&, <span class="keyword">const</span> std::string&) <a name="l00434"></a>00434 { <span class="keywordflow">return</span>; } <a name="l00435"></a>00435 <a name="l00448"></a>00448 <span class="keywordtype">bool</span> <a name="l00449"></a>00449 getBYE(RTCPPacket &pkt, <span class="keywordtype">size_t</span> &pointer, <span class="keywordtype">size_t</span> len); <a name="l00450"></a>00450 <a name="l00454"></a>00454 uint8 <a name="l00455"></a>00455 packReportBlocks(RRBlock* blocks, uint16& len, uint16& available); <a name="l00456"></a>00456 <a name="l00465"></a>00465 <span class="keywordtype">void</span> <a name="l00466"></a>00466 packSDES(uint16& len); <a name="l00467"></a>00467 <a name="l00479"></a>00479 <span class="keywordtype">void</span> <a name="l00480"></a>00480 updateAvgRTCPSize(<span class="keywordtype">size_t</span> len); <a name="l00481"></a>00481 <a name="l00487"></a>00487 <span class="keywordtype">void</span> <a name="l00488"></a>00488 reverseReconsideration(); <a name="l00489"></a>00489 <a name="l00490"></a>00490 <span class="keywordtype">bool</span> <a name="l00491"></a>00491 timerReconsideration(); <a name="l00492"></a>00492 <a name="l00501"></a>00501 <span class="keywordtype">void</span> <a name="l00502"></a>00502 expireSSRCs(); <a name="l00503"></a>00503 <a name="l00507"></a>00507 <span class="keywordtype">void</span> <a name="l00508"></a>00508 getOnlyBye(); <a name="l00509"></a>00509 <a name="l00514"></a>00514 <span class="keywordtype">void</span> <a name="l00515"></a>00515 setSDESItem(<a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>* part, <a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> type, <a name="l00516"></a>00516 <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> value, <span class="keywordtype">size_t</span> len); <a name="l00517"></a>00517 <a name="l00522"></a>00522 <span class="keywordtype">void</span> <a name="l00523"></a>00523 setPRIVPrefix(<a class="code" href="class_participant.html" title="A class of objects representing remote participants (RTP applications) in a multimedia...">Participant</a>* part, <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> value, <span class="keywordtype">size_t</span> len); <a name="l00524"></a>00524 <a name="l00536"></a>00536 <span class="keyword">inline</span> <span class="keyword">virtual</span> uint16 <a name="l00537"></a>00537 networkHeaderSize() <a name="l00538"></a>00538 { <span class="keywordflow">return</span> 20; } <a name="l00539"></a>00539 <a name="l00551"></a>00551 <span class="keyword">inline</span> <span class="keyword">virtual</span> uint16 <a name="l00552"></a>00552 transportHeaderSize() <a name="l00553"></a>00553 { <span class="keywordflow">return</span> 8; } <a name="l00554"></a>00554 <a name="l00555"></a>00555 <a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> <a name="l00556"></a>00556 nextSDESType(<a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> t); <a name="l00557"></a>00557 <a name="l00558"></a>00558 <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a name="l00559"></a>00559 sendControl(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> buffer, <span class="keywordtype">size_t</span> len) = 0; <a name="l00560"></a>00560 <a name="l00561"></a>00561 <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a name="l00562"></a>00562 recvControl(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buffer, <span class="keywordtype">size_t</span> len, <a name="l00563"></a>00563 InetHostAddress& na, tpport_t& tp) = 0; <a name="l00564"></a>00564 <a name="l00565"></a>00565 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a name="l00566"></a>00566 isPendingControl(<a class="code" href="base_8h.html#c16d853255145e6a903914eb376a84bb" title="Time interval expressed in microseconds.">microtimeout_t</a> timeout) = 0; <a name="l00567"></a>00567 <a name="l00568"></a>00568 <span class="comment">// whether the RTCP service is active</span> <a name="l00569"></a>00569 <span class="keyword">volatile</span> <span class="keywordtype">bool</span> controlServiceActive; <a name="l00570"></a>00570 <span class="keywordtype">float</span> controlBwFract, sendControlBwFract, recvControlBwFract; <a name="l00571"></a>00571 <span class="comment">// number of RTCP packets sent since the beginning</span> <a name="l00572"></a>00572 uint32 ctrlSendCount; <a name="l00573"></a>00573 <a name="l00574"></a>00574 <span class="comment">// Network + transport headers size, typically size of IP +</span> <a name="l00575"></a>00575 <span class="comment">// UDP headers</span> <a name="l00576"></a>00576 uint16 lowerHeadersSize; <a name="l00577"></a>00577 <a name="l00578"></a>00578 <a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> nextScheduledSDESItem; <a name="l00579"></a>00579 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> firstSchedulable; <a name="l00580"></a>00580 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="group__rtcppacket.html#gf6d38e5ccbbcdf2a24ebbd4fc5b4eeac" title="SDES items that may be carried in a Source DEScription RTCP packet.">SDESItemType</a> lastSchedulable; <a name="l00581"></a>00581 <a name="l00582"></a>00582 <span class="comment">// state for rtcp timing. Its meaning is defined in</span> <a name="l00583"></a>00583 <span class="comment">// draft-ietf-avt-rtp-new, 6.3.</span> <a name="l00584"></a>00584 <a name="l00585"></a>00585 <span class="comment">// Parameters for timer reconsideration algorithm</span> <a name="l00586"></a>00586 <span class="keyword">struct </span>{ <a name="l00587"></a><a class="code" href="class_queue_r_t_c_p_manager.html#92fcc8a86b306c0045639d7263611faf">00587</a> timeval rtcpTp, rtcpTc, rtcpTn; <a name="l00588"></a><a class="code" href="class_queue_r_t_c_p_manager.html#470da4864fa3ff6988b7a156109c2591">00588</a> uint32 rtcpPMembers; <a name="l00589"></a>00589 } reconsInfo; <a name="l00590"></a>00590 <span class="keywordtype">bool</span> rtcpWeSent; <a name="l00591"></a>00591 uint16 rtcpAvgSize; <a name="l00592"></a>00592 <span class="keywordtype">bool</span> rtcpInitial; <a name="l00593"></a>00593 <span class="comment">// last time we checked if there were incoming RTCP packets</span> <a name="l00594"></a>00594 timeval rtcpLastCheck; <a name="l00595"></a>00595 <span class="comment">// interval to check if there are incoming RTCP packets</span> <a name="l00596"></a>00596 timeval rtcpCheckInterval; <a name="l00597"></a>00597 <span class="comment">// next time to check if there are incoming RTCP packets</span> <a name="l00598"></a>00598 timeval rtcpNextCheck; <a name="l00599"></a>00599 <a name="l00600"></a>00600 <span class="comment">// number of RTP data packets sent at the time of the last</span> <a name="l00601"></a>00601 <span class="comment">// RTCP packet transmission.</span> <a name="l00602"></a>00602 uint32 lastSendPacketCount; <a name="l00603"></a>00603 <a name="l00604"></a>00604 <span class="comment">// minimum interval for transmission of RTCP packets. The</span> <a name="l00605"></a>00605 <span class="comment">// result of computeRTCPInterval will always be >= (times a</span> <a name="l00606"></a>00606 <span class="comment">// random number between 0.5 and 1.5).</span> <a name="l00607"></a>00607 <a class="code" href="base_8h.html#c16d853255145e6a903914eb376a84bb" title="Time interval expressed in microseconds.">microtimeout_t</a> rtcpMinInterval; <a name="l00608"></a>00608 <a name="l00609"></a>00609 <a class="code" href="base_8h.html#c16d853255145e6a903914eb376a84bb" title="Time interval expressed in microseconds.">microtimeout_t</a> leavingDelay; <a name="l00610"></a>00610 <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="base_8h.html#c16d853255145e6a903914eb376a84bb" title="Time interval expressed in microseconds.">microtimeout_t</a> defaultEnd2EndDelay; <a name="l00611"></a>00611 <span class="comment">// Maximum delay allowed between packet timestamping and</span> <a name="l00612"></a>00612 <span class="comment">// packet availability for the application.</span> <a name="l00613"></a>00613 <a class="code" href="base_8h.html#c16d853255145e6a903914eb376a84bb" title="Time interval expressed in microseconds.">microtimeout_t</a> end2EndDelay; <a name="l00614"></a>00614 <span class="comment">// Application this queue is bound to.</span> <a name="l00615"></a>00615 <a class="code" href="class_r_t_p_application.html" title="An RTP application, holding identifying RTCP SDES item values.">RTPApplication</a>& queueApplication; <a name="l00616"></a>00616 <a name="l00617"></a>00617 <span class="comment">// an empty RTPData</span> <a name="l00618"></a>00618 <span class="keyword">static</span> <span class="keyword">const</span> uint16 TIMEOUT_MULTIPLIER; <a name="l00619"></a>00619 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">double</span> RECONSIDERATION_COMPENSATION; <a name="l00620"></a>00620 }; <a name="l00621"></a>00621 <a name="l00629"></a><a class="code" href="class_a_v_p_queue.html">00629</a> <span class="keyword">class </span><a class="code" href="class_a_v_p_queue.html" title="This class, an RTP/RTCP queue, adds audio/video profile (AVP) specific methods to...">AVPQueue</a> : <span class="keyword">public</span> <a class="code" href="class_queue_r_t_c_p_manager.html" title="Adds generic management of RTCP functions to an RTP data queue.">QueueRTCPManager</a> <a name="l00630"></a>00630 { <a name="l00631"></a>00631 <span class="keyword">public</span>: <a name="l00647"></a>00647 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a name="l00648"></a><a class="code" href="class_a_v_p_queue.html#3fd139decfd1175b7ad6a8abeed65bf5">00648</a> setControlBandwidth(<span class="keywordtype">float</span> fraction) <a name="l00649"></a>00649 { <a class="code" href="class_queue_r_t_c_p_manager.html#eaa27c32efc622663a8b1d62945887ce">QueueRTCPManager::setControlBandwidth</a>(fraction); } <a name="l00650"></a>00650 <a name="l00651"></a>00651 <span class="keywordtype">float</span> <a name="l00652"></a><a class="code" href="class_a_v_p_queue.html#6d6f7b130b2fdf88386aebdc867e1b7b">00652</a> getControlBandwidth()<span class="keyword"> const</span> <a name="l00653"></a>00653 <span class="keyword"> </span>{ <span class="keywordflow">return</span> <a class="code" href="class_queue_r_t_c_p_manager.html#f0be89a7b891cbe5328ae47bb8108db3">QueueRTCPManager::getControlBandwidth</a>(); } <a name="l00654"></a>00654 <a name="l00655"></a>00655 <span class="keyword">protected</span>: <a name="l00656"></a><a class="code" href="class_a_v_p_queue.html#af1e8cefc7f14a1a2031b0a39133d741">00656</a> <a class="code" href="class_a_v_p_queue.html" title="This class, an RTP/RTCP queue, adds audio/video profile (AVP) specific methods to...">AVPQueue</a>(uint32 size = <a class="code" href="class_membership_bookkeeping.html#53ba5e9495dfdb9ec16c551206796d99">RTPDataQueue::defaultMembersHashSize</a>, <a name="l00657"></a>00657 <a class="code" href="class_r_t_p_application.html" title="An RTP application, holding identifying RTCP SDES item values.">RTPApplication</a>& app = <a class="code" href="group__sources.html#g206420a8423d0c261e9bfc5a388a9534" title="Get the RTPApplication object for the &quot;default&quot; application (the only one...">defaultApplication</a>()) : <a name="l00658"></a>00658 <a class="code" href="class_queue_r_t_c_p_manager.html" title="Adds generic management of RTCP functions to an RTP data queue.">QueueRTCPManager</a>(size,app) <a name="l00659"></a>00659 { } <a name="l00660"></a>00660 <a name="l00664"></a><a class="code" href="class_a_v_p_queue.html#50f8c10ddf34ea6224ce3c7cf94d9ffc">00664</a> <a class="code" href="class_a_v_p_queue.html" title="This class, an RTP/RTCP queue, adds audio/video profile (AVP) specific methods to...">AVPQueue</a>(uint32 ssrc, uint32 size = <a name="l00665"></a>00665 <a class="code" href="class_membership_bookkeeping.html#53ba5e9495dfdb9ec16c551206796d99">RTPDataQueue::defaultMembersHashSize</a>, <a name="l00666"></a>00666 <a class="code" href="class_r_t_p_application.html" title="An RTP application, holding identifying RTCP SDES item values.">RTPApplication</a>& app = <a class="code" href="group__sources.html#g206420a8423d0c261e9bfc5a388a9534" title="Get the RTPApplication object for the &quot;default&quot; application (the only one...">defaultApplication</a>()) : <a name="l00667"></a>00667 <a class="code" href="class_queue_r_t_c_p_manager.html" title="Adds generic management of RTCP functions to an RTP data queue.">QueueRTCPManager</a>(ssrc,size,app) <a name="l00668"></a>00668 { } <a name="l00669"></a><a class="code" href="class_a_v_p_queue.html#8de3b8094de050079d3c29876119d518">00669</a> <span class="keyword">inline</span> <span class="keyword">virtual</span> ~<a class="code" href="class_a_v_p_queue.html" title="This class, an RTP/RTCP queue, adds audio/video profile (AVP) specific methods to...">AVPQueue</a>() <a name="l00670"></a>00670 { } <a name="l00671"></a>00671 }; <a name="l00672"></a>00672 <span class="comment">// cqueue</span> <a name="l00674"></a>00674 <a name="l00675"></a>00675 <span class="preprocessor">#ifdef CCXX_NAMESPACES</span> <a name="l00676"></a>00676 <span class="preprocessor"></span>} <a name="l00677"></a>00677 <span class="preprocessor">#endif</span> <a name="l00678"></a>00678 <span class="preprocessor"></span> <a name="l00679"></a>00679 <span class="preprocessor">#endif //CCXX_RTP_CQUEUE_H_</span> <a name="l00680"></a>00680 <span class="preprocessor"></span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Fri Jul 24 21:42:25 2009 for ccRTP by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>