#include <rtprawpacket.h>
Collaboration diagram for RTPRawPacket:
Public Member Functions | |
RTPRawPacket (uint8_t *data, size_t datalen, RTPAddress *address, RTPTime &recvtime, bool rtp, RTPMemoryManager *mgr=0) | |
Creates an instance which stores data from data with length datalen . | |
uint8_t * | GetData () |
Returns the pointer to the data which is contained in this packet. | |
size_t | GetDataLength () const |
Returns the length of the packet described by this instance. | |
RTPTime | GetReceiveTime () const |
Returns the time at which this packet was received. | |
const RTPAddress * | GetSenderAddress () const |
Returns the address stored in this packet. | |
bool | IsRTP () const |
Returns true if this data is RTP data, false if it is RTCP data. | |
void | ZeroData () |
Sets the pointer to the data stored in this packet to zero. |
RTPRawPacket::RTPRawPacket | ( | uint8_t * | data, | |
size_t | datalen, | |||
RTPAddress * | address, | |||
RTPTime & | recvtime, | |||
bool | rtp, | |||
RTPMemoryManager * | mgr = 0 | |||
) | [inline] |
Creates an instance which stores data from data
with length datalen
. Only the pointer to the data is stored, no actual copy is made! The address from which this packet originated is set to address
and the time at which the packet was received is set to recvtime
. The flag which indicates whether this data is RTP or RTCP data is set to rtp
. A memory manager can be installed as well.
void RTPRawPacket::ZeroData | ( | ) | [inline] |
Sets the pointer to the data stored in this packet to zero. This will prevent a delete
call for the actual data when the destructor of RTPRawPacket is called. This function is used by the RTPPacket and RTCPCompoundPacket classes to obtain the packet data (without having to copy it) and to make sure the data isn't deleted when the destructor of RTPRawPacket is called.