1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
|
<HTML>
<HEAD>
<TITLE>class RTPReceiver</TITLE>
<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
<TABLE BORDER="0">
<TR><TD valign="top" align="left" cellspacing="10">
<h1>class RTPReceiver</h1>
</TD>
<TD valign="top" align="right" colspan="1">RTP/RTCP packet receiver. <small><A HREF="#longdesc">More...</A></small></TD></TR>
</TABLE>
<HR>
<TABLE BORDER="0">
<TR><TH>Full name</TH><TD><code><A HREF="TelEngine.html">TelEngine</A>::RTPReceiver</code></TD></TR>
<TR><TH>Definition</TH><TD><code>#include <<A HREF="libs___yrtp___yatertp_h.html">libs/yrtp/yatertp.h</A>></code></TD></TR>
<TR><TH>Inherits</TH><TD><i><A HREF="TelEngine__RTPBaseIO.html">TelEngine::RTPBaseIO</A></i> <small>[public ]</small></TD></TR>
<TR><TH><A HREF="full-list-TelEngine__RTPReceiver.html">List of all Methods</A></TH></TR>
</TABLE>
</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI>inline <b><A HREF="#ref2">RTPReceiver</A></b> (RTPSession* session = 0)
</LI>
<LI>virtual <b><A HREF="#ref3">~RTPReceiver</A></b> ()
</LI>
<LI>inline <A HREF="#u_int32_t">u_int32_t</A> <b><A HREF="#ref4">ioPacketsLost</A></b> () const
</LI>
<LI>void <b><A HREF="#ref5">setDejitter</A></b> (RTPDejitter* dejitter)
</LI>
<LI>inline void <b><A HREF="#ref6">setDejitter</A></b> (unsigned int mindelay, unsigned int maxdelay)
</LI>
<LI>virtual bool <b><A HREF="#ref7">rtpRecv</A></b> (bool marker, int payload, unsigned int timestamp,
const void* data, int len)
</LI>
<LI>virtual bool <b><A HREF="#ref8">rtpRecvData</A></b> (bool marker, unsigned int timestamp,
const void* data, int len)
</LI>
<LI>virtual bool <b><A HREF="#ref9">rtpRecvEvent</A></b> (int event, char key, int duration,
int volume, unsigned int timestamp)
</LI>
<LI>virtual void <b><A HREF="#ref10">rtpNewPayload</A></b> (int payload, unsigned int timestamp)
</LI>
<LI>virtual void <b><A HREF="#ref11">rtpNewSSRC</A></b> (<A HREF="#u_int32_t">u_int32_t</A> newSsrc, bool marker)
</LI>
</ul><h4>Protected Methods</h4><ul><LI>virtual void <b><A HREF="#ref12">timerTick</A></b> (const Time& when)
</LI>
<LI>virtual bool <b><A HREF="#ref13">rtpDecipher</A></b> (unsigned char* data, int len, const void* secData, <A HREF="#u_int32_t">u_int32_t</A> ssrc, <A HREF="#u_int64_t">u_int64_t</A> seq)
</LI>
<LI>virtual bool <b><A HREF="#ref14">rtpCheckIntegrity</A></b> (const unsigned char* data, int len, const void* authData, <A HREF="#u_int32_t">u_int32_t</A> ssrc, <A HREF="#u_int64_t">u_int64_t</A> seq)
</LI>
</ul><h4>Protected Members</h4><ul><LI>u_int32_t <b><A HREF="#ref15">m_ioLostPkt</A></b></LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
Class that handles incoming RTP and RTCP packets
</p>
<A NAME="RTPReceiver"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline <strong>RTPReceiver</strong> (RTPSession* session = 0)
<br></td><td align="right"><h3><strong>RTPReceiver</strong></h3></td></tr></table><p></p><p>
Constructor
</p>
<A NAME="~RTPReceiver"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>~RTPReceiver</strong> ()
<br></td><td align="right"><h3><strong>~RTPReceiver</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Destructor - gets rid of the jitter buffer if present
</p>
<A NAME="ioPacketsLost"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline <A HREF="#u_int32_t">u_int32_t</A> <strong>ioPacketsLost</strong> ()
<br></td><td align="right"><h3><strong>ioPacketsLost</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Retrieve the number of lost packets in current session
</p>
<p><b>Returns</b>: Number of packets in sequence gaps
</p>
<A NAME="setDejitter"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>setDejitter</strong> (RTPDejitter* dejitter)
<br></td><td align="right"><h3><strong>setDejitter</strong></h3></td></tr></table><p></p><p>
Set a new dejitter buffer in this receiver
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>dejitter</i></TD><TD align="left" valign="top">New dejitter buffer to set, NULL to remove
</TD></TR>
</TABLE></P>
<A NAME="setDejitter"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline void <strong>setDejitter</strong> (unsigned int mindelay, unsigned int maxdelay)
<br></td><td align="right"><h3><strong>setDejitter</strong></h3></td></tr></table><p></p><p>
Allocate and set a new dejitter buffer in this receiver
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>mindelay</i></TD><TD align="left" valign="top">Minimum length of the dejitter buffer in microseconds
</TD></TR>
<TR><TD align="left" valign="top"><i>maxdelay</i></TD><TD align="left" valign="top">Maximum length of the dejitter buffer in microseconds
</TD></TR>
</TABLE></P>
<A NAME="rtpRecv"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>rtpRecv</strong> (bool marker, int payload, unsigned int timestamp,
const void* data, int len)
<br></td><td align="right"><h3><strong>rtpRecv</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Process one RTP payload packet.
Default behaviour is to call rtpRecvData() or rtpRecvEvent().
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>marker</i></TD><TD align="left" valign="top">Set to true if the marker bit is set
</TD></TR>
<TR><TD align="left" valign="top"><i>payload</i></TD><TD align="left" valign="top">Payload number
</TD></TR>
<TR><TD align="left" valign="top"><i>timestamp</i></TD><TD align="left" valign="top">Sampling instant of the packet data
</TD></TR>
<TR><TD align="left" valign="top"><i>data</i></TD><TD align="left" valign="top">Pointer to data block to process
</TD></TR>
<TR><TD align="left" valign="top"><i>len</i></TD><TD align="left" valign="top">Length of the data block in bytes
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if data was handled
</p>
<A NAME="rtpRecvData"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>rtpRecvData</strong> (bool marker, unsigned int timestamp,
const void* data, int len)
<br></td><td align="right"><h3><strong>rtpRecvData</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Process one RTP data packet
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>marker</i></TD><TD align="left" valign="top">Set to true if the marker bit is set
</TD></TR>
<TR><TD align="left" valign="top"><i>timestamp</i></TD><TD align="left" valign="top">Sampling instant of the packet data
</TD></TR>
<TR><TD align="left" valign="top"><i>data</i></TD><TD align="left" valign="top">Pointer to data block to process
</TD></TR>
<TR><TD align="left" valign="top"><i>len</i></TD><TD align="left" valign="top">Length of the data block in bytes
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if data was handled
</p>
<A NAME="rtpRecvEvent"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>rtpRecvEvent</strong> (int event, char key, int duration,
int volume, unsigned int timestamp)
<br></td><td align="right"><h3><strong>rtpRecvEvent</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Process one RTP event
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>event</i></TD><TD align="left" valign="top">Received event code
</TD></TR>
<TR><TD align="left" valign="top"><i>key</i></TD><TD align="left" valign="top">Received key (for events 0-16) or zero
</TD></TR>
<TR><TD align="left" valign="top"><i>duration</i></TD><TD align="left" valign="top">Duration of the event as number of samples
</TD></TR>
<TR><TD align="left" valign="top"><i>volume</i></TD><TD align="left" valign="top">Attenuation of the tone, zero for don't care
</TD></TR>
<TR><TD align="left" valign="top"><i>timestamp</i></TD><TD align="left" valign="top">Sampling instant of the initial packet data
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if data was handled
</p>
<A NAME="rtpNewPayload"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>rtpNewPayload</strong> (int payload, unsigned int timestamp)
<br></td><td align="right"><h3><strong>rtpNewPayload</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Method called for unknown payload types just before attempting
to call rtpRecvData(). This is a good opportunity to change the
payload type and continue.
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>payload</i></TD><TD align="left" valign="top">Payload number
</TD></TR>
<TR><TD align="left" valign="top"><i>timestamp</i></TD><TD align="left" valign="top">Sampling instant of the unexpected packet data
</TD></TR>
</TABLE></P>
<A NAME="rtpNewSSRC"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>rtpNewSSRC</strong> (<A HREF="#u_int32_t">u_int32_t</A> newSsrc, bool marker)
<br></td><td align="right"><h3><strong>rtpNewSSRC</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Method called when a packet with an unexpected SSRC is received
just before processing further. This is a good opportunity to
change the SSRC and continue
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>newSsrc</i></TD><TD align="left" valign="top">SSRC received in packet
</TD></TR>
<TR><TD align="left" valign="top"><i>marker</i></TD><TD align="left" valign="top">True if marker bit is set in the RTP packet
</TD></TR>
</TABLE></P>
<A NAME="timerTick"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>timerTick</strong> (const Time& when)
<br></td><td align="right"><h3><strong>timerTick</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
Method called periodically to finish lingering events
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>when</i></TD><TD align="left" valign="top">Time to use as base in all computing
</TD></TR>
</TABLE></P>
<p>Reimplemented from <A HREF="TelEngine__RTPBaseIO.html#timerTick">RTPBaseIO</A>.</p>
<A NAME="rtpDecipher"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>rtpDecipher</strong> (unsigned char* data, int len, const void* secData, <A HREF="#u_int32_t">u_int32_t</A> ssrc, <A HREF="#u_int64_t">u_int64_t</A> seq)
<br></td><td align="right"><h3><strong>rtpDecipher</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
Method called to decipher RTP data in-place.
The default implementation calls session's <A HREF="TelEngine__RTPSecure.html#rtpDecipher">RTPSecure::rtpDecipher</A>()
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>data</i></TD><TD align="left" valign="top">Pointer to data block to decipher
</TD></TR>
<TR><TD align="left" valign="top"><i>len</i></TD><TD align="left" valign="top">Length of data including any padding
</TD></TR>
<TR><TD align="left" valign="top"><i>secData</i></TD><TD align="left" valign="top">Pointer to security data if applicable
</TD></TR>
<TR><TD align="left" valign="top"><i>ssrc</i></TD><TD align="left" valign="top">SSRC of the packet to decipher
</TD></TR>
<TR><TD align="left" valign="top"><i>seq</i></TD><TD align="left" valign="top">Full (48 bit) seqence number of the packet including rollovers
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True is the packet was deciphered correctly or can't tell
</p>
<A NAME="rtpCheckIntegrity"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>rtpCheckIntegrity</strong> (const unsigned char* data, int len, const void* authData, <A HREF="#u_int32_t">u_int32_t</A> ssrc, <A HREF="#u_int64_t">u_int64_t</A> seq)
<br></td><td align="right"><h3><strong>rtpCheckIntegrity</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
Method called to check the integrity of the RTP packet.
The default implementation calls session's <A HREF="TelEngine__RTPSecure.html#rtpCheckIntegrity">RTPSecure::rtpCheckIntegrity</A>()
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>data</i></TD><TD align="left" valign="top">Pointer to RTP header and data
</TD></TR>
<TR><TD align="left" valign="top"><i>len</i></TD><TD align="left" valign="top">Length of header, data and padding
</TD></TR>
<TR><TD align="left" valign="top"><i>authData</i></TD><TD align="left" valign="top">Pointer to authentication data
</TD></TR>
<TR><TD align="left" valign="top"><i>ssrc</i></TD><TD align="left" valign="top">SSRC of the packet to validate
</TD></TR>
<TR><TD align="left" valign="top"><i>seq</i></TD><TD align="left" valign="top">Full (48 bit) seqence number of the packet including rollovers
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True is the packet passed integrity checks
</p>
<A NAME="m_ioLostPkt"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="#u_int32_t">u_int32_t</A> <strong>m_ioLostPkt</strong>
</td><td align="right"><h3><strong>m_ioLostPkt</strong></h3></td></tr></table><p> <small>[protected]</small></p><HR>
<table>
<tr><td><small>Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54.</small></td></tr>
</table>
</BODY>
</HTML>
|