41 #include "rtpconfig.h"
68 RTPPacket(uint8_t payloadtype,
const void *payloaddata,
size_t payloadlen,uint16_t seqnr,
69 uint32_t timestamp,uint32_t ssrc,
bool gotmarker,uint8_t numcsrcs,
const uint32_t *csrcs,
70 bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,
const void *extensiondata,
75 RTPPacket(uint8_t payloadtype,
const void *payloaddata,
size_t payloadlen,uint16_t seqnr,
76 uint32_t timestamp,uint32_t ssrc,
bool gotmarker,uint8_t numcsrcs,
const uint32_t *csrcs,
77 bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,
const void *extensiondata,
80 virtual ~
RTPPacket() {
if (packet && !externalbuffer) RTPDeleteByteArray(packet,GetMemoryManager()); }
97 uint32_t
GetCSRC(
int num)
const;
153 int BuildPacket(uint8_t payloadtype,
const void *payloaddata,
size_t payloadlen,uint16_t seqnr,
154 uint32_t timestamp,uint32_t ssrc,
bool gotmarker,uint8_t numcsrcs,
const uint32_t *csrcs,
155 bool gotextension,uint16_t extensionid,uint16_t extensionlen_numwords,
const void *extensiondata,
156 void *buffer,
size_t maxsize);
160 bool hasextension,hasmarker;
164 uint32_t extseqnr,timestamp,ssrc;
165 uint8_t *packet,*payload;
166 size_t packetlength,payloadlength;
170 size_t extensionlength;
177 #endif // RTPPACKET_H
int GetCSRCCount() const
Returns the number of CSRCs contained in this packet.
Definition: rtppacket.h:92
uint8_t * GetPayloadData() const
Returns a pointer to the actual payload data.
Definition: rtppacket.h:124
Represents an RTP Packet.
Definition: rtppacket.h:53
uint32_t GetExtendedSequenceNumber() const
Returns the extended sequence number of the packet.
Definition: rtppacket.h:106
A memory manager.
Definition: rtpmemorymanager.h:144
uint16_t GetExtensionID() const
If a header extension is present, this function returns the extension identifier. ...
Definition: rtppacket.h:133
This class is used to specify wallclock time, delay intervals etc.
Definition: rtptimeutilities.h:77
This class is used by the transmission component to store the incoming RTP and RTCP data in...
Definition: rtprawpacket.h:48
RTPPacket(RTPRawPacket &rawpack, RTPMemoryManager *mgr=0)
Creates an RTPPacket instance based upon the data in rawpack, optionally installing a memory manager...
bool HasMarker() const
Returns true if the marker bit was set and false otherwise.
Definition: rtppacket.h:89
int GetCreationError() const
If an error occurred in one of the constructors, this function returns the error code.
Definition: rtppacket.h:83
RTPTime GetReceiveTime() const
Returns the time at which this packet was received.
Definition: rtppacket.h:149
void SetExtendedSequenceNumber(uint32_t seq)
Sets the extended sequence number of this packet to seq.
Definition: rtppacket.h:112
uint16_t GetSequenceNumber() const
Returns the sequence number of this packet.
Definition: rtppacket.h:109
uint8_t * GetPacketData() const
Returns a pointer to the data of the entire packet.
Definition: rtppacket.h:121
uint32_t GetSSRC() const
Returns the SSRC identifier stored in this packet.
Definition: rtppacket.h:118
uint32_t GetCSRC(int num) const
Returns a specific CSRC identifier.
uint8_t GetPayloadType() const
Returns the payload type of the packet.
Definition: rtppacket.h:100
bool HasExtension() const
Returns true if the RTP packet has a header extension and false otherwise.
Definition: rtppacket.h:86
size_t GetExtensionLength() const
Returns the length of the header extension data.
Definition: rtppacket.h:139
uint32_t GetTimestamp() const
Returns the timestamp of this packet.
Definition: rtppacket.h:115
size_t GetPacketLength() const
Returns the length of the entire packet.
Definition: rtppacket.h:127
uint8_t * GetExtensionData() const
Returns the length of the header extension data.
Definition: rtppacket.h:136
size_t GetPayloadLength() const
Returns the payload length.
Definition: rtppacket.h:130