<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>jrtplib: src/extratransmitters/rtpfaketransmitter.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="jrtplib.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="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</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> <div class="navpath"><a class="el" href="dir_e5298977290e638844c8018a73ab0caf.html">src</a> » <a class="el" href="dir_9f44389111e2a2142ba03881644bce47.html">extratransmitters</a> </div> </div> <div class="contents"> <h1>rtpfaketransmitter.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"></span> <a name="l00003"></a>00003 <span class="comment"> This class allows for jrtp to process packets without sending them out </span> <a name="l00004"></a>00004 <span class="comment"> anywhere.</span> <a name="l00005"></a>00005 <span class="comment"> The incoming messages are handed in to jrtp through the TransmissionParams </span> <a name="l00006"></a>00006 <span class="comment"> and can be retreived from jrtp through the normal polling mecanisms.</span> <a name="l00007"></a>00007 <span class="comment"> The outgoing RTP/RTCP packets are given to jrtp through the normal</span> <a name="l00008"></a>00008 <span class="comment"> session->SendPacket() and those packets are handed back out to the</span> <a name="l00009"></a>00009 <span class="comment"> client through a callback function (packet_ready_cb).</span> <a name="l00010"></a>00010 <span class="comment"> </span> <a name="l00011"></a>00011 <span class="comment"> example usage : Allows for integration of RTP into gstreamer.</span> <a name="l00012"></a>00012 <span class="comment"> </span> <a name="l00013"></a>00013 <span class="comment"> Copyright (c) 2005 Philippe Khalaf <burger@speedy.org></span> <a name="l00014"></a>00014 <span class="comment"> </span> <a name="l00015"></a>00015 <span class="comment"> This file is a part of JRTPLIB</span> <a name="l00016"></a>00016 <span class="comment"> Copyright (c) 1999-2004 Jori Liesenborgs</span> <a name="l00017"></a>00017 <span class="comment"></span> <a name="l00018"></a>00018 <span class="comment"> Contact: jori.liesenborgs@gmail.com</span> <a name="l00019"></a>00019 <span class="comment"></span> <a name="l00020"></a>00020 <span class="comment"> This library was developed at the "Expertisecentrum Digitale Media"</span> <a name="l00021"></a>00021 <span class="comment"> (http://www.edm.luc.ac.be), a research center of the "Limburgs Universitair</span> <a name="l00022"></a>00022 <span class="comment"> Centrum" (http://www.luc.ac.be). The library is based upon work done for </span> <a name="l00023"></a>00023 <span class="comment"> my thesis at the School for Knowledge Technology (Belgium/The Netherlands).</span> <a name="l00024"></a>00024 <span class="comment"></span> <a name="l00025"></a>00025 <span class="comment"> Permission is hereby granted, free of charge, to any person obtaining a</span> <a name="l00026"></a>00026 <span class="comment"> copy of this software and associated documentation files (the "Software"),</span> <a name="l00027"></a>00027 <span class="comment"> to deal in the Software without restriction, including without limitation</span> <a name="l00028"></a>00028 <span class="comment"> the rights to use, copy, modify, merge, publish, distribute, sublicense,</span> <a name="l00029"></a>00029 <span class="comment"> and/or sell copies of the Software, and to permit persons to whom the</span> <a name="l00030"></a>00030 <span class="comment"> Software is furnished to do so, subject to the following conditions:</span> <a name="l00031"></a>00031 <span class="comment"></span> <a name="l00032"></a>00032 <span class="comment"> The above copyright notice and this permission notice shall be included</span> <a name="l00033"></a>00033 <span class="comment"> in all copies or substantial portions of the Software.</span> <a name="l00034"></a>00034 <span class="comment"></span> <a name="l00035"></a>00035 <span class="comment"> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS</span> <a name="l00036"></a>00036 <span class="comment"> OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span> <a name="l00037"></a>00037 <span class="comment"> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL</span> <a name="l00038"></a>00038 <span class="comment"> THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span> <a name="l00039"></a>00039 <span class="comment"> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span> <a name="l00040"></a>00040 <span class="comment"> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS</span> <a name="l00041"></a>00041 <span class="comment"> IN THE SOFTWARE.</span> <a name="l00042"></a>00042 <span class="comment"></span> <a name="l00043"></a>00043 <span class="comment">*/</span> <a name="l00044"></a>00044 <a name="l00045"></a>00045 <span class="preprocessor">#ifndef RTPFAKETRANSMITTER_H</span> <a name="l00046"></a>00046 <span class="preprocessor"></span> <a name="l00047"></a>00047 <span class="preprocessor">#define RTPFAKETRANSMITTER_H</span> <a name="l00048"></a>00048 <span class="preprocessor"></span> <a name="l00049"></a>00049 <span class="preprocessor">#include "rtpconfig.h"</span> <a name="l00050"></a>00050 <a name="l00051"></a>00051 <span class="preprocessor">#include "<a class="code" href="rtptransmitter_8h.html">rtptransmitter.h</a>"</span> <a name="l00052"></a>00052 <span class="preprocessor">#include "<a class="code" href="rtpipv4destination_8h.html">rtpipv4destination.h</a>"</span> <a name="l00053"></a>00053 <span class="preprocessor">#include "<a class="code" href="rtphashtable_8h.html">rtphashtable.h</a>"</span> <a name="l00054"></a>00054 <span class="preprocessor">#include "<a class="code" href="rtpkeyhashtable_8h.html">rtpkeyhashtable.h</a>"</span> <a name="l00055"></a>00055 <span class="preprocessor">#include <list></span> <a name="l00056"></a>00056 <a name="l00057"></a>00057 <span class="preprocessor">#ifdef RTP_SUPPORT_THREAD</span> <a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor"> #include <jmutex.h></span> <a name="l00059"></a>00059 <span class="preprocessor">#endif // RTP_SUPPORT_THREAD</span> <a name="l00060"></a>00060 <span class="preprocessor"></span> <a name="l00061"></a>00061 <span class="preprocessor">#define RTPFAKETRANS_HASHSIZE 8317</span> <a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#define RTPFAKETRANS_DEFAULTPORTBASE 5000</span> <a name="l00063"></a>00063 <span class="preprocessor"></span> <a name="l00064"></a>00064 <span class="comment">// Definition of a callback that is called when a packet is ready for sending</span> <a name="l00065"></a>00065 <span class="comment">// params (*data, data_len, dest_addr, dest_port, rtp [1 if rtp, 0 if rtcp])</span> <a name="l00066"></a>00066 <span class="keyword">typedef</span> void(*packet_ready_cb)(<span class="keywordtype">void</span>*, uint8_t*, uint16_t, uint32_t, uint16_t, <span class="keywordtype">int</span> rtp); <a name="l00067"></a>00067 <a name="l00068"></a>00068 <span class="keyword">class </span>RTPFakeTransmissionParams : <span class="keyword">public</span> <a class="code" href="classRTPTransmissionParams.html" title="Base class for transmission parameters.">RTPTransmissionParams</a> <a name="l00069"></a>00069 { <a name="l00070"></a>00070 <span class="keyword">public</span>: <a name="l00071"></a>00071 RTPFakeTransmissionParams():<a class="code" href="classRTPTransmissionParams.html" title="Base class for transmission parameters.">RTPTransmissionParams</a>(<a class="code" href="classRTPTransmitter.html" title="Abstract class from which actual transmission components should be derived.">RTPTransmitter</a>::UserDefinedProto) { portbase = RTPFAKETRANS_DEFAULTPORTBASE; bindIP = 0; multicastTTL = 1; currentdata = NULL;} <a name="l00072"></a>00072 <span class="keywordtype">void</span> SetBindIP(uint32_t ip) { bindIP = ip; } <a name="l00073"></a>00073 <span class="keywordtype">void</span> SetPortbase(uint16_t pbase) { portbase = pbase; } <a name="l00074"></a>00074 <span class="keywordtype">void</span> SetMulticastTTL(uint8_t mcastTTL) { multicastTTL = mcastTTL; } <a name="l00075"></a>00075 <span class="keywordtype">void</span> SetLocalIPList(std::list<uint32_t> &iplist) { localIPs = iplist; } <a name="l00076"></a>00076 <span class="keywordtype">void</span> ClearLocalIPList() { localIPs.clear(); } <a name="l00077"></a>00077 <span class="keywordtype">void</span> SetCurrentData(uint8_t *data) { currentdata = data; } <a name="l00078"></a>00078 <span class="keywordtype">void</span> SetCurrentDataLen(uint16_t len) { currentdatalen = len; } <a name="l00079"></a>00079 <span class="keywordtype">void</span> SetCurrentDataAddr(uint32_t addr) { currentdataaddr = addr; } <a name="l00080"></a>00080 <span class="keywordtype">void</span> SetCurrentDataPort(uint16_t port) { currentdataport = port; } <a name="l00081"></a>00081 <span class="keywordtype">void</span> SetCurrentDataType(<span class="keywordtype">bool</span> type) { currentdatatype = type; } <a name="l00082"></a>00082 <span class="keywordtype">void</span> SetPacketReadyCB(packet_ready_cb cb) { packetreadycb = cb; }; <a name="l00083"></a>00083 <span class="keywordtype">void</span> SetPacketReadyCBData(<span class="keywordtype">void</span> *data) { packetreadycbdata = data; }; <a name="l00084"></a>00084 uint32_t GetBindIP()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> bindIP; } <a name="l00085"></a>00085 uint16_t GetPortbase()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> portbase; } <a name="l00086"></a>00086 uint8_t GetMulticastTTL()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> multicastTTL; } <a name="l00087"></a>00087 <span class="keyword">const</span> std::list<uint32_t> &GetLocalIPList()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> localIPs; } <a name="l00088"></a>00088 uint8_t* GetCurrentData()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> currentdata; } <a name="l00089"></a>00089 uint16_t GetCurrentDataLen()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> currentdatalen; } <a name="l00090"></a>00090 uint32_t GetCurrentDataAddr()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> currentdataaddr; } <a name="l00091"></a>00091 uint16_t GetCurrentDataPort()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> currentdataport; } <a name="l00092"></a>00092 <span class="keywordtype">bool</span> GetCurrentDataType()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> currentdatatype; } <a name="l00093"></a>00093 packet_ready_cb GetPacketReadyCB()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> packetreadycb; } <a name="l00094"></a>00094 <span class="keywordtype">void</span>* GetPacketReadyCBData()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> packetreadycbdata; } <a name="l00095"></a>00095 <span class="keyword">private</span>: <a name="l00096"></a>00096 uint16_t portbase; <a name="l00097"></a>00097 uint32_t bindIP; <a name="l00098"></a>00098 std::list<uint32_t> localIPs; <a name="l00099"></a>00099 uint8_t multicastTTL; <a name="l00100"></a>00100 uint8_t* currentdata; <a name="l00101"></a>00101 uint16_t currentdatalen; <a name="l00102"></a>00102 uint32_t currentdataaddr; <a name="l00103"></a>00103 uint16_t currentdataport; <a name="l00104"></a>00104 <span class="keywordtype">bool</span> currentdatatype; <a name="l00105"></a>00105 packet_ready_cb packetreadycb; <a name="l00106"></a>00106 <span class="keywordtype">void</span> *packetreadycbdata; <a name="l00107"></a>00107 }; <a name="l00108"></a>00108 <a name="l00109"></a>00109 <span class="keyword">class </span>RTPFakeTransmissionInfo : <span class="keyword">public</span> <a class="code" href="classRTPTransmissionInfo.html" title="Base class for additional information about the transmitter.">RTPTransmissionInfo</a> <a name="l00110"></a>00110 { <a name="l00111"></a>00111 <span class="keyword">public</span>: <a name="l00112"></a>00112 RTPFakeTransmissionInfo(std::list<uint32_t> iplist, <a name="l00113"></a>00113 RTPFakeTransmissionParams *transparams) : <a name="l00114"></a>00114 <a class="code" href="classRTPTransmissionInfo.html" title="Base class for additional information about the transmitter.">RTPTransmissionInfo</a>(<a class="code" href="classRTPTransmitter.html" title="Abstract class from which actual transmission components should be derived.">RTPTransmitter</a>::UserDefinedProto) <a name="l00115"></a>00115 { localIPlist = iplist; params = transparams; } <a name="l00116"></a>00116 <a name="l00117"></a>00117 ~RTPFakeTransmissionInfo() { } <a name="l00118"></a>00118 std::list<uint32_t> GetLocalIPList()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> localIPlist; } <a name="l00119"></a>00119 RTPFakeTransmissionParams* GetTransParams() { <span class="keywordflow">return</span> params; } <a name="l00120"></a>00120 <span class="keyword">private</span>: <a name="l00121"></a>00121 std::list<uint32_t> localIPlist; <a name="l00122"></a>00122 RTPFakeTransmissionParams *params; <a name="l00123"></a>00123 }; <a name="l00124"></a>00124 <a name="l00125"></a>00125 <span class="keyword">class </span>RTPFakeTrans_GetHashIndex_IPv4Dest <a name="l00126"></a>00126 { <a name="l00127"></a>00127 <span class="keyword">public</span>: <a name="l00128"></a>00128 <span class="keyword">static</span> <span class="keywordtype">int</span> GetIndex(<span class="keyword">const</span> RTPIPv4Destination &d) { <span class="keywordflow">return</span> d.GetIP()%RTPFAKETRANS_HASHSIZE; } <a name="l00129"></a>00129 }; <a name="l00130"></a>00130 <a name="l00131"></a>00131 <span class="keyword">class </span>RTPFakeTrans_GetHashIndex_uint32_t <a name="l00132"></a>00132 { <a name="l00133"></a>00133 <span class="keyword">public</span>: <a name="l00134"></a>00134 <span class="keyword">static</span> <span class="keywordtype">int</span> GetIndex(<span class="keyword">const</span> uint32_t &k) { <span class="keywordflow">return</span> k%RTPFAKETRANS_HASHSIZE; } <a name="l00135"></a>00135 }; <a name="l00136"></a>00136 <a name="l00137"></a>00137 <span class="preprocessor">#define RTPFAKETRANS_HEADERSIZE (20+8)</span> <a name="l00138"></a>00138 <span class="preprocessor"></span> <a name="l00139"></a>00139 <span class="keyword">class </span>RTPFakeTransmitter : <span class="keyword">public</span> <a class="code" href="classRTPTransmitter.html" title="Abstract class from which actual transmission components should be derived.">RTPTransmitter</a> <a name="l00140"></a>00140 { <a name="l00141"></a>00141 <span class="keyword">public</span>: <a name="l00142"></a>00142 RTPFakeTransmitter(<a class="code" href="classRTPMemoryManager.html" title="A memory manager.">RTPMemoryManager</a> *mgr); <a name="l00143"></a>00143 ~RTPFakeTransmitter(); <a name="l00144"></a>00144 <a name="l00145"></a>00145 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#8c51729221ae8a27cd327598a5cff7a1" title="This function must be called before the transmission component can be used.">Init</a>(<span class="keywordtype">bool</span> treadsafe); <a name="l00146"></a>00146 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#32e7024c43447887422009e5d7ae928d" title="Prepares the component to be used.">Create</a>(<span class="keywordtype">size_t</span> maxpacksize,<span class="keyword">const</span> <a class="code" href="classRTPTransmissionParams.html" title="Base class for transmission parameters.">RTPTransmissionParams</a> *transparams); <a name="l00147"></a>00147 <span class="keywordtype">void</span> <a class="code" href="classRTPTransmitter.html#b1b7a3f9ba045e4badcda10a9c274ccd" title="By calling this function, buffers are cleared and the component cannot be used anymore...">Destroy</a>(); <a name="l00148"></a>00148 <a class="code" href="classRTPTransmissionInfo.html" title="Base class for additional information about the transmitter.">RTPTransmissionInfo</a> *<a class="code" href="classRTPTransmitter.html#c6e8e09ca732f76f4b7a531e592700e4" title="Returns additional information about the transmitter.">GetTransmissionInfo</a>(); <a name="l00149"></a>00149 <a name="l00150"></a>00150 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#09e113ec309ffd7b28b0ef531355baac" title="Looks up the local host name.">GetLocalHostName</a>(uint8_t *buffer,<span class="keywordtype">size_t</span> *bufferlength); <a name="l00151"></a>00151 <span class="keywordtype">bool</span> <a class="code" href="classRTPTransmitter.html#303b9ce5733c8279228b2dcac248f013" title="Returns true if the address specified by addr is one of the addresses of the transmitter...">ComesFromThisTransmitter</a>(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> *addr); <a name="l00152"></a>00152 <span class="keywordtype">size_t</span> <a class="code" href="classRTPTransmitter.html#d96879b560b05db868a4e66afff5712c" title="Returns the amount of bytes that will be added to the RTP packet by the underlying...">GetHeaderOverhead</a>() { <span class="keywordflow">return</span> RTPFAKETRANS_HEADERSIZE; } <a name="l00153"></a>00153 <a name="l00154"></a>00154 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#72963cd613bf7f54ce54811cd6f41e1d" title="Checks for incoming data and stores it.">Poll</a>(); <a name="l00155"></a>00155 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#295b8b83135cbefa9d93c28afe86fcd0" title="Waits until incoming data is detected.">WaitForIncomingData</a>(<span class="keyword">const</span> <a class="code" href="classRTPTime.html" title="This class is used to specify wallclock time, delay intervals etc.">RTPTime</a> &delay,<span class="keywordtype">bool</span> *dataavailable = 0); <a name="l00156"></a>00156 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#4e32264c5c12c5a7b05bce28baa430f6" title="If the previous function has been called, this one aborts the waiting.">AbortWait</a>(); <a name="l00157"></a>00157 <a name="l00158"></a>00158 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#4a9300acce9b60cf5012a91167465c81" title="Send a packet with length len containing data to all RTP addresses of the current...">SendRTPData</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *data,<span class="keywordtype">size_t</span> len); <a name="l00159"></a>00159 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#1a4b449c3aa5a6f9073e777d3a916dd4" title="Send a packet with length len containing data to all RTCP addresses of the current...">SendRTCPData</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *data,<span class="keywordtype">size_t</span> len); <a name="l00160"></a>00160 <a name="l00161"></a>00161 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#5709df859a09e775fbe0cb65d8e93463" title="Adds the address specified by addr to the list of destinations.">AddDestination</a>(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &addr); <a name="l00162"></a>00162 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#649983247fd0de0c49c9bad132078804" title="Deletes the address specified by addr from the list of destinations.">DeleteDestination</a>(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &addr); <a name="l00163"></a>00163 <span class="keywordtype">void</span> <a class="code" href="classRTPTransmitter.html#c547678e9164628a5f0a6897d2340704" title="Clears the list of destinations.">ClearDestinations</a>(); <a name="l00164"></a>00164 <a name="l00165"></a>00165 <span class="keywordtype">bool</span> <a class="code" href="classRTPTransmitter.html#b35f318dfb9e02813ed45bb8550fee6a" title="Returns true if the transmission component supports multicasting.">SupportsMulticasting</a>(); <a name="l00166"></a>00166 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#d817b4f899689f87da9767854d29e4cb" title="Joins the multicast group specified by addr.">JoinMulticastGroup</a>(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &addr); <a name="l00167"></a>00167 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#dc3c7c9622ae8b5df6df624c9ab3cd16" title="Leaves the multicast group specified by addr.">LeaveMulticastGroup</a>(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &addr); <a name="l00168"></a>00168 <span class="keywordtype">void</span> <a class="code" href="classRTPTransmitter.html#00d6f1346124aec45cef57a67f041234" title="Leaves all the multicast groups that have been joined.">LeaveAllMulticastGroups</a>(); <a name="l00169"></a>00169 <a name="l00170"></a>00170 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#fd33f5ca2046f0d08a21ff6e5fa6c99e" title="Sets the receive mode.">SetReceiveMode</a>(<a class="code" href="classRTPTransmitter.html#bae77e9adf52db77f5ea29757dfa6386" title="Three kind of receive modes can be specified.">RTPTransmitter::ReceiveMode</a> m); <a name="l00171"></a>00171 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#53fca7150678471685f6bc046c6f0ca2" title="Adds addr to the list of addresses to ignore.">AddToIgnoreList</a>(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &addr); <a name="l00172"></a>00172 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#62b670aed033a21338dff518e9c757ce" title="Deletes addr from the list of addresses to accept.">DeleteFromIgnoreList</a>(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &addr); <a name="l00173"></a>00173 <span class="keywordtype">void</span> <a class="code" href="classRTPTransmitter.html#3862dc2a8b8571bb24b800d81f30299d" title="Clears the list of addresses to ignore.">ClearIgnoreList</a>(); <a name="l00174"></a>00174 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#96fda0a5e6b7484d295bb0b291720eb2" title="Adds addr to the list of addresses to accept.">AddToAcceptList</a>(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &addr); <a name="l00175"></a>00175 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#72a8ca0bf9bbb12325d882a77ec4dcc8" title="Deletes addr from the list of addresses to accept.">DeleteFromAcceptList</a>(<span class="keyword">const</span> <a class="code" href="classRTPAddress.html" title="This class is an abstract class which is used to specify destinations, multicast...">RTPAddress</a> &addr); <a name="l00176"></a>00176 <span class="keywordtype">void</span> <a class="code" href="classRTPTransmitter.html#d1cd475c302925e145966290e286a69e" title="Clears the list of addresses to accept.">ClearAcceptList</a>(); <a name="l00177"></a>00177 <span class="keywordtype">int</span> <a class="code" href="classRTPTransmitter.html#81cad761ff649079f7d6285183f31455" title="Sets the maximum packet size which the transmitter should allow to s.">SetMaximumPacketSize</a>(<span class="keywordtype">size_t</span> s); <a name="l00178"></a>00178 <a name="l00179"></a>00179 <span class="keywordtype">bool</span> <a class="code" href="classRTPTransmitter.html#cb8f396cfd48d52134b7b090e6963c32" title="Returns true if packets can be obtained using the GetNextPacket member function.">NewDataAvailable</a>(); <a name="l00180"></a>00180 <a class="code" href="classRTPRawPacket.html" title="This class is used by the transmission component to store the incoming RTP and RTCP...">RTPRawPacket</a> *<a class="code" href="classRTPTransmitter.html#12ae1a197dd8b59d99e16d39e5159beb" title="Returns the raw data of a received RTP packet (received during the Poll function)...">GetNextPacket</a>(); <a name="l00181"></a>00181 <span class="preprocessor">#ifdef RTPDEBUG</span> <a name="l00182"></a>00182 <span class="preprocessor"></span> <span class="keywordtype">void</span> Dump(); <a name="l00183"></a>00183 <span class="preprocessor">#endif // RTPDEBUG</span> <a name="l00184"></a>00184 <span class="preprocessor"></span><span class="keyword">private</span>: <a name="l00185"></a>00185 <span class="keywordtype">int</span> CreateLocalIPList(); <a name="l00186"></a>00186 <span class="keywordtype">bool</span> GetLocalIPList_Interfaces(); <a name="l00187"></a>00187 <span class="keywordtype">void</span> GetLocalIPList_DNS(); <a name="l00188"></a>00188 <span class="keywordtype">void</span> AddLoopbackAddress(); <a name="l00189"></a>00189 <span class="keywordtype">void</span> FlushPackets(); <a name="l00190"></a>00190 <span class="keywordtype">int</span> FakePoll(); <a name="l00191"></a>00191 <span class="keywordtype">int</span> ProcessAddAcceptIgnoreEntry(uint32_t ip,uint16_t port); <a name="l00192"></a>00192 <span class="keywordtype">int</span> ProcessDeleteAcceptIgnoreEntry(uint32_t ip,uint16_t port); <a name="l00193"></a>00193 <span class="preprocessor">#ifdef RTP_SUPPORT_IPV4MULTICAST</span> <a name="l00194"></a>00194 <span class="preprocessor"></span> <span class="keywordtype">bool</span> SetMulticastTTL(uint8_t ttl); <a name="l00195"></a>00195 <span class="preprocessor">#endif // RTP_SUPPORT_IPV4MULTICAST</span> <a name="l00196"></a>00196 <span class="preprocessor"></span> <span class="keywordtype">bool</span> ShouldAcceptData(uint32_t srcip,uint16_t srcport); <a name="l00197"></a>00197 <span class="keywordtype">void</span> ClearAcceptIgnoreInfo(); <a name="l00198"></a>00198 <a name="l00199"></a>00199 RTPFakeTransmissionParams *params; <a name="l00200"></a>00200 <span class="keywordtype">bool</span> init; <a name="l00201"></a>00201 <span class="keywordtype">bool</span> created; <a name="l00202"></a>00202 <span class="keywordtype">bool</span> waitingfordata; <a name="l00203"></a>00203 std::list<uint32_t> localIPs; <a name="l00204"></a>00204 uint16_t portbase; <a name="l00205"></a>00205 uint8_t multicastTTL; <a name="l00206"></a>00206 <a class="code" href="classRTPTransmitter.html#bae77e9adf52db77f5ea29757dfa6386" title="Three kind of receive modes can be specified.">RTPTransmitter::ReceiveMode</a> receivemode; <a name="l00207"></a>00207 <a name="l00208"></a>00208 uint8_t *localhostname; <a name="l00209"></a>00209 <span class="keywordtype">size_t</span> localhostnamelength; <a name="l00210"></a>00210 <a name="l00211"></a>00211 RTPHashTable<const RTPIPv4Destination,RTPFakeTrans_GetHashIndex_IPv4Dest,RTPFAKETRANS_HASHSIZE> destinations; <a name="l00212"></a>00212 <span class="preprocessor">#ifdef RTP_SUPPORT_IPV4MULTICAST</span> <a name="l00213"></a>00213 <span class="preprocessor"></span><span class="comment">// RTPHashTable<const uint32_t,RTPFakeTrans_GetHashIndex_uint32_t,RTPFAKETRANS_HASHSIZE> multicastgroups;</span> <a name="l00214"></a>00214 <span class="preprocessor">#endif // RTP_SUPPORT_IPV4MULTICAST</span> <a name="l00215"></a>00215 <span class="preprocessor"></span> std::list<RTPRawPacket*> rawpacketlist; <a name="l00216"></a>00216 <a name="l00217"></a>00217 <span class="keywordtype">bool</span> supportsmulticasting; <a name="l00218"></a>00218 <span class="keywordtype">size_t</span> maxpacksize; <a name="l00219"></a>00219 <a name="l00220"></a>00220 <span class="keyword">class </span>PortInfo <a name="l00221"></a>00221 { <a name="l00222"></a>00222 <span class="keyword">public</span>: <a name="l00223"></a>00223 PortInfo() { all = <span class="keyword">false</span>; } <a name="l00224"></a>00224 <a name="l00225"></a>00225 <span class="keywordtype">bool</span> all; <a name="l00226"></a>00226 std::list<uint16_t> portlist; <a name="l00227"></a>00227 }; <a name="l00228"></a>00228 <a name="l00229"></a>00229 RTPKeyHashTable<const uint32_t,PortInfo*,RTPFakeTrans_GetHashIndex_uint32_t,RTPFAKETRANS_HASHSIZE> acceptignoreinfo; <a name="l00230"></a>00230 <a name="l00231"></a>00231 <span class="keywordtype">int</span> CreateAbortDescriptors(); <a name="l00232"></a>00232 <span class="keywordtype">void</span> DestroyAbortDescriptors(); <a name="l00233"></a>00233 <span class="keywordtype">void</span> AbortWaitInternal(); <a name="l00234"></a>00234 <span class="preprocessor">#ifdef RTP_SUPPORT_THREAD</span> <a name="l00235"></a>00235 <span class="preprocessor"></span> JMutex mainmutex,waitmutex; <a name="l00236"></a>00236 <span class="keywordtype">int</span> threadsafe; <a name="l00237"></a>00237 <span class="preprocessor">#endif // RTP_SUPPORT_THREAD</span> <a name="l00238"></a>00238 <span class="preprocessor"></span>}; <a name="l00239"></a>00239 <a name="l00240"></a>00240 <span class="preprocessor">#endif // RTPFakeTRANSMITTER_H</span> <a name="l00241"></a>00241 <span class="preprocessor"></span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Sun Jul 26 09:42:07 2009 for jrtplib 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>