RTP_Packet Class Reference

This class encapsulates all the necessary information to break down or build up an RTP data packet as well as operations to access all data items in the packet. More...

#include <RTP.h>

List of all members.

Public Member Functions

 RTP_Packet (char *buffer, int length)
 Constructor for incoming RTP packets.
 RTP_Packet (unsigned char padding, unsigned char marker, unsigned char payloadType, ACE_UINT32 sequenceNumber, ACE_UINT32 timeStamp, ACE_UINT32 syncSource, unsigned char contribSourcCount, ACE_UINT32 contribSourceList[], char *data, ACE_UINT16 dataSize)
 Constructor for outgoing RTP packets.
 ~RTP_Packet (void)
 Destructor.
ACE_UINT16 packet_size (void)
 Returns the size of the RTP packet in bytes.
ACE_UINT16 payload_size (void)
 Returns the size of the payload in bytes.
void get_frame_info (TAO_AV_frame_info *frame_info)
 Populates the passed in frame_info.
int is_valid (void)
 Returns 1 if packet is valid and 0 if not.
unsigned int ver (void)
 Returns the RTP version of the packet.
unsigned int pad (void)
 Returns 1 if the padding bit is set, 0 if not.
unsigned int ext (void)
 Returns 1 if the header extension bit is set, 0 if not.
unsigned int ext_bytes (void)
 Returns the number of bytes in the header extension or 0 if no extension.
unsigned int cc (void)
unsigned int mrk (void)
 Returns 1 if the marker bit is set, 0 if not.
unsigned int pt (void)
 Returns the payload type of the packet.
ACE_UINT16 sn (void)
 Returns the sequence number of the packet.
ACE_UINT32 ts (void)
 Returns the timestamp of the packet.
ACE_UINT32 ssrc (void)
 Returns the synchronization source id of the packet.
void get_csrc_list (ACE_UINT32 **csrc_list, ACE_UINT16 &length)
void get_payload (char **payload, ACE_UINT16 &size)
void get_packet_data (char **packet, ACE_UINT16 &size)

Private Attributes

char packet_ [RTP_MTU]
 Local buffer to hold the RTP packet.
ACE_UINT32 host_byte_order_csrc_list_ [15]
char host_byte_order_payload_ [RTP_MTU]
 Local buffer to hold the payload with the values stored in host byte order.
unsigned int extension_bytes_
 The number of bytes in the header extension - 0 if no extension.
ACE_UINT16 packet_size_
 The size of the overall data packet.
ACE_UINT16 payload_size_
 The size of the payload portion of the packet.


Detailed Description

This class encapsulates all the necessary information to break down or build up an RTP data packet as well as operations to access all data items in the packet.


Constructor & Destructor Documentation

RTP_Packet::RTP_Packet char *  buffer,
int  length
 

Constructor for incoming RTP packets.

RTP_Packet::RTP_Packet unsigned char  padding,
unsigned char  marker,
unsigned char  payloadType,
ACE_UINT32  sequenceNumber,
ACE_UINT32  timeStamp,
ACE_UINT32  syncSource,
unsigned char  contribSourcCount,
ACE_UINT32  contribSourceList[],
char *  data,
ACE_UINT16  dataSize
 

Constructor for outgoing RTP packets.

RTP_Packet::~RTP_Packet void   ) 
 

Destructor.


Member Function Documentation

unsigned int RTP_Packet::cc void   ) 
 

Returns the contributing source count. This should only be non-zero for mixers.

unsigned int RTP_Packet::ext void   ) 
 

Returns 1 if the header extension bit is set, 0 if not.

unsigned int RTP_Packet::ext_bytes void   ) 
 

Returns the number of bytes in the header extension or 0 if no extension.

void RTP_Packet::get_csrc_list ACE_UINT32 **  csrc_list,
ACE_UINT16 &  length
 

Returns a pointer to the local contributing source list and its length. This should be empty except for mixers. RTP_Packet retains ownership.

void RTP_Packet::get_frame_info TAO_AV_frame_info frame_info  ) 
 

Populates the passed in frame_info.

void RTP_Packet::get_packet_data char **  packet,
ACE_UINT16 &  size
 

Returns a pointer to the locally stored rtp packet and its size in bytes. RTP_Packet retains ownership.

void RTP_Packet::get_payload char **  payload,
ACE_UINT16 &  size
 

Returns a pointer to the locally stored payload and its size in bytes. The payload is returned in host byte order. RTP_Packet retains ownership.

int RTP_Packet::is_valid void   ) 
 

Returns 1 if packet is valid and 0 if not.

unsigned int RTP_Packet::mrk void   ) 
 

Returns 1 if the marker bit is set, 0 if not.

ACE_UINT16 RTP_Packet::packet_size void   ) 
 

Returns the size of the RTP packet in bytes.

unsigned int RTP_Packet::pad void   ) 
 

Returns 1 if the padding bit is set, 0 if not.

ACE_UINT16 RTP_Packet::payload_size void   ) 
 

Returns the size of the payload in bytes.

unsigned int RTP_Packet::pt void   ) 
 

Returns the payload type of the packet.

ACE_UINT16 RTP_Packet::sn void   ) 
 

Returns the sequence number of the packet.

ACE_UINT32 RTP_Packet::ssrc void   ) 
 

Returns the synchronization source id of the packet.

ACE_UINT32 RTP_Packet::ts void   ) 
 

Returns the timestamp of the packet.

unsigned int RTP_Packet::ver void   ) 
 

Returns the RTP version of the packet.


Member Data Documentation

unsigned int RTP_Packet::extension_bytes_ [private]
 

The number of bytes in the header extension - 0 if no extension.

ACE_UINT32 RTP_Packet::host_byte_order_csrc_list_[15] [private]
 

Local buffer to hold the contributing source list with the values stored in host byte order.

char RTP_Packet::host_byte_order_payload_[RTP_MTU] [private]
 

Local buffer to hold the payload with the values stored in host byte order.

char RTP_Packet::packet_[RTP_MTU] [private]
 

Local buffer to hold the RTP packet.

ACE_UINT16 RTP_Packet::packet_size_ [private]
 

The size of the overall data packet.

ACE_UINT16 RTP_Packet::payload_size_ [private]
 

The size of the payload portion of the packet.


The documentation for this class was generated from the following files:
Generated on Wed Nov 23 16:28:13 2005 for TAO_AV by  doxygen 1.4.5