.TH "OutgoingRTPPkt" 3 "ccRTP" \" -*- nroff -*- .ad l .nh .SH NAME OutgoingRTPPkt \- RTP packets being sent\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBRTPPacket\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBOutgoingRTPPkt\fP (const uint32 *const csrcs, uint16 numcsrc, const unsigned char *const hdrext, uint32 hdrextlen, const unsigned char *const data, size_t datalen, uint8 paddinglen=0, \fBCryptoContext\fP *pcc=NULL)" .br .RI "Construct a new packet to be sent, containing several contributing source identifiers, header extensions and payload\&. " .ti -1c .RI "\fBOutgoingRTPPkt\fP (const uint32 *const csrcs, uint16 numcsrc, const unsigned char *const data, size_t datalen, uint8 paddinglen=0, \fBCryptoContext\fP *pcc=NULL)" .br .RI "Construct a new packet to be sent, containing several contributing source identifiers and payload\&. " .ti -1c .RI "\fBOutgoingRTPPkt\fP (const unsigned char *const data, size_t datalen, uint8 paddinglen=0, \fBCryptoContext\fP *pcc=NULL)" .br .RI "Construct a new packet (fast variant, with no contributing sources and no header extension) to be sent\&. " .ti -1c .RI "\fB~OutgoingRTPPkt\fP ()" .br .ti -1c .RI "void \fBsetPayloadType\fP (\fBPayloadType\fP pt)" .br .ti -1c .RI "void \fBsetSeqNum\fP (uint16 seq)" .br .ti -1c .RI "void \fBsetTimestamp\fP (uint32 pts)" .br .ti -1c .RI "void \fBsetSSRC\fP (uint32 ssrc) const" .br .RI "Set synchronization source numeric identifier\&. " .ti -1c .RI "void \fBsetSSRCNetwork\fP (uint32 ssrc) const" .br .RI "Set synchronization source numeric identifier\&. " .ti -1c .RI "void \fBsetMarker\fP (bool mark)" .br .RI "Specify the value of the marker bit\&. " .ti -1c .RI "void \fBprotect\fP (uint32 ssrc, \fBCryptoContext\fP *pcc)" .br .RI "Called packet is setup\&. " .ti -1c .RI "bool \fBoperator==\fP (const \fBOutgoingRTPPkt\fP &p) const" .br .RI "Outgoing packets are equal if their sequence numbers match\&. " .ti -1c .RI "bool \fBoperator!=\fP (const \fBOutgoingRTPPkt\fP &p) const" .br .RI "Outgoing packets are not equal if their sequence numbers differ\&. " .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 being sent\&. This class is intented to construct packet objects just before they are inserted into the sending queue, so that they are processed in a 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 "OutgoingRTPPkt::OutgoingRTPPkt (const uint32 *const csrcs, uint16 numcsrc, const unsigned char *const hdrext, uint32 hdrextlen, const unsigned char *const data, size_t datalen, uint8 paddinglen = \fC0\fP, \fBCryptoContext\fP * pcc = \fCNULL\fP)" .PP Construct a new packet to be sent, containing several contributing source identifiers, header extensions and payload\&. .PP .nf A new copy in memory (holding all this components .fi .PP along with the fixed header) is created\&. If the pointer to the SRTP \fBCryptoContext\fP is not NULL and holds a \fBCryptoContext\fP for the SSRC take the SSRC data into account when computing the required memory buffer\&. .PP \fBParameters\fP .RS 4 \fIcsrcs\fP array of countributing source 32-bit identifiers, in host order\&. .br \fInumcsrc\fP number of CSRC identifiers in the array\&. .br \fIhdrext\fP whole header extension\&. .br \fIhdrextlen\fP size of whole header extension, in octets\&. .br \fIdata\fP payload\&. .br \fIdatalen\fP payload length, in octets\&. .br \fIpaddinglen\fP pad packet to a multiple of paddinglen\&. .br \fIpcc\fP Pointer to the SRTP \fBCryptoContext\fP, defaults to NULL if not specified\&. .RE .PP \fBNote\fP .RS 4 For efficiency purposes, since this constructor is valid for all packets but is too complex for the common case, two simpler others are provided\&. .RE .PP .SS "OutgoingRTPPkt::OutgoingRTPPkt (const uint32 *const csrcs, uint16 numcsrc, const unsigned char *const data, size_t datalen, uint8 paddinglen = \fC0\fP, \fBCryptoContext\fP * pcc = \fCNULL\fP)" .PP Construct a new packet to be sent, containing several contributing source identifiers and payload\&. .PP .nf A new copy in .fi .PP memory (holding all this components along with the fixed header) is created\&. If the pointer to the SRTP \fBCryptoContext\fP is not NULL and holds a \fBCryptoContext\fP for the SSRC take the SSRC data into account when computing the required memory buffer\&. .PP \fBParameters\fP .RS 4 \fIcsrcs\fP array of countributing source 32-bit identifiers, in host order\&. .br \fInumcsrc\fP number of CSRC identifiers in the array\&. .br \fIdata\fP payload\&. .br \fIdatalen\fP payload length, in octets\&. .br \fIpaddinglen\fP pad packet to a multiple of paddinglen\&. .br \fIpcc\fP Pointer to the SRTP \fBCryptoContext\fP, defaults to NULL if not specified\&. .RE .PP .SS "OutgoingRTPPkt::OutgoingRTPPkt (const unsigned char *const data, size_t datalen, uint8 paddinglen = \fC0\fP, \fBCryptoContext\fP * pcc = \fCNULL\fP)" .PP Construct a new packet (fast variant, with no contributing sources and no header extension) to be sent\&. .PP .nf A new copy in memory (holding the whole packet) is created\&. If the pointer to the SRTP CryptoContext is not NULL and holds a CryptoContext for the SSRC take the SSRC data into account when computing the required memory buffer\&. .fi .PP .PP \fBParameters\fP .RS 4 \fIdata\fP payload\&. .br \fIdatalen\fP payload length, in octets\&. .br \fIpaddinglen\fP pad packet to a multiple of paddinglen\&. .br \fIpcc\fP Pointer to the SRTP \fBCryptoContext\fP, defaults to NULL if not specified\&. .RE .PP .SS "OutgoingRTPPkt::~OutgoingRTPPkt ()\fC [inline]\fP" .SH "Member Function Documentation" .PP .SS "bool OutgoingRTPPkt::operator!= (const \fBOutgoingRTPPkt\fP & p) const\fC [inline]\fP" .PP Outgoing packets are not equal if their sequence numbers differ\&. .SS "bool OutgoingRTPPkt::operator== (const \fBOutgoingRTPPkt\fP & p) const\fC [inline]\fP" .PP Outgoing packets are equal if their sequence numbers match\&. .SS "void OutgoingRTPPkt::protect (uint32 ssrc, \fBCryptoContext\fP * pcc)" .PP Called packet is setup\&. This private method computes the SRTP data and stores it in the packet\&. Then encrypt the payload data (ex padding)\&. .SS "void OutgoingRTPPkt::setMarker (bool mark)\fC [inline]\fP" .PP Specify the value of the marker bit\&. By default, the marker bit of outgoing packets is false/0\&. This method allows one to explicity specify and change that value\&. .PP \fBParameters\fP .RS 4 \fImark\fP value for the market bit\&. .RE .PP .SS "void OutgoingRTPPkt::setPayloadType (\fBPayloadType\fP pt)\fC [inline]\fP" .PP \fBParameters\fP .RS 4 \fIpt\fP Packet payload type\&. .RE .PP .SS "void OutgoingRTPPkt::setSeqNum (uint16 seq)\fC [inline]\fP" .PP .nf Sets the sequence number in the header\&. .fi .PP .PP \fBParameters\fP .RS 4 \fIseq\fP Packet sequence number, in host order\&. .RE .PP .SS "void OutgoingRTPPkt::setSSRC (uint32 ssrc) const\fC [inline]\fP" .PP Set synchronization source numeric identifier\&. .PP \fBParameters\fP .RS 4 \fIssrc\fP 32-bit Synchronization SouRCe numeric identifier, in host order\&. .RE .PP .SS "void OutgoingRTPPkt::setSSRCNetwork (uint32 ssrc) const\fC [inline]\fP" .PP Set synchronization source numeric identifier\&. Special version to save endianness conversion\&. .PP \fBParameters\fP .RS 4 \fIssrc\fP 32-bit Synchronization SouRCe numeric identifier, in network order\&. .RE .PP .SS "void OutgoingRTPPkt::setTimestamp (uint32 pts)\fC [inline]\fP" .PP \fBParameters\fP .RS 4 \fIpts\fP Packet timestamp, in host order\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for ccRTP from the source code\&.