37 #ifndef RTPRAWPACKET_H 39 #define RTPRAWPACKET_H 41 #include "rtpconfig.h" 77 bool IsRTP()
const {
return isrtp; }
86 void ZeroData() { packetdata = 0; packetdatalength = 0; }
91 uint8_t *AllocateBytes(
bool isrtp,
int recvlen)
const;
95 void SetData(uint8_t *data,
size_t datalen);
104 size_t packetdatalength;
113 packetdatalength = datalen;
114 senderaddress = address;
118 inline RTPRawPacket::~RTPRawPacket()
123 inline void RTPRawPacket::DeleteData()
126 RTPDeleteByteArray(packetdata,GetMemoryManager());
128 RTPDelete(senderaddress,GetMemoryManager());
136 JRTPLIB_UNUSED(isrtp);
143 RTPDeleteByteArray(packetdata,GetMemoryManager());
146 packetdatalength = datalen;
152 RTPDelete(senderaddress, GetMemoryManager());
154 senderaddress = address;
159 #endif // RTPRAWPACKET_H This class is used by the transmission component to store the incoming RTP and RTCP data in...
Definition: rtprawpacket.h:51
RTPTime GetReceiveTime() const
Returns the time at which this packet was received.
Definition: rtprawpacket.h:71
#define RTPMEM_TYPE_BUFFER_RECEIVEDRTPPACKET
Buffer to store an incoming RTP packet.
Definition: rtpmemorymanager.h:48
size_t GetDataLength() const
Returns the length of the packet described by this instance.
Definition: rtprawpacket.h:68
uint8_t * AllocateBytes(bool isrtp, int recvlen) const
Allocates a number of bytes for RTP or RTCP data using the memory manager that was used for this raw ...
Definition: rtprawpacket.h:134
This class is an abstract class which is used to specify destinations, multicast groups etc...
Definition: rtpaddress.h:50
void ZeroData()
Sets the pointer to the data stored in this packet to zero.
Definition: rtprawpacket.h:86
void SetData(uint8_t *data, size_t datalen)
Deallocates the previously stored data and replaces it with the data that's specified, can be useful when e.g.
Definition: rtprawpacket.h:140
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.
Definition: rtprawpacket.h:110
void SetSenderAddress(RTPAddress *address)
Deallocates the currently stored RTPAddress instance and replaces it with the one that's specified (y...
Definition: rtprawpacket.h:149
const RTPAddress * GetSenderAddress() const
Returns the address stored in this packet.
Definition: rtprawpacket.h:74
Definition: rtpfaketransmitter.h:64
This class is used to specify wallclock time, delay intervals etc.
Definition: rtptimeutilities.h:84
A memory manager.
Definition: rtpmemorymanager.h:150
uint8_t * GetData()
Returns the pointer to the data which is contained in this packet.
Definition: rtprawpacket.h:65
bool IsRTP() const
Returns true if this data is RTP data, false if it is RTCP data.
Definition: rtprawpacket.h:77
#define RTPMEM_TYPE_BUFFER_RECEIVEDRTCPPACKET
Buffer to store an incoming RTCP packet.
Definition: rtpmemorymanager.h:51