OutgoingRTPPkt(3)

πŸ“¦
version 2.0.9 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu questing

πŸ’– OutgoingRTPPkt β€” NAME ✨

okay so bestie, welcome to OutgoingRTPPkt πŸ’… β€” this is a manual page from the Library Functions Manual, and it's all about RTP packets being sent. yes, the ones going OUT. the main character packets. πŸ“€βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <rtppkt.h>

Inherits RTPPacket. so like, it's giving nepo baby but make it OOP πŸŽ€

πŸ‘‘ Public Member Functions πŸ‘‘

  • OutgoingRTPPkt (const uint32 *const csrcs, uint16 numcsrc, const unsigned char *const hdrext, uint32 hdrextlen, const unsigned char *const data, size_t datalen, uint8 paddinglen=0, CryptoContext *pcc=NULL) β€” construct a brand new packet to be sent, and it's holding several contributing source identifiers, header extensions, and payload. the full-course meal πŸ“
  • OutgoingRTPPkt (const uint32 *const csrcs, uint16 numcsrc, const unsigned char *const data, size_t datalen, uint8 paddinglen=0, CryptoContext *pcc=NULL) β€” construct a new packet to be sent, this time with several contributing source identifiers and payload (no header extension, we're keeping it cute and simple).
  • OutgoingRTPPkt (const unsigned char *const data, size_t datalen, uint8 paddinglen=0, CryptoContext *pcc=NULL) β€” construct a new packet to be sent, fast variant, with no contributing sources and no header extension. speed. ⚑
  • ~OutgoingRTPPkt ()
  • void setPayloadType (PayloadType pt)
  • void setSeqNum (uint16 seq)
  • void setTimestamp (uint32 pts)
  • void setSSRC (uint32 ssrc) const β€” set the synchronization source numeric identifier.
  • void setSSRCNetwork (uint32 ssrc) const β€” set the synchronization source numeric identifier (network-order flavour).
  • void setMarker (bool mark) β€” specify the value of the marker bit.
  • void protect (uint32 ssrc, CryptoContext *pcc) β€” called packet is setup.
  • bool operator== (const OutgoingRTPPkt &p) const β€” outgoing packets are equal if their sequence numbers match. twin behavior πŸ’«
  • bool operator!= (const OutgoingRTPPkt &p) const β€” outgoing packets are not equal if their sequence numbers differ.

🌈 Public Member Functions inherited from RTPPacket

  • RTPPacket (const unsigned char *const block, size_t len, bool duplicate=false) β€” constructor; build a packet object given the memory zone where its content (header and payload) lives.
  • RTPPacket (size_t hdrlen, size_t plen, uint8 paddinglen, CryptoContext *pcc=NULL) β€” build a packet object without specifying its real content yet. mysterious. πŸ™ˆ
  • uint32 getHeaderSize () const β€” get the length of the header, including contributing sources identifiers and header extension, if present.
  • const uint8 *const getPayload () const
  • uint32 getPayloadSize () const
  • PayloadType getPayloadType () const
  • uint16 getSeqNum () const
  • uint32 getTimestamp () const
  • uint8 getProtocolVersion () const
  • bool 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 length getCSRCsCount().
  • 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 () const
  • size_t getSizeOfFixedHeader () const
  • void reComputePayLength (bool padding) β€” re-compute payload length.
  • struct RFC2833Payload * getRaw2833Payload (void) β€” fetch a raw 2833 packet.
  • uint16 get2833Duration (void) β€” fetch the 2833 duration field.
  • void set2833Duration (uint16 timestamp) β€” set the 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 the low level structure for the header of the packet.
  • void setExtension (bool e)
  • const RTPHeaderExt * getHeaderExt () const β€” get a pointer to RTPHeaderExt pointing 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 padding.
  • uint32 payloadSize β€” note: payload (not full packet) size.

πŸ”₯ Detailed Description πŸ”₯

RTP packets being sent. πŸ“¬

This class is intented to construct packet objects just before they are inserted into the sending queue, so that they get processed in an understandable and format independent manner inside the stack. no cap, that's literally the whole job. ✨

⭐ Author

Federico Montesino Pouzols fedemp@altern.org πŸ‘‘


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

🧚 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 = 0, CryptoContext * pcc = NULL)

Construct a new packet to be sent, containing several contributing source identifiers, header extensions and payload. the deluxe edition πŸ’…

A new copy in memory (holding all this components along with the fixed header) 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. 🧠

