Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MNRTPPacket Class Reference

#include <MNRTPPacket.h>

Inheritance diagram for MNRTPPacket:

Inheritance graph
[legend]
Collaboration diagram for MNRTPPacket:

Collaboration graph
[legend]
List of all members.

Public Types

enum  DataDirection { To = false, From = true }

Public Member Functions

 MNRTPPacket (MNRope *&data, bool consume_data)
 MNRTPPacket (const MNRTPPacket &orig)
 MNRTPPacket (const rtp_hdr_t *pkt, const rtp_hdr_ext *xpkt, MNRope *&data, const struct sockaddr_in *addr, bool from_addr)
 MNRTPPacket (MNRope *data, const struct sockaddr_in *addr, bool from_addr, RTP_RC &retCode)
MNRTPPacketoperator= (const MNRTPPacket &orig)
virtual ~MNRTPPacket ()
virtual SH::DataPtr clone ()
virtual size_t getByteSize () const
 Required by SH::Data.
virtual MNRTPHdrExtparseHeaderExt (const rtp_hdr_ext *xpkt)
bool check_version () const
u_int32 get_ssrc () const
int get_payload_type () const
u_int16 get_seq () const
int rate () const
u_int32 get_ts () const
size_t payload_length () const
const uchar_t * payload ()
MNRopeextract_payload ()
bool has_ext_hdr () const
u_int16 get_ext_hdr_byte_len () const
u_int16 get_ext_hdr_word_len () const
u_int16 get_ext_hdr_type () const
const uchar_t * get_ext_hdr_payload ()
virtual void set_data (MNRope *data)
virtual void set_timestamp (u_int32 tstamp)
virtual void set_markerbit (bool yesno=true)
virtual u_int32 get_timestamp ()
virtual bool get_markerbit ()
virtual void set_ext_header (MNRTPHdrExt *exthdr)
virtual bool isPlainData () const
virtual bool isOrderedData () const
virtual bool isRTPData () const
virtual bool isDummyData () const
virtual bool isSHRTPData () const

Member Enumeration Documentation

enum MNRTPPacket::DataDirection
 

Enumeration values:
To 
From 


Constructor & Destructor Documentation

MNRTPPacket::MNRTPPacket MNRope *&  data,
bool  consume_data
 

The default constructer for creating an MNRTP packet

Parameters:
data A pointer to a rope that represents the payload of the RTP packet. The rope will be consumed by the call.

MNRTPPacket::MNRTPPacket const MNRTPPacket orig  ) 
 

The copy constructor.

MNRTPPacket::MNRTPPacket const rtp_hdr_t pkt,
const rtp_hdr_ext xpkt,
MNRope *&  data,
const struct sockaddr_in *  addr,
bool  from_addr
 

A constructor that takes a partially parsed RTP packet as input values for the internal RTP packet.

Parameters:
pkt A pointer to the RTP packet header in network byte order, including the CSRC values.
xpkt A pointer to the RTP extension header. If no extension header exists, the caller must call this constructor with a NULL pointer.
data A pointer to a rope that represents the payload of the RTP packet. The rope will be consumed by the call.
addr A optional address structure given information about the origin or target host of this RTP packet.
from_addr Boolean value indicating whether addr is the name of the message's origin host (true) or target host (false).

MNRTPPacket::MNRTPPacket MNRope data,
const struct sockaddr_in *  addr,
bool  from_addr,
RTP_RC retCode
 

A constructor that takes an unparsed buffer as an input value and extracts RTP packet information from it.

Parameters:
data The rope that contains the unparsed RTP packet's data in network byte order.
addr A optional address structure given information about the origin or target host of this RTP packet.
from_addr Boolean value indicating whether addr is the name of the message's origin host (true) or target host (false).
retCode Out variable that differs from RTP_OK if the given rope data does not form a complete and correct RTP packet; typically the error is RTP_SHORT_PACKET.

virtual MNRTPPacket::~MNRTPPacket  )  [virtual]
 

The destructor.


Member Function Documentation

bool MNRTPPacket::check_version  )  const
 

Determines whether the version of this RTP packet is version 2.

virtual SH::DataPtr MNRTPPacket::clone  )  [virtual]
 

The clone function creates an independant copy of this object and returns a pointer to it.

Returns:
A copy of this object.

Implements SH::Data.

MNRope* MNRTPPacket::extract_payload  ) 
 

Extract the payload from the RTP packet for further processing. The RTP packet must be deleted immediately after this operation.

u_int16 MNRTPPacket::get_ext_hdr_byte_len  )  const
 

const uchar_t* MNRTPPacket::get_ext_hdr_payload  ) 
 

u_int16 MNRTPPacket::get_ext_hdr_type  )  const
 

u_int16 MNRTPPacket::get_ext_hdr_word_len  )  const
 

virtual bool MNRTPPacket::get_markerbit  )  [virtual]
 

Gets the value for the marker bit

int MNRTPPacket::get_payload_type  )  const
 

Returns the payload type for this packet.

u_int16 MNRTPPacket::get_seq  )  const
 

Returns the payload type for this packet.

u_int32 MNRTPPacket::get_ssrc  )  const
 

Returns the SSRC for this packet.

virtual u_int32 MNRTPPacket::get_timestamp  )  [virtual]
 

Gets the value for the timestamp

u_int32 MNRTPPacket::get_ts  )  const
 

Return the timestamp (in host byte order).

virtual size_t MNRTPPacket::getByteSize  )  const [virtual]
 

Required by SH::Data.

Implements SH::Data.

bool MNRTPPacket::has_ext_hdr  )  const
 

Indicates whether an extension header is present.

virtual bool MNRTPPacket::isDummyData  )  const [inline, virtual]
 

See also:
SH::Data

Implements SH::Data.

virtual bool MNRTPPacket::isOrderedData  )  const [inline, virtual]
 

See also:
SH::Data

Implements SH::Data.

virtual bool MNRTPPacket::isPlainData  )  const [inline, virtual]
 

See also:
SH::Data

Implements SH::Data.

virtual bool MNRTPPacket::isRTPData  )  const [inline, virtual]
 

See also:
SH::Data

Implements SH::Data.

virtual bool MNRTPPacket::isSHRTPData  )  const [inline, virtual]
 

See also:
SH::Data

Implements SH::Data.

MNRTPPacket& MNRTPPacket::operator= const MNRTPPacket orig  ) 
 

The assignment operator.

virtual MNRTPHdrExt* MNRTPPacket::parseHeaderExt const rtp_hdr_ext xpkt  )  [virtual]
 

The default header extension processing function. A specific instance may overload this function and provide some sense to the extension header.

const uchar_t* MNRTPPacket::payload  ) 
 

Get an unmutable pointer to the content of this data packet.

size_t MNRTPPacket::payload_length  )  const
 

Return the length of the payload rope.

int MNRTPPacket::rate  )  const
 

Look up and return the rate that is defined for this payload type.

Returns:
The rate of this payload type.

virtual void MNRTPPacket::set_data MNRope data  )  [virtual]
 

Sets the payload of the rtp packet

virtual void MNRTPPacket::set_ext_header MNRTPHdrExt exthdr  )  [virtual]
 

virtual void MNRTPPacket::set_markerbit bool  yesno = true  )  [virtual]
 

marker bit must be set or not

virtual void MNRTPPacket::set_timestamp u_int32  tstamp  )  [virtual]
 

Sets the rtp header timestamp


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 13:36:01 2005 for Komssys by doxygen 1.3.8