.TH "IncomingRTPPkt" 3 "ccRTP" \" -*- nroff -*- .ad l .nh .SH NAME IncomingRTPPkt \- RTP packets received from other participants\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBRTPPacket\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBIncomingRTPPkt\fP (const unsigned char *block, size_t len)" .br .RI "Build an RTP packet object from a data buffer\&. " .ti -1c .RI "\fB~IncomingRTPPkt\fP ()" .br .ti -1c .RI "bool \fBisHeaderValid\fP ()" .br .RI "Get validity of this packet\&. " .ti -1c .RI "uint32 \fBgetSSRC\fP () const" .br .RI "Get synchronization source numeric identifier\&. " .ti -1c .RI "int32 \fBunprotect\fP (\fBCryptoContext\fP *pcc)" .br .RI "Unprotect a received packet\&. " .ti -1c .RI "bool \fBoperator==\fP (const \fBIncomingRTPPkt\fP &p) const" .br .RI "Two incoming packets are equal if they come from sources with the same SSRC and have the same sequence number\&. " .ti -1c .RI "bool \fBoperator!=\fP (const \fBIncomingRTPPkt\fP &p) const" .br .RI "Two incoming packets are not equal if they come from different sources or have different sequence numbers\&. " .in -1c Public Member Functions inherited from \fBRTPPacket\fP .in +1c .ti -1c .RI "\fBRTPPacket\fP (const unsigned char *const block, size_t len, bool duplicate=false)" .br .RI "Constructor, construct a packet object given the memory zone its content (header and payload) is stored\&. " .ti -1c .RI "\fBRTPPacket\fP (size_t hdrlen, size_t plen, uint8 paddinglen, \fBCryptoContext\fP *pcc=NULL)" .br .RI "Construct a packet object without specifying its real content yet\&. " .ti -1c .RI "uint32 \fBgetHeaderSize\fP () const" .br .RI "Get the length of the header, including contributing sources identifiers and header extension, if present\&. " .ti -1c .RI "const uint8 *const \fBgetPayload\fP () const" .br .ti -1c .RI "uint32 \fBgetPayloadSize\fP () const" .br .ti -1c .RI "\fBPayloadType\fP \fBgetPayloadType\fP () const" .br .ti -1c .RI "uint16 \fBgetSeqNum\fP () const" .br .ti -1c .RI "uint32 \fBgetTimestamp\fP () const" .br .ti -1c .RI "uint8 \fBgetProtocolVersion\fP () const" .br .ti -1c .RI "bool \fBisPadded\fP () const" .br .RI "Ask whether the packet contains padding bytes at the end\&. " .ti -1c .RI "uint8 \fBgetPaddingSize\fP () const" .br .RI "Get the number of octets padding the end of the payload section\&. " .ti -1c .RI "bool \fBisMarked\fP () const" .br .RI "Ask whether the packet is marked (for isntance, is a new talk spurt in some audio profiles)\&. " .ti -1c .RI "bool \fBisExtended\fP () const" .br .RI "Ask whether the packet contains header extensions\&. " .ti -1c .RI "uint16 \fBgetCSRCsCount\fP () const" .br .RI "Get the number of contributing sources specified in the packet header\&. " .ti -1c .RI "const uint32 * \fBgetCSRCs\fP () const" .br .RI "Get the 32-bit identifiers of the contributing sources for the packet as an array, of length \fBgetCSRCsCount()\fP\&. " .ti -1c .RI "uint16 \fBgetHdrExtUndefined\fP () const" .br .RI "Get the first 16 bits (in network order) of the header of the RTP header extension\&. " .ti -1c .RI "uint32 \fBgetHdrExtSize\fP () const" .br .RI "Get the length (in octets) of the data contained in the header extension\&. " .ti -1c .RI "const unsigned char * \fBgetHdrExtContent\fP () const" .br .RI "Get the content of the header extension\&. " .ti -1c .RI "const unsigned char *const \fBgetRawPacket\fP () const" .br .RI "Get the raw packet as it will be sent through the network\&. " .ti -1c .RI "uint32 \fBgetRawPacketSize\fP () const" .br .RI "Get the raw packet length, including header, extension, payload and padding\&. " .ti -1c .RI "uint32 \fBgetRawPacketSizeSrtp\fP () const" .br .ti -1c .RI "size_t \fBgetSizeOfFixedHeader\fP () const" .br .ti -1c .RI "void \fBreComputePayLength\fP (bool padding)" .br .RI "Re-compute payload length\&. " .ti -1c .RI "struct \fBRFC2833Payload\fP * \fBgetRaw2833Payload\fP (void)" .br .RI "Fetch a raw 2833 packet\&. " .ti -1c .RI "uint16 \fBget2833Duration\fP (void)" .br .RI "Fetch 2833 duration field\&. " .ti -1c .RI "void \fBset2833Duration\fP (uint16 timestamp)" .br .RI "Set 2833 duration field\&. " .in -1c .SS "Additional Inherited Members" Protected Member Functions inherited from \fBRTPPacket\fP .in +1c .ti -1c .RI "virtual \fB~RTPPacket\fP ()" .br .RI "Destructor, free the buffer provided in the constructor\&. " .ti -1c .RI "void \fBendPacket\fP ()" .br .RI "Free memory allocated for the packet\&. " .ti -1c .RI "RTPFixedHeader * \fBgetHeader\fP () const" .br .RI "Return low level structure for the header of the packet\&. " .ti -1c .RI "void \fBsetExtension\fP (bool e)" .br .ti -1c .RI "const RTPHeaderExt * \fBgetHeaderExt\fP () const" .br .RI "Get a pointer to RTPHeaderExt pointing after the RTP header (fixed part plus contributing sources)\&. " .ti -1c .RI "uint32 \fBgetRawTimestamp\fP () const" .br .RI "Obtain the absolute timestamp carried in the packet header\&. " .ti -1c .RI "void \fBsetbuffer\fP (const void *src, size_t len, size_t pos)" .br .in -1c Protected Attributes inherited from \fBRTPPacket\fP .in +1c .ti -1c .RI "uint16 \fBcachedSeqNum\fP" .br .RI "Packet sequence number in host order\&. " .ti -1c .RI "uint32 \fBcachedTimestamp\fP" .br .RI "Packet timestamp in host order (includes initial shift)\&. " .ti -1c .RI "uint32 \fBsrtpDataOffset\fP" .br .RI "Offset into packet memory pointing to area for SRTP data\&. " .ti -1c .RI "int32 \fBsrtpLength\fP" .br .RI "Lebgth of additional SRTP data\&. " .ti -1c .RI "uint32 \fBtotal\fP" .br .RI "total length, including header, payload and padding " .ti -1c .RI "uint32 \fBpayloadSize\fP" .br .RI "note: payload (not full packet) size\&. " .in -1c .SH "Detailed Description" .PP RTP packets received from other participants\&. This class is intented to construct a packet object just after every packet is received by the scheduled queue, so that they are processed in an understandable and format independent manner inside the stack\&. .PP \fBAuthor\fP .RS 4 Federico Montesino Pouzols fedemp@altern.org .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "IncomingRTPPkt::IncomingRTPPkt (const unsigned char * block, size_t len)" .PP Build an RTP packet object from a data buffer\&. This constructor first performs a generic RTP data packet header check, whose result can be checked via \fBisHeaderValid()\fP\&. .PP \fBParameters\fP .RS 4 \fIblock\fP pointer to the buffer the whole packet is stored in\&. .br \fIlen\fP length of the whole packet, expressed in octets\&. .RE .PP \fBNote\fP .RS 4 If check fails, the packet object is incomplete\&. checking \fBisHeaderValid()\fP is recommended before using a new \fBRTPPacket\fP object\&. .RE .PP .SS "IncomingRTPPkt::~IncomingRTPPkt ()\fC [inline]\fP" .SH "Member Function Documentation" .PP .SS "uint32 IncomingRTPPkt::getSSRC () const\fC [inline]\fP" .PP Get synchronization source numeric identifier\&. .PP \fBReturns\fP .RS 4 32-bits Synchronization SouRCe numeric identifier, in host order\&. .RE .PP .SS "bool IncomingRTPPkt::isHeaderValid ()\fC [inline]\fP" .PP Get validity of this packet\&. .PP \fBReturns\fP .RS 4 whether the header check performed at construction time ended successfully\&. .RE .PP .SS "bool IncomingRTPPkt::operator!= (const \fBIncomingRTPPkt\fP & p) const\fC [inline]\fP" .PP Two incoming packets are not equal if they come from different sources or have different sequence numbers\&. .SS "bool IncomingRTPPkt::operator== (const \fBIncomingRTPPkt\fP & p) const\fC [inline]\fP" .PP Two incoming packets are equal if they come from sources with the same SSRC and have the same sequence number\&. .SS "int32 IncomingRTPPkt::unprotect (\fBCryptoContext\fP * pcc)" .PP Unprotect a received packet\&. Perform SRTP processing on this packet\&. .PP \fBParameters\fP .RS 4 \fIpcc\fP Pointer to SRTP \fBCryptoContext\fP\&. .RE .PP \fBReturns\fP .RS 4 one if no errors, -1 if authentication failed, -2 if replay check failed .RE .PP .SH "Author" .PP Generated automatically by Doxygen for ccRTP from the source code\&.