IncomingRTPPkt(3)
πΈ NAME πΈ
IncomingRTPPkt β RTP packets received from other participants π«Ά the lil' data bundles that come sliding into your stack from everyone else on the call.
β¨ SYNOPSIS β¨
#include <rtppkt.h>
Inherits RTPPacket. Yes bestie, it's a whole inheritance family tree situation π
π Public Member Functions π
IncomingRTPPkt (const unsigned char *block, size_t len)β Build an RTP packet object from a data buffer.~IncomingRTPPkt ()bool isHeaderValid ()β Get validity of this packet.uint32 getSSRC () constβ Get synchronization source numeric identifier.int32 unprotect (CryptoContext *pcc)β Unprotect a received packet.bool operator== (const IncomingRTPPkt &p) constβ Two incoming packets are equal if they come from sources with the same SSRC and have the same sequence number.bool operator!= (const IncomingRTPPkt &p) constβ Two incoming packets are not equal if they come from different sources or have different sequence numbers.
π Public Member Functions inherited from RTPPacket π
RTPPacket (const unsigned char *const block, size_t len, bool duplicate=false)β Constructor, construct a packet object given the memory zone its content (header and payload) is stored.RTPPacket (size_t hdrlen, size_t plen, uint8 paddinglen, CryptoContext *pcc=NULL)β Construct a packet object without specifying its real content yet.uint32 getHeaderSize () constβ Get the length of the header, including contributing sources identifiers and header extension, if present.const uint8 *const getPayload () constuint32 getPayloadSize () constPayloadType getPayloadType () constuint16 getSeqNum () constuint32 getTimestamp () constuint8 getProtocolVersion () constbool isPadded () constβ Ask whether the packet contains padding bytes at the end.uint8 getPaddingSize () constβ Get the number of octets padding the end of the payload section.bool isMarked () constβ Ask whether the packet is marked (for isntance, is a new talk spurt in some audio profiles).bool isExtended () constβ Ask whether the packet contains header extensions.uint16 getCSRCsCount () constβ Get the number of contributing sources specified in the packet header.const uint32 * getCSRCs () constβ Get the 32-bit identifiers of the contributing sources for the packet as an array, of lengthgetCSRCsCount().uint16 getHdrExtUndefined () constβ Get the first 16 bits (in network order) of the header of the RTP header extension.uint32 getHdrExtSize () constβ Get the length (in octets) of the data contained in the header extension.const unsigned char * getHdrExtContent () constβ Get the content of the header extension.const unsigned char *const getRawPacket () constβ Get the raw packet as it will be sent through the network.uint32 getRawPacketSize () constβ Get the raw packet length, including header, extension, payload and padding.uint32 getRawPacketSizeSrtp () constsize_t getSizeOfFixedHeader () constvoid reComputePayLength (bool padding)β Re-compute payload length.struct RFC2833Payload * getRaw2833Payload (void)β Fetch a raw 2833 packet.uint16 get2833Duration (void)β Fetch 2833 duration field.void set2833Duration (uint16 timestamp)β Set 2833 duration field.
π Additional Inherited Members π
Protected Member Functions inherited from RTPPacket
virtual ~RTPPacket ()β Destructor, free the buffer provided in the constructor.void endPacket ()β Free memory allocated for the packet.RTPFixedHeader * getHeader () constβ Return low level structure for the header of the packet.void setExtension (bool e)const RTPHeaderExt * getHeaderExt () constβ Get a pointer toRTPHeaderExtpointing after the RTP header (fixed part plus contributing sources).uint32 getRawTimestamp () constβ Obtain the absolute timestamp carried in the packet header.void setbuffer (const void *src, size_t len, size_t pos)
Protected Attributes inherited from RTPPacket
uint16 cachedSeqNumβ Packet sequence number in host order.uint32 cachedTimestampβ Packet timestamp in host order (includes initial shift).uint32 srtpDataOffsetβ Offset into packet memory pointing to area for SRTP data.int32 srtpLengthβ Lebgth of additional SRTP data.uint32 totalβ total length, including header, payload and paddinguint32 payloadSizeβ note: payload (not full packet) size.
π Detailed Description π
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. no cap, that's the whole point of it β¨
π Author π
Federico Montesino Pouzols fedemp@altern.org
π§΅ Constructor & Destructor Documentation π§΅
IncomingRTPPkt::IncomingRTPPkt (const unsigned char * block, size_t len)
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 isHeaderValid(). vibe check happens first, always π
Parameters
blockβ pointer to the buffer the whole packet is stored in.lenβ length of the whole packet, expressed in octets.
Note: If check fails, the packet object is incomplete. checkingisHeaderValid()is recommended before using a newRTPPacketobject. do NOT skip this, bestie, it's giving incomplete packet energy π
IncomingRTPPkt::~IncomingRTPPkt () [inline]
π Member Function Documentation π
uint32 IncomingRTPPkt::getSSRC () const [inline]
Get synchronization source numeric identifier.
Returns
32-bits Synchronization SouRCe numeric identifier, in host order. host order, periodt π
bool IncomingRTPPkt::isHeaderValid () [inline]
Get validity of this packet.
Returns
whether the header check performed at construction time ended successfully. true = slay, false = uh oh π«
bool IncomingRTPPkt::operator!= (const IncomingRTPPkt & p) const [inline]
Two incoming packets are not equal if they come from different sources or have different sequence numbers.
bool IncomingRTPPkt::operator== (const IncomingRTPPkt & p) const [inline]
Two incoming packets are equal if they come from sources with the same SSRC and have the same sequence number. same source + same seq num = twins, fr fr π―
int32 IncomingRTPPkt::unprotect (CryptoContext * pcc)
Unprotect a received packet. Perform SRTP processing on this packet. π
Parameters
pccβ Pointer to SRTPCryptoContext.
Returns
oneif no errors-1if authentication failed-2if replay check failed
those negative numbers are NOT a vibe, read them carefully β οΈ
β Author β
Generated automatically by Doxygen for ccRTP from the source code.
okay that's the whole page bestie, you ate that π
β¨ This one came to you from ccRTP, in the manual page IncomingRTPPkt(3) β go forth and process those packets like the main character you are π¦ππ
π¦ where this page comes from
- debian trixie: libccrtp-doc 2.0.9-4.1 Β· GPL-2.0-or-later WITH MIF exception
- ubuntu noble: libccrtp-doc 2.0.9-2.5build1
- ubuntu questing: libccrtp-doc 2.0.9-4.1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms