<!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/rtppacketbuilder.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> </div> </div> <div class="contents"> <h1>rtppacketbuilder.h</h1><a href="rtppacketbuilder_8h.html">Go to the documentation of this file.</a><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 file is a part of JRTPLIB</span> <a name="l00004"></a>00004 <span class="comment"> Copyright (c) 1999-2007 Jori Liesenborgs</span> <a name="l00005"></a>00005 <span class="comment"></span> <a name="l00006"></a>00006 <span class="comment"> Contact: jori.liesenborgs@gmail.com</span> <a name="l00007"></a>00007 <span class="comment"></span> <a name="l00008"></a>00008 <span class="comment"> This library was developed at the "Expertisecentrum Digitale Media"</span> <a name="l00009"></a>00009 <span class="comment"> (http://www.edm.uhasselt.be), a research center of the Hasselt University</span> <a name="l00010"></a>00010 <span class="comment"> (http://www.uhasselt.be). The library is based upon work done for </span> <a name="l00011"></a>00011 <span class="comment"> my thesis at the School for Knowledge Technology (Belgium/The Netherlands).</span> <a name="l00012"></a>00012 <span class="comment"></span> <a name="l00013"></a>00013 <span class="comment"> Permission is hereby granted, free of charge, to any person obtaining a</span> <a name="l00014"></a>00014 <span class="comment"> copy of this software and associated documentation files (the "Software"),</span> <a name="l00015"></a>00015 <span class="comment"> to deal in the Software without restriction, including without limitation</span> <a name="l00016"></a>00016 <span class="comment"> the rights to use, copy, modify, merge, publish, distribute, sublicense,</span> <a name="l00017"></a>00017 <span class="comment"> and/or sell copies of the Software, and to permit persons to whom the</span> <a name="l00018"></a>00018 <span class="comment"> Software is furnished to do so, subject to the following conditions:</span> <a name="l00019"></a>00019 <span class="comment"></span> <a name="l00020"></a>00020 <span class="comment"> The above copyright notice and this permission notice shall be included</span> <a name="l00021"></a>00021 <span class="comment"> in all copies or substantial portions of the Software.</span> <a name="l00022"></a>00022 <span class="comment"></span> <a name="l00023"></a>00023 <span class="comment"> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS</span> <a name="l00024"></a>00024 <span class="comment"> OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span> <a name="l00025"></a>00025 <span class="comment"> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL</span> <a name="l00026"></a>00026 <span class="comment"> THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span> <a name="l00027"></a>00027 <span class="comment"> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span> <a name="l00028"></a>00028 <span class="comment"> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS</span> <a name="l00029"></a>00029 <span class="comment"> IN THE SOFTWARE.</span> <a name="l00030"></a>00030 <span class="comment"></span> <a name="l00031"></a>00031 <span class="comment">*/</span> <a name="l00032"></a>00032 <a name="l00037"></a>00037 <span class="preprocessor">#ifndef RTPPACKETBUILDER_H</span> <a name="l00038"></a>00038 <span class="preprocessor"></span> <a name="l00039"></a>00039 <span class="preprocessor">#define RTPPACKETBUILDER_H</span> <a name="l00040"></a>00040 <span class="preprocessor"></span> <a name="l00041"></a>00041 <span class="preprocessor">#include "rtpconfig.h"</span> <a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="rtperrors_8h.html">rtperrors.h</a>"</span> <a name="l00043"></a>00043 <span class="preprocessor">#include "rtpdefines.h"</span> <a name="l00044"></a>00044 <span class="preprocessor">#include "<a class="code" href="rtprandom_8h.html">rtprandom.h</a>"</span> <a name="l00045"></a>00045 <span class="preprocessor">#include "<a class="code" href="rtptimeutilities_8h.html">rtptimeutilities.h</a>"</span> <a name="l00046"></a>00046 <span class="preprocessor">#include "rtptypes.h"</span> <a name="l00047"></a>00047 <span class="preprocessor">#include "<a class="code" href="rtpmemoryobject_8h.html">rtpmemoryobject.h</a>"</span> <a name="l00048"></a>00048 <a name="l00049"></a>00049 <span class="keyword">class </span><a class="code" href="classRTPSources.html" title="Represents a table in which information about the participating sources is kept.">RTPSources</a>; <a name="l00050"></a>00050 <a name="l00054"></a><a class="code" href="classRTPPacketBuilder.html">00054</a> <span class="keyword">class </span><a class="code" href="classRTPPacketBuilder.html" title="This class can be used to build RTP packets and is a bit more high-level than the...">RTPPacketBuilder</a> : <span class="keyword">public</span> RTPMemoryObject <a name="l00055"></a>00055 { <a name="l00056"></a>00056 <span class="keyword">public</span>: <a name="l00058"></a>00058 <a class="code" href="classRTPPacketBuilder.html#1cca304b7b33c856451df793d6a256d8" title="Constructs an instance, optionally installing a memory manager.">RTPPacketBuilder</a>(<a class="code" href="classRTPMemoryManager.html" title="A memory manager.">RTPMemoryManager</a> *mgr = 0); <a name="l00059"></a>00059 ~<a class="code" href="classRTPPacketBuilder.html" title="This class can be used to build RTP packets and is a bit more high-level than the...">RTPPacketBuilder</a>(); <a name="l00060"></a>00060 <a name="l00062"></a>00062 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#35ef7e6902a2989ea703fd5e6ab24d20" title="Initializes the builder to only allow packets with a size below maxpacksize.">Init</a>(<span class="keywordtype">size_t</span> maxpacksize); <a name="l00063"></a>00063 <a name="l00065"></a>00065 <span class="keywordtype">void</span> <a class="code" href="classRTPPacketBuilder.html#d632d172cb70292482dce76606e05a63" title="Cleans up the builder.">Destroy</a>(); <a name="l00066"></a>00066 <a name="l00068"></a><a class="code" href="classRTPPacketBuilder.html#a09733d471778f9c5c1bbc996a2da3e6">00068</a> uint32_t <a class="code" href="classRTPPacketBuilder.html#a09733d471778f9c5c1bbc996a2da3e6" title="Returns the number of packets which have been created with the current SSRC identifier...">GetPacketCount</a>() { <span class="keywordflow">if</span> (!init) <span class="keywordflow">return</span> 0; <span class="keywordflow">return</span> numpackets; } <a name="l00069"></a>00069 <a name="l00071"></a><a class="code" href="classRTPPacketBuilder.html#d6562f0c7d552fcdba3717cb5c33cda3">00071</a> uint32_t <a class="code" href="classRTPPacketBuilder.html#d6562f0c7d552fcdba3717cb5c33cda3" title="Returns the number of payload octets which have been generated with this SSRC identifier...">GetPayloadOctetCount</a>() { <span class="keywordflow">if</span> (!init) <span class="keywordflow">return</span> 0; <span class="keywordflow">return</span> numpayloadbytes; } <a name="l00072"></a>00072 <a name="l00074"></a>00074 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#dca5aa0b7fb9b2b2a4438700125f3dbc" title="Sets the maximum allowed packet size to maxpacksize.">SetMaximumPacketSize</a>(<span class="keywordtype">size_t</span> maxpacksize); <a name="l00075"></a>00075 <a name="l00077"></a>00077 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#40bd89aa2e7f81dabfa180ac6df9078a" title="Adds a CSRC to the CSRC list which will be stored in the RTP packets.">AddCSRC</a>(uint32_t csrc); <a name="l00078"></a>00078 <a name="l00080"></a>00080 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#e3c25ffb6177a9ec47c8841926c29123" title="Deletes a CSRC from the list which will be stored in the RTP packets.">DeleteCSRC</a>(uint32_t csrc); <a name="l00081"></a>00081 <a name="l00083"></a>00083 <span class="keywordtype">void</span> <a class="code" href="classRTPPacketBuilder.html#b6e3deea05e79a38326f667b5203b8d9" title="Clears the CSRC list.">ClearCSRCList</a>(); <a name="l00084"></a>00084 <a name="l00090"></a>00090 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#b9d6358047aa6f672934b9970203abe7" title="Builds a packet with payload data and payload length len.">BuildPacket</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *data,<span class="keywordtype">size_t</span> len); <a name="l00091"></a>00091 <a name="l00097"></a>00097 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#b9d6358047aa6f672934b9970203abe7" title="Builds a packet with payload data and payload length len.">BuildPacket</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *data,<span class="keywordtype">size_t</span> len, <a name="l00098"></a>00098 uint8_t pt,<span class="keywordtype">bool</span> mark,uint32_t timestampinc); <a name="l00099"></a>00099 <a name="l00107"></a>00107 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#28eee3947cda6e77443af2a1451a0598" title="Builds a packet with payload data and payload length len.">BuildPacketEx</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *data,<span class="keywordtype">size_t</span> len, <a name="l00108"></a>00108 uint16_t hdrextID,<span class="keyword">const</span> <span class="keywordtype">void</span> *hdrextdata,<span class="keywordtype">size_t</span> numhdrextwords); <a name="l00109"></a>00109 <a name="l00117"></a>00117 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#28eee3947cda6e77443af2a1451a0598" title="Builds a packet with payload data and payload length len.">BuildPacketEx</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *data,<span class="keywordtype">size_t</span> len, <a name="l00118"></a>00118 uint8_t pt,<span class="keywordtype">bool</span> mark,uint32_t timestampinc, <a name="l00119"></a>00119 uint16_t hdrextID,<span class="keyword">const</span> <span class="keywordtype">void</span> *hdrextdata,<span class="keywordtype">size_t</span> numhdrextwords); <a name="l00120"></a>00120 <a name="l00122"></a><a class="code" href="classRTPPacketBuilder.html#630309a0e2c31a445fa3b471773406e0">00122</a> uint8_t *<a class="code" href="classRTPPacketBuilder.html#630309a0e2c31a445fa3b471773406e0" title="Returns a pointer to the last built RTP packet data.">GetPacket</a>() { <span class="keywordflow">if</span> (!init) <span class="keywordflow">return</span> 0; <span class="keywordflow">return</span> buffer; } <a name="l00123"></a>00123 <a name="l00125"></a><a class="code" href="classRTPPacketBuilder.html#d8fa2dfd0720c903ac95956675d5cc50">00125</a> <span class="keywordtype">size_t</span> <a class="code" href="classRTPPacketBuilder.html#d8fa2dfd0720c903ac95956675d5cc50" title="Returns the size of the last built RTP packet.">GetPacketLength</a>() { <span class="keywordflow">if</span> (!init) <span class="keywordflow">return</span> 0; <span class="keywordflow">return</span> packetlength; } <a name="l00126"></a>00126 <a name="l00128"></a>00128 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#a713acfe5447ffd0f2a539a062fbeb27" title="Sets the default payload type to pt.">SetDefaultPayloadType</a>(uint8_t pt); <a name="l00129"></a>00129 <a name="l00131"></a>00131 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#5da6e98e894a905b9e66b89c304490ea" title="Sets the default marker bit to m.">SetDefaultMark</a>(<span class="keywordtype">bool</span> m); <a name="l00132"></a>00132 <a name="l00134"></a>00134 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#6381a48da1ebd92908398441838b0149" title="Sets the default timestamp increment to timestampinc.">SetDefaultTimestampIncrement</a>(uint32_t timestampinc); <a name="l00135"></a>00135 <a name="l00142"></a>00142 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#1996ad636555cbc0ace3fb4f9e537daa" title="This function increments the timestamp with the amount given by inc.">IncrementTimestamp</a>(uint32_t inc); <a name="l00143"></a>00143 <a name="l00151"></a>00151 <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#c17fe90b7139934d21c5eff152ec01df" title="This function increments the timestamp with the amount given set by the SetDefaultTimestampIncrement...">IncrementTimestampDefault</a>(); <a name="l00152"></a>00152 <a name="l00157"></a>00157 uint32_t <a class="code" href="classRTPPacketBuilder.html#056c60ac517578510294568fa80469b8" title="Creates a new SSRC to be used in generated packets.">CreateNewSSRC</a>(); <a name="l00158"></a>00158 <a name="l00164"></a>00164 uint32_t <a class="code" href="classRTPPacketBuilder.html#056c60ac517578510294568fa80469b8" title="Creates a new SSRC to be used in generated packets.">CreateNewSSRC</a>(<a class="code" href="classRTPSources.html" title="Represents a table in which information about the participating sources is kept.">RTPSources</a> &sources); <a name="l00165"></a>00165 <a name="l00167"></a><a class="code" href="classRTPPacketBuilder.html#64d1dcc63d2350004854b7847fea5570">00167</a> uint32_t <a class="code" href="classRTPPacketBuilder.html#64d1dcc63d2350004854b7847fea5570" title="Returns the current SSRC identifier.">GetSSRC</a>()<span class="keyword"> const </span>{ <span class="keywordflow">if</span> (!init) <span class="keywordflow">return</span> 0; <span class="keywordflow">return</span> ssrc; } <a name="l00168"></a>00168 <a name="l00170"></a><a class="code" href="classRTPPacketBuilder.html#80aea7e439452d0c96611e0ed56fdbd8">00170</a> uint32_t <a class="code" href="classRTPPacketBuilder.html#80aea7e439452d0c96611e0ed56fdbd8" title="Returns the current RTP timestamp.">GetTimestamp</a>()<span class="keyword"> const </span>{ <span class="keywordflow">if</span> (!init) <span class="keywordflow">return</span> 0; <span class="keywordflow">return</span> timestamp; } <a name="l00171"></a>00171 <a name="l00173"></a><a class="code" href="classRTPPacketBuilder.html#53851e2b60dc7bc492be9f74ba009671">00173</a> uint16_t <a class="code" href="classRTPPacketBuilder.html#53851e2b60dc7bc492be9f74ba009671" title="Returns the current sequence number.">GetSequenceNumber</a>()<span class="keyword"> const </span>{ <span class="keywordflow">if</span> (!init) <span class="keywordflow">return</span> 0; <span class="keywordflow">return</span> seqnr; } <a name="l00174"></a>00174 <a name="l00179"></a><a class="code" href="classRTPPacketBuilder.html#e903f218a55b42dcccb81e6ef62b825c">00179</a> <a class="code" href="classRTPTime.html" title="This class is used to specify wallclock time, delay intervals etc.">RTPTime</a> <a class="code" href="classRTPPacketBuilder.html#e903f218a55b42dcccb81e6ef62b825c" title="Returns the time at which a packet was generated.">GetPacketTime</a>()<span class="keyword"> const </span>{ <span class="keywordflow">if</span> (!init) <span class="keywordflow">return</span> <a class="code" href="classRTPTime.html" title="This class is used to specify wallclock time, delay intervals etc.">RTPTime</a>(0,0); <span class="keywordflow">return</span> lastwallclocktime; } <a name="l00180"></a>00180 <a name="l00182"></a><a class="code" href="classRTPPacketBuilder.html#1319671f989a7b5947ec9b3978f274bb">00182</a> uint32_t <a class="code" href="classRTPPacketBuilder.html#1319671f989a7b5947ec9b3978f274bb" title="Returns the RTP timestamp which corresponds to the time returned by the previous...">GetPacketTimestamp</a>()<span class="keyword"> const </span>{ <span class="keywordflow">if</span> (!init) <span class="keywordflow">return</span> 0; <span class="keywordflow">return</span> lastrtptimestamp; } <a name="l00183"></a>00183 <span class="keyword">private</span>: <a name="l00184"></a>00184 <span class="keywordtype">int</span> PrivateBuildPacket(<span class="keyword">const</span> <span class="keywordtype">void</span> *data,<span class="keywordtype">size_t</span> len, <a name="l00185"></a>00185 uint8_t pt,<span class="keywordtype">bool</span> mark,uint32_t timestampinc,<span class="keywordtype">bool</span> gotextension, <a name="l00186"></a>00186 uint16_t hdrextID = 0,<span class="keyword">const</span> <span class="keywordtype">void</span> *hdrextdata = 0,<span class="keywordtype">size_t</span> numhdrextwords = 0); <a name="l00187"></a>00187 <a name="l00188"></a>00188 <a class="code" href="classRTPRandom.html" title="The RTPRandom class can be used to generate random numbers.">RTPRandom</a> rtprnd; <a name="l00189"></a>00189 <span class="keywordtype">size_t</span> maxpacksize; <a name="l00190"></a>00190 uint8_t *buffer; <a name="l00191"></a>00191 <span class="keywordtype">size_t</span> packetlength; <a name="l00192"></a>00192 <a name="l00193"></a>00193 uint32_t numpayloadbytes; <a name="l00194"></a>00194 uint32_t numpackets; <a name="l00195"></a>00195 <span class="keywordtype">bool</span> init; <a name="l00196"></a>00196 <a name="l00197"></a>00197 uint32_t ssrc; <a name="l00198"></a>00198 uint32_t timestamp; <a name="l00199"></a>00199 uint16_t seqnr; <a name="l00200"></a>00200 <a name="l00201"></a>00201 uint32_t defaulttimestampinc; <a name="l00202"></a>00202 uint8_t defaultpayloadtype; <a name="l00203"></a>00203 <span class="keywordtype">bool</span> defaultmark; <a name="l00204"></a>00204 <a name="l00205"></a>00205 <span class="keywordtype">bool</span> deftsset,defptset,defmarkset; <a name="l00206"></a>00206 <a name="l00207"></a>00207 uint32_t csrcs[RTP_MAXCSRCS]; <a name="l00208"></a>00208 <span class="keywordtype">int</span> numcsrcs; <a name="l00209"></a>00209 <a name="l00210"></a>00210 <a class="code" href="classRTPTime.html" title="This class is used to specify wallclock time, delay intervals etc.">RTPTime</a> lastwallclocktime; <a name="l00211"></a>00211 uint32_t lastrtptimestamp; <a name="l00212"></a>00212 uint32_t prevrtptimestamp; <a name="l00213"></a>00213 }; <a name="l00214"></a>00214 <a name="l00215"></a><a class="code" href="classRTPPacketBuilder.html#a713acfe5447ffd0f2a539a062fbeb27">00215</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#a713acfe5447ffd0f2a539a062fbeb27" title="Sets the default payload type to pt.">RTPPacketBuilder::SetDefaultPayloadType</a>(uint8_t pt) <a name="l00216"></a>00216 { <a name="l00217"></a>00217 <span class="keywordflow">if</span> (!init) <a name="l00218"></a>00218 <span class="keywordflow">return</span> ERR_RTP_PACKBUILD_NOTINIT; <a name="l00219"></a>00219 defptset = <span class="keyword">true</span>; <a name="l00220"></a>00220 defaultpayloadtype = pt; <a name="l00221"></a>00221 <span class="keywordflow">return</span> 0; <a name="l00222"></a>00222 } <a name="l00223"></a>00223 <a name="l00224"></a><a class="code" href="classRTPPacketBuilder.html#5da6e98e894a905b9e66b89c304490ea">00224</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#5da6e98e894a905b9e66b89c304490ea" title="Sets the default marker bit to m.">RTPPacketBuilder::SetDefaultMark</a>(<span class="keywordtype">bool</span> m) <a name="l00225"></a>00225 { <a name="l00226"></a>00226 <span class="keywordflow">if</span> (!init) <a name="l00227"></a>00227 <span class="keywordflow">return</span> ERR_RTP_PACKBUILD_NOTINIT; <a name="l00228"></a>00228 defmarkset = <span class="keyword">true</span>; <a name="l00229"></a>00229 defaultmark = m; <a name="l00230"></a>00230 <span class="keywordflow">return</span> 0; <a name="l00231"></a>00231 } <a name="l00232"></a>00232 <a name="l00233"></a><a class="code" href="classRTPPacketBuilder.html#6381a48da1ebd92908398441838b0149">00233</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#6381a48da1ebd92908398441838b0149" title="Sets the default timestamp increment to timestampinc.">RTPPacketBuilder::SetDefaultTimestampIncrement</a>(uint32_t timestampinc) <a name="l00234"></a>00234 { <a name="l00235"></a>00235 <span class="keywordflow">if</span> (!init) <a name="l00236"></a>00236 <span class="keywordflow">return</span> ERR_RTP_PACKBUILD_NOTINIT; <a name="l00237"></a>00237 deftsset = <span class="keyword">true</span>; <a name="l00238"></a>00238 defaulttimestampinc = timestampinc; <a name="l00239"></a>00239 <span class="keywordflow">return</span> 0; <a name="l00240"></a>00240 } <a name="l00241"></a>00241 <a name="l00242"></a><a class="code" href="classRTPPacketBuilder.html#1996ad636555cbc0ace3fb4f9e537daa">00242</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#1996ad636555cbc0ace3fb4f9e537daa" title="This function increments the timestamp with the amount given by inc.">RTPPacketBuilder::IncrementTimestamp</a>(uint32_t inc) <a name="l00243"></a>00243 { <a name="l00244"></a>00244 <span class="keywordflow">if</span> (!init) <a name="l00245"></a>00245 <span class="keywordflow">return</span> ERR_RTP_PACKBUILD_NOTINIT; <a name="l00246"></a>00246 timestamp += inc; <a name="l00247"></a>00247 <span class="keywordflow">return</span> 0; <a name="l00248"></a>00248 } <a name="l00249"></a>00249 <a name="l00250"></a><a class="code" href="classRTPPacketBuilder.html#c17fe90b7139934d21c5eff152ec01df">00250</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classRTPPacketBuilder.html#c17fe90b7139934d21c5eff152ec01df" title="This function increments the timestamp with the amount given set by the SetDefaultTimestampIncrement...">RTPPacketBuilder::IncrementTimestampDefault</a>() <a name="l00251"></a>00251 { <a name="l00252"></a>00252 <span class="keywordflow">if</span> (!init) <a name="l00253"></a>00253 <span class="keywordflow">return</span> ERR_RTP_PACKBUILD_NOTINIT; <a name="l00254"></a>00254 <span class="keywordflow">if</span> (!deftsset) <a name="l00255"></a>00255 <span class="keywordflow">return</span> ERR_RTP_PACKBUILD_DEFAULTTSINCNOTSET; <a name="l00256"></a>00256 timestamp += defaulttimestampinc; <a name="l00257"></a>00257 <span class="keywordflow">return</span> 0; <a name="l00258"></a>00258 } <a name="l00259"></a>00259 <a name="l00260"></a>00260 <span class="preprocessor">#endif // RTPPACKETBUILDER_H</span> <a name="l00261"></a>00261 <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>