jrtplib  3.7.0
Public Member Functions | List of all members
RTPRawPacket Class Reference

This class is used by the transmission component to store the incoming RTP and RTCP data in. More...

#include <rtprawpacket.h>

Inherits RTPMemoryObject.

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. More...
 
uint8_t * GetData ()
 Returns the pointer to the data which is contained in this packet. More...
 
size_t GetDataLength () const
 Returns the length of the packet described by this instance. More...
 
RTPTime GetReceiveTime () const
 Returns the time at which this packet was received. More...
 
const RTPAddressGetSenderAddress () const
 Returns the address stored in this packet. More...
 
bool IsRTP () const
 Returns true if this data is RTP data, false if it is RTCP data. More...
 
void ZeroData ()
 Sets the pointer to the data stored in this packet to zero. More...
 

Detailed Description

Constructor & Destructor Documentation

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.

Member Function Documentation

uint8_t* RTPRawPacket::GetData ( )
inline
size_t RTPRawPacket::GetDataLength ( ) const
inline
RTPTime RTPRawPacket::GetReceiveTime ( ) const
inline
const RTPAddress* RTPRawPacket::GetSenderAddress ( ) const
inline
bool RTPRawPacket::IsRTP ( ) const
inline
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.


The documentation for this class was generated from the following file: