Sophie

Sophie

distrib > PLD > ac > amd64 > media > dist > by-pkgid > 4cd3fba015b84aa8198c12116a5f41ed > files > 227

ccrtp-devel-1.3.6-1.amd64.rpm

<!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: oqueue.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&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <a class="qindex" href="examples.html">Examples</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">src</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_000001.html">ccrtp</a></div>
<h1>oqueue.h</h1><a href="oqueue_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,2005 Federico Montesino Pouzols &lt;fedemp@altern.org&gt;.</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_OQUEUE_H_</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define CCXX_RTP_OQUEUE_H_</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;<a class="code" href="queuebase_8h.html">ccrtp/queuebase.h</a>&gt;</span>
<a name="l00048"></a>00048 <span class="preprocessor">#include &lt;list&gt;</span> <span class="comment">// TODO: minimal std::list template</span>
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="preprocessor">#ifdef  CCXX_NAMESPACES</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="keyword">namespace </span>ost {
<a name="l00052"></a>00052 <span class="preprocessor">#endif</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span>
<a name="l00067"></a><a class="code" href="class_destination_list_handler.html">00067</a> <span class="keyword">class </span>__EXPORT DestinationListHandler
<a name="l00068"></a>00068 {
<a name="l00069"></a>00069 <span class="keyword">protected</span>:
<a name="l00070"></a><a class="code" href="class_destination_list_handler.html#p0">00070</a>         <span class="keyword">struct </span><a class="code" href="struct_destination_list_handler_1_1_transport_address.html">TransportAddress</a>;
<a name="l00071"></a>00071         std::list&lt;TransportAddress*&gt; destList;
<a name="l00072"></a>00072 
<a name="l00073"></a>00073 <span class="keyword">public</span>:
<a name="l00074"></a>00074         DestinationListHandler();
<a name="l00075"></a>00075 
<a name="l00076"></a>00076         ~DestinationListHandler();
<a name="l00077"></a>00077 
<a name="l00081"></a><a class="code" href="class_destination_list_handler.html#a2">00081</a>         <span class="keyword">inline</span> <span class="keywordtype">bool</span> isSingleDestination()<span class="keyword"> const</span>
<a name="l00082"></a>00082 <span class="keyword">        </span>{ <span class="keywordflow">return</span> (1 == destList.size()); }
<a name="l00083"></a>00083 
<a name="l00084"></a><a class="code" href="class_destination_list_handler.html#a3">00084</a>         <span class="keyword">inline</span> <a class="code" href="struct_destination_list_handler_1_1_transport_address.html">TransportAddress</a>* getFirstDestination()<span class="keyword"> const</span>
<a name="l00085"></a>00085 <span class="keyword">        </span>{ <span class="keywordflow">return</span> destList.front(); }
<a name="l00086"></a>00086 
<a name="l00087"></a><a class="code" href="class_destination_list_handler.html#a4">00087</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> lockDestinationList()<span class="keyword"> const</span>
<a name="l00088"></a>00088 <span class="keyword">        </span>{ destinationLock.readLock(); }
<a name="l00089"></a>00089 
<a name="l00090"></a><a class="code" href="class_destination_list_handler.html#a5">00090</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> unlockDestinationList()<span class="keyword"> const</span>
<a name="l00091"></a>00091 <span class="keyword">        </span>{ destinationLock.unlock(); }
<a name="l00092"></a>00092 
<a name="l00093"></a>00093 <span class="keyword">protected</span>:
<a name="l00094"></a><a class="code" href="class_destination_list_handler.html#b0">00094</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> writeLockDestinationList()<span class="keyword"> const</span>
<a name="l00095"></a>00095 <span class="keyword">        </span>{ destinationLock.writeLock(); }
<a name="l00096"></a>00096 
<a name="l00100"></a>00100         <span class="keywordtype">bool</span>
<a name="l00101"></a>00101         addDestinationToList(<span class="keyword">const</span> InetAddress&amp; ia, tpport_t data, 
<a name="l00102"></a>00102                              tpport_t control);
<a name="l00103"></a>00103         
<a name="l00107"></a>00107         <span class="keywordtype">bool</span> removeDestinationFromList(<span class="keyword">const</span> InetAddress&amp; ia,
<a name="l00108"></a>00108                                        tpport_t dataPort,
<a name="l00109"></a>00109                                        tpport_t controlPort);
<a name="l00110"></a>00110 
<a name="l00111"></a><a class="code" href="struct_destination_list_handler_1_1_transport_address.html">00111</a>         <span class="keyword">struct </span><a class="code" href="struct_destination_list_handler_1_1_transport_address.html">TransportAddress</a>
<a name="l00112"></a>00112         { 
<a name="l00113"></a><a class="code" href="struct_destination_list_handler_1_1_transport_address.html#a0">00113</a>                 <a class="code" href="struct_destination_list_handler_1_1_transport_address.html">TransportAddress</a>(InetAddress na, tpport_t dtp, tpport_t ctp) :
<a name="l00114"></a>00114                         networkAddress(na), dataTransportPort(dtp), 
<a name="l00115"></a>00115                         controlTransportPort(ctp)
<a name="l00116"></a>00116                 {  }
<a name="l00117"></a>00117 
<a name="l00118"></a><a class="code" href="struct_destination_list_handler_1_1_transport_address.html#a1">00118</a>                 <span class="keyword">inline</span> <span class="keyword">const</span> InetAddress&amp; getNetworkAddress()<span class="keyword"> const</span>
<a name="l00119"></a>00119 <span class="keyword">                </span>{ <span class="keywordflow">return</span> networkAddress; }
<a name="l00120"></a>00120 
<a name="l00121"></a><a class="code" href="struct_destination_list_handler_1_1_transport_address.html#a2">00121</a>                 <span class="keyword">inline</span> tpport_t getDataTransportPort()<span class="keyword"> const</span>
<a name="l00122"></a>00122 <span class="keyword">                </span>{ <span class="keywordflow">return</span> dataTransportPort; }
<a name="l00123"></a>00123 
<a name="l00124"></a><a class="code" href="struct_destination_list_handler_1_1_transport_address.html#a3">00124</a>                 <span class="keyword">inline</span> tpport_t getControlTransportPort()<span class="keyword"> const</span>
<a name="l00125"></a>00125 <span class="keyword">                </span>{ <span class="keywordflow">return</span> controlTransportPort; }
<a name="l00126"></a>00126 
<a name="l00127"></a><a class="code" href="struct_destination_list_handler_1_1_transport_address.html#o0">00127</a>                 InetAddress networkAddress;
<a name="l00128"></a><a class="code" href="struct_destination_list_handler_1_1_transport_address.html#o1">00128</a>                 tpport_t dataTransportPort, controlTransportPort;
<a name="l00129"></a>00129         };
<a name="l00130"></a>00130 
<a name="l00131"></a>00131 <span class="keyword">private</span>:
<a name="l00132"></a>00132         <span class="keyword">mutable</span> ThreadLock destinationLock;
<a name="l00133"></a>00133 };
<a name="l00134"></a>00134 
<a name="l00142"></a><a class="code" href="class_outgoing_data_queue.html">00142</a> <span class="keyword">class </span>__EXPORT OutgoingDataQueue:
<a name="l00143"></a>00143         <span class="keyword">public</span> <a class="code" href="class_outgoing_data_queue_base.html">OutgoingDataQueueBase</a>,
<a name="l00144"></a>00144         <span class="keyword">protected</span> DestinationListHandler
<a name="l00145"></a>00145 {
<a name="l00146"></a>00146 <span class="keyword">public</span>:
<a name="l00147"></a>00147         <span class="keywordtype">bool</span>
<a name="l00148"></a>00148         addDestination(<span class="keyword">const</span> InetHostAddress&amp; ia, 
<a name="l00149"></a>00149                        tpport_t dataPort = <a class="code" href="base_8h.html#a4">DefaultRTPDataPort</a>,
<a name="l00150"></a>00150                        tpport_t controlPort = 0);
<a name="l00151"></a>00151 
<a name="l00152"></a>00152         <span class="keywordtype">bool</span>
<a name="l00153"></a>00153         addDestination(<span class="keyword">const</span> InetMcastAddress&amp; ia, 
<a name="l00154"></a>00154                        tpport_t dataPort = <a class="code" href="base_8h.html#a4">DefaultRTPDataPort</a>,
<a name="l00155"></a>00155                        tpport_t controlPort = 0);
<a name="l00156"></a>00156 
<a name="l00157"></a>00157         <span class="keywordtype">bool</span>
<a name="l00158"></a>00158         forgetDestination(<span class="keyword">const</span> InetHostAddress&amp; ia, 
<a name="l00159"></a>00159                           tpport_t dataPort = <a class="code" href="base_8h.html#a4">DefaultRTPDataPort</a>,
<a name="l00160"></a>00160                           tpport_t controlPort = 0);
<a name="l00161"></a>00161 
<a name="l00162"></a>00162         <span class="keywordtype">bool</span>
<a name="l00163"></a>00163         forgetDestination(<span class="keyword">const</span> InetMcastAddress&amp; ia, 
<a name="l00164"></a>00164                           tpport_t dataPort = <a class="code" href="base_8h.html#a4">DefaultRTPDataPort</a>,
<a name="l00165"></a>00165                           tpport_t controlPort = 0);
<a name="l00166"></a>00166 
<a name="l00172"></a>00172         <span class="keywordtype">void</span>
<a name="l00173"></a>00173         addContributor(uint32 csrc);
<a name="l00174"></a>00174 
<a name="l00178"></a>00178         <span class="keywordtype">bool</span>
<a name="l00179"></a>00179         removeContributor(uint32 csrc);
<a name="l00180"></a>00180 
<a name="l00186"></a>00186         <span class="keywordtype">bool</span> 
<a name="l00187"></a>00187         isSending() <span class="keyword">const</span>;
<a name="l00188"></a>00188 
<a name="l00201"></a>00201         <span class="keywordtype">void</span>
<a name="l00202"></a>00202         putData(uint32 stamp, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* data = NULL, size_t len = 0);
<a name="l00203"></a>00203         
<a name="l00210"></a><a class="code" href="class_outgoing_data_queue.html#a8">00210</a>         <span class="keywordtype">void</span> setPadding(uint8 paddinglen)
<a name="l00211"></a>00211         { sendInfo.paddinglen = paddinglen; }
<a name="l00212"></a>00212 
<a name="l00221"></a><a class="code" href="class_outgoing_data_queue.html#a9">00221</a>         <span class="keywordtype">void</span> setMark(<span class="keywordtype">bool</span> mark)
<a name="l00222"></a>00222         { sendInfo.marked = mark; }
<a name="l00223"></a>00223 
<a name="l00227"></a><a class="code" href="class_outgoing_data_queue.html#a10">00227</a>         <span class="keyword">inline</span> <span class="keywordtype">bool</span> getMark()<span class="keyword"> const</span>
<a name="l00228"></a>00228 <span class="keyword">        </span>{ <span class="keywordflow">return</span> sendInfo.marked; }
<a name="l00229"></a>00229 
<a name="l00240"></a>00240         size_t 
<a name="l00241"></a>00241         setPartial(uint32 timestamp, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* data, size_t offset, size_t max);
<a name="l00242"></a>00242 
<a name="l00243"></a>00243         <span class="keyword">inline</span> <a class="code" href="base_8h.html#a2">microtimeout_t</a>
<a name="l00244"></a><a class="code" href="class_outgoing_data_queue.html#a12">00244</a>         getDefaultSchedulingTimeout()<span class="keyword"> const</span>
<a name="l00245"></a>00245 <span class="keyword">        </span>{ <span class="keywordflow">return</span> defaultSchedulingTimeout; }
<a name="l00246"></a>00246 
<a name="l00253"></a>00253         <span class="keyword">inline</span> <span class="keywordtype">void</span> 
<a name="l00254"></a><a class="code" href="class_outgoing_data_queue.html#a13">00254</a>         setSchedulingTimeout(<a class="code" href="base_8h.html#a2">microtimeout_t</a> to)
<a name="l00255"></a>00255         { schedulingTimeout = to; }
<a name="l00256"></a>00256 
<a name="l00257"></a>00257         <span class="keyword">inline</span> <a class="code" href="base_8h.html#a2">microtimeout_t</a>
<a name="l00258"></a><a class="code" href="class_outgoing_data_queue.html#a14">00258</a>         getDefaultExpireTimeout()<span class="keyword"> const</span>
<a name="l00259"></a>00259 <span class="keyword">        </span>{ <span class="keywordflow">return</span> defaultExpireTimeout; }
<a name="l00260"></a>00260 
<a name="l00268"></a>00268         <span class="keyword">inline</span> <span class="keywordtype">void</span> 
<a name="l00269"></a><a class="code" href="class_outgoing_data_queue.html#a15">00269</a>         setExpireTimeout(<a class="code" href="base_8h.html#a2">microtimeout_t</a> to)
<a name="l00270"></a>00270         { expireTimeout = to; }
<a name="l00271"></a>00271 
<a name="l00272"></a><a class="code" href="class_outgoing_data_queue.html#a16">00272</a>         <span class="keyword">inline</span> <a class="code" href="base_8h.html#a2">microtimeout_t</a> getExpireTimeout()<span class="keyword"> const</span>
<a name="l00273"></a>00273 <span class="keyword">        </span>{ <span class="keywordflow">return</span> expireTimeout; }
<a name="l00274"></a>00274 
<a name="l00280"></a>00280         <span class="keyword">inline</span> uint32
<a name="l00281"></a><a class="code" href="class_outgoing_data_queue.html#a17">00281</a>         getSendPacketCount()<span class="keyword"> const</span>
<a name="l00282"></a>00282 <span class="keyword">        </span>{ <span class="keywordflow">return</span> sendInfo.packetCount; }
<a name="l00283"></a>00283 
<a name="l00289"></a>00289         <span class="keyword">inline</span> uint32
<a name="l00290"></a><a class="code" href="class_outgoing_data_queue.html#a18">00290</a>         getSendOctetCount()<span class="keyword"> const</span>
<a name="l00291"></a>00291 <span class="keyword">        </span>{ <span class="keywordflow">return</span> sendInfo.octetCount; }
<a name="l00292"></a>00292 
<a name="l00293"></a>00293 <span class="keyword">protected</span>:
<a name="l00294"></a>00294         OutgoingDataQueue();
<a name="l00295"></a>00295 
<a name="l00296"></a><a class="code" href="class_outgoing_data_queue.html#b1">00296</a>         <span class="keyword">virtual</span> ~OutgoingDataQueue()
<a name="l00297"></a>00297         { }
<a name="l00298"></a>00298         
<a name="l00299"></a><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html">00299</a>         <span class="keyword">struct </span><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html">OutgoingRTPPktLink</a> 
<a name="l00300"></a>00300         {
<a name="l00301"></a><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html#a0">00301</a>                 <a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html">OutgoingRTPPktLink</a>(<a class="code" href="class_outgoing_r_t_p_pkt.html">OutgoingRTPPkt</a>* pkt,
<a name="l00302"></a>00302                                    <a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html">OutgoingRTPPktLink</a>* p, 
<a name="l00303"></a>00303                                    <a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html">OutgoingRTPPktLink</a>* n) :
<a name="l00304"></a>00304                         packet(pkt), prev(p), next(n) { }
<a name="l00305"></a>00305 
<a name="l00306"></a><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html#a1">00306</a>                 ~<a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html">OutgoingRTPPktLink</a>() { <span class="keyword">delete</span> packet; }
<a name="l00307"></a>00307 
<a name="l00308"></a><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html#a2">00308</a>                 <span class="keyword">inline</span> <a class="code" href="class_outgoing_r_t_p_pkt.html">OutgoingRTPPkt</a>* getPacket() { <span class="keywordflow">return</span> packet; }
<a name="l00309"></a>00309 
<a name="l00310"></a><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html#a3">00310</a>                 <span class="keyword">inline</span> <span class="keywordtype">void</span> setPacket(<a class="code" href="class_outgoing_r_t_p_pkt.html">OutgoingRTPPkt</a>* pkt) { packet = pkt; }
<a name="l00311"></a>00311                 
<a name="l00312"></a><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html#a4">00312</a>                 <span class="keyword">inline</span> <a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html">OutgoingRTPPktLink</a>* getPrev() { <span class="keywordflow">return</span> prev; }
<a name="l00313"></a>00313 
<a name="l00314"></a><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html#a5">00314</a>                 <span class="keyword">inline</span> <span class="keywordtype">void</span> setPrev(<a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html">OutgoingRTPPktLink</a>* p) { prev = p; }
<a name="l00315"></a>00315 
<a name="l00316"></a><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html#a6">00316</a>                 <span class="keyword">inline</span> <a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html">OutgoingRTPPktLink</a>* getNext() { <span class="keywordflow">return</span> next; }
<a name="l00317"></a>00317 
<a name="l00318"></a><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html#a7">00318</a>                 <span class="keyword">inline</span> <span class="keywordtype">void</span> setNext(<a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html">OutgoingRTPPktLink</a>* n) { next = n; }
<a name="l00319"></a>00319 
<a name="l00320"></a>00320                 <span class="comment">// the packet this link refers to.</span>
<a name="l00321"></a><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html#o0">00321</a>                 <a class="code" href="class_outgoing_r_t_p_pkt.html">OutgoingRTPPkt</a>* packet;
<a name="l00322"></a>00322                 <span class="comment">// global outgoing packets queue.</span>
<a name="l00323"></a><a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html#o1">00323</a>                 <a class="code" href="struct_outgoing_data_queue_1_1_outgoing_r_t_p_pkt_link.html">OutgoingRTPPktLink</a> * prev, * next;
<a name="l00324"></a>00324         };
<a name="l00325"></a>00325 
<a name="l00335"></a>00335         <a class="code" href="base_8h.html#a2">microtimeout_t</a>
<a name="l00336"></a>00336         getSchedulingTimeout();
<a name="l00337"></a>00337 
<a name="l00344"></a>00344         size_t
<a name="l00345"></a>00345         dispatchDataPacket();
<a name="l00346"></a>00346 
<a name="l00349"></a>00349         <span class="keyword">inline</span> <span class="keywordtype">void</span> 
<a name="l00350"></a><a class="code" href="class_outgoing_data_queue.html#b4">00350</a>         setInitialTimestamp(uint32 ts)
<a name="l00351"></a>00351         { initialTimestamp = ts; }
<a name="l00352"></a>00352 
<a name="l00355"></a>00355         <span class="keyword">inline</span> uint32 
<a name="l00356"></a><a class="code" href="class_outgoing_data_queue.html#b5">00356</a>         getInitialTimestamp()
<a name="l00357"></a>00357         { <span class="keywordflow">return</span> initialTimestamp; }
<a name="l00358"></a>00358 
<a name="l00359"></a>00359         <span class="keywordtype">void</span> purgeOutgoingQueue();
<a name="l00360"></a>00360 
<a name="l00361"></a>00361         <span class="keyword">virtual</span> <span class="keywordtype">void</span>
<a name="l00362"></a>00362         setControlPeer(<span class="keyword">const</span> InetAddress &amp;host, tpport_t port) = 0;
<a name="l00363"></a>00363 
<a name="l00364"></a>00364 <span class="keyword">private</span>:
<a name="l00370"></a>00370         <span class="keyword">inline</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> onExpireSend(<a class="code" href="class_outgoing_r_t_p_pkt.html">OutgoingRTPPkt</a>&amp;)
<a name="l00371"></a>00371         { }
<a name="l00372"></a>00372 
<a name="l00373"></a>00373         <span class="keyword">virtual</span> <span class="keywordtype">void</span>
<a name="l00374"></a>00374         setDataPeer(<span class="keyword">const</span> InetAddress &amp;host, tpport_t port) = 0;
<a name="l00375"></a>00375 
<a name="l00385"></a>00385         <span class="keyword">virtual</span> size_t
<a name="l00386"></a>00386         sendData(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> buffer, size_t len) = 0;
<a name="l00387"></a>00387 
<a name="l00388"></a>00388         <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="base_8h.html#a2">microtimeout_t</a> defaultSchedulingTimeout;
<a name="l00389"></a>00389         <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="base_8h.html#a2">microtimeout_t</a> defaultExpireTimeout;
<a name="l00390"></a>00390         <span class="keyword">mutable</span> ThreadLock sendLock;
<a name="l00391"></a>00391         <span class="comment">// outgoing data packets queue</span>
<a name="l00392"></a>00392         OutgoingRTPPktLink* sendFirst, * sendLast; 
<a name="l00393"></a>00393         uint32 initialTimestamp;
<a name="l00394"></a>00394         <span class="comment">// transmission scheduling timeout for the service thread</span>
<a name="l00395"></a>00395         <a class="code" href="base_8h.html#a2">microtimeout_t</a> schedulingTimeout;
<a name="l00396"></a>00396         <span class="comment">// how old a packet can reach in the sending queue before deletetion</span>
<a name="l00397"></a>00397         <a class="code" href="base_8h.html#a2">microtimeout_t</a> expireTimeout;
<a name="l00398"></a>00398 
<a name="l00399"></a>00399         <span class="keyword">struct </span>{
<a name="l00400"></a>00400                 <span class="comment">// number of packets sent from the beginning</span>
<a name="l00401"></a>00401                 uint32 packetCount;
<a name="l00402"></a>00402                 <span class="comment">// number of payload octets sent from the beginning</span>
<a name="l00403"></a>00403                 uint32 octetCount;
<a name="l00404"></a>00404                 <span class="comment">// the sequence number of the next packet to sent</span>
<a name="l00405"></a>00405                 uint16 sendSeq;
<a name="l00406"></a>00406                 <span class="comment">// contributing sources</span>
<a name="l00407"></a>00407                 uint32 sendSources[16];
<a name="l00408"></a>00408                 <span class="comment">// how many CSRCs to send.</span>
<a name="l00409"></a>00409                 uint16 sendCC;
<a name="l00410"></a>00410                 <span class="comment">// pad packets to a paddinglen multiple</span>
<a name="l00411"></a>00411                 uint8 paddinglen;
<a name="l00412"></a>00412                 <span class="comment">// This flags tells whether to set the bit M in the</span>
<a name="l00413"></a>00413                 <span class="comment">// RTP fixed header of the packet in which the next</span>
<a name="l00414"></a>00414                 <span class="comment">// provided data will be sent.</span>
<a name="l00415"></a>00415                 <span class="keywordtype">bool</span> marked;
<a name="l00416"></a>00416                 <span class="comment">// whether there was not loss.</span>
<a name="l00417"></a>00417                 <span class="keywordtype">bool</span> complete;
<a name="l00418"></a>00418                 <span class="comment">// ramdonly generated offset for the timestamp of sent packets</span>
<a name="l00419"></a>00419                 uint32 initialTimestamp;
<a name="l00420"></a>00420                 <span class="comment">// elapsed time accumulated through successive overflows of</span>
<a name="l00421"></a>00421                 <span class="comment">// the local timestamp field</span>
<a name="l00422"></a>00422                 timeval overflowTime;
<a name="l00423"></a>00423         } sendInfo;
<a name="l00424"></a>00424 };
<a name="l00425"></a>00425  <span class="comment">// oqueue</span>
<a name="l00427"></a>00427 
<a name="l00428"></a>00428 <span class="preprocessor">#ifdef  CCXX_NAMESPACES</span>
<a name="l00429"></a>00429 <span class="preprocessor"></span>}
<a name="l00430"></a>00430 <span class="preprocessor">#endif</span>
<a name="l00431"></a>00431 <span class="preprocessor"></span>
<a name="l00432"></a>00432 <span class="preprocessor">#endif  //CCXX_RTP_OQUEUE_H_</span>
<a name="l00433"></a>00433 <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&nbsp;
<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>