Parameters

  • csrcs β€” array of countributing source 32-bit identifiers, in host order.
  • numcsrc β€” number of CSRC identifiers in the array.
  • hdrext β€” whole header extension.
  • hdrextlen β€” size of whole header extension, in octets.
  • data β€” payload.
  • datalen β€” payload length, in octets.
  • paddinglen β€” pad packet to a multiple of paddinglen.
  • pcc β€” pointer to the SRTP CryptoContext, defaults to NULL if not specified.
Note β€” for efficiency purposes, since this constructor is valid for all packets but is too complex for the common case, two simpler others are provided. it's giving "we made the fancy one, now here's the lite version" 😌

🧚 OutgoingRTPPkt::OutgoingRTPPkt (const uint32 *const csrcs, uint16 numcsrc, const unsigned char *const data, size_t datalen, uint8 paddinglen = 0, CryptoContext * pcc = NULL)

Construct a new packet to be sent, containing several contributing source identifiers and payload. ✨

A new copy in memory (holding all this components along with the fixed header) 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. 🧠

Parameters

  • csrcs β€” array of countributing source 32-bit identifiers, in host order.
  • numcsrc β€” number of CSRC identifiers in the array.
  • data β€” payload.
  • datalen β€” payload length, in octets.
  • paddinglen β€” pad packet to a multiple of paddinglen.
  • pcc β€” pointer to the SRTP CryptoContext, defaults to NULL if not specified.

🧚 OutgoingRTPPkt::OutgoingRTPPkt (const unsigned char *const data, size_t datalen, uint8 paddinglen = 0, CryptoContext * pcc = NULL)

Construct a new packet (fast variant, with no contributing sources and no header extension) to be sent. ⚑

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. 🧠

Parameters

  • data β€” payload.
  • datalen β€” payload length, in octets.
  • paddinglen β€” pad packet to a multiple of paddinglen.
  • pcc β€” pointer to the SRTP CryptoContext, defaults to NULL if not specified.

🧚 OutgoingRTPPkt::~OutgoingRTPPkt () [inline]

that's it, that's the destructor. bye bestie πŸ‘‹πŸ’–


πŸ’« Member Function Documentation πŸ’«

🎯 bool OutgoingRTPPkt::operator!= (const OutgoingRTPPkt & p) const [inline]

Outgoing packets are not equal if their sequence numbers differ. simple as that, no drama πŸ’€

🎯 bool OutgoingRTPPkt::operator== (const OutgoingRTPPkt & p) const [inline]

Outgoing packets are equal if their sequence numbers match. soulmates, but it's sequence numbers 🫢

🎯 void OutgoingRTPPkt::protect (uint32 ssrc, CryptoContext * pcc)

Called packet is setup. This private method computes the SRTP data and stores it in the packet. Then encrypt the payload data (ex padding). πŸ” so it's basically the glow-up pass before the packet goes out into the world.

🎯 void OutgoingRTPPkt::setMarker (bool mark) [inline]

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. πŸ’…

Parameters

  • mark β€” value for the market bit.

🎯 void OutgoingRTPPkt::setPayloadType (PayloadType pt) [inline]

Parameters

  • pt β€” packet payload type.

🎯 void OutgoingRTPPkt::setSeqNum (uint16 seq) [inline]

Sets the sequence number in the header. πŸ”’

Parameters

  • seq β€” packet sequence number, in host order.

🎯 void OutgoingRTPPkt::setSSRC (uint32 ssrc) const [inline]

Set synchronization source numeric identifier. πŸ†”

Parameters

  • ssrc β€” 32-bit Synchronization SouRCe numeric identifier, in host order.

🎯 void OutgoingRTPPkt::setSSRCNetwork (uint32 ssrc) const [inline]

Set synchronization source numeric identifier. Special version to save endianness conversion. 🌐 the little shortcut that could.

Parameters

  • ssrc β€” 32-bit Synchronization SouRCe numeric identifier, in network order.

🎯 void OutgoingRTPPkt::setTimestamp (uint32 pts) [inline]

Parameters

  • pts β€” packet timestamp, in host order. ⏰

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for ccRTP from the source code.


and that's the whole page bestie πŸŽ€ β€” every constructor, every getter, every flag, all of it, untouched and slaying. this doc was auto-generated by Doxygen for ccRTP straight from the source code, and yes, the vibes were hand-delivered by yours truly. go forth and send some packets. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from