MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
RTP::Packet Class Reference

This class is used to make RTP packets. Currently, H264, and AAC are supported. RTP mechanisms, like increasing sequence numbers and setting timestamps are all taken care of in here. More...

#include <rtp.h>

Public Member Functions

 Packet ()
 
 Packet ()
 
 Packet (unsigned int pt, unsigned int seq, unsigned int ts, unsigned int ssr, unsigned int csrcCount=0)
 
 Packet (unsigned int pt, unsigned int seq, unsigned int ts, unsigned int ssr, unsigned int csrcCount=0)
 
 Packet (const Packet &o)
 
 Packet (const Packet &o)
 
 Packet (const char *dat, unsigned int len)
 
 Packet (const char *dat, unsigned int len)
 
 ~Packet ()
 
 ~Packet ()
 
unsigned int getContribCount () const
 
unsigned int getContribCount () const
 
char * getData ()
 
char * getData ()
 
unsigned int getExtension () const
 
unsigned int getExtension () const
 
unsigned int getHsize () const
 
unsigned int getHsize () const
 
unsigned int getMarker () const
 
unsigned int getMarker () const
 
unsigned int getPadding () const
 
unsigned int getPadding () const
 
unsigned int getPayloadType () const
 
unsigned int getPayloadType () const
 
unsigned int getSequence () const
 
unsigned int getSequence () const
 
unsigned int getSSRC () const
 
unsigned int getSSRC () const
 
unsigned int getTimeStamp () const
 
unsigned int getTimeStamp () const
 
unsigned int getVersion () const
 
unsigned int getVersion () const
 
void increaseSequence ()
 
void increaseSequence ()
 
void operator= (const Packet &o)
 
void operator= (const Packet &o)
 
void sendData (void *socket, void callBack(void *, char *, unsigned int, unsigned int), const char *payload, unsigned int payloadlen, unsigned int channel, std::string codec)
 
void sendData (void *socket, void callBack(void *, char *, unsigned int, unsigned int), const char *payload, unsigned int payloadlen, unsigned int channel, std::string codec)
 
void sendH264 (void *socket, void callBack(void *, char *, unsigned int, unsigned int), const char *payload, unsigned int payloadlen, unsigned int channel)
 
void sendH264 (void *socket, void callBack(void *, char *, unsigned int, unsigned int), const char *payload, unsigned int payloadlen, unsigned int channel)
 
void sendRTCP (long long &connectedAt, void *socket, unsigned int tid, DTSC::Meta &metadata, void callBack(void *, char *, unsigned int, unsigned int))
 
void sendRTCP (long long &connectedAt, void *socket, unsigned int tid, DTSC::Meta &metadata, void callBack(void *, char *, unsigned int, unsigned int))
 
void setSequence (unsigned int seq)
 
void setSequence (unsigned int seq)
 
void setSSRC (unsigned long ssrc)
 
void setSSRC (unsigned long ssrc)
 
void setTimestamp (unsigned int t)
 
void setTimestamp (unsigned int t)
 

Static Public Attributes

static double startRTCP = 0
 

Private Member Functions

void htobll (char *p, long long val)
 Stores a long long (64 bits) value of val in network order to the pointer p. More...
 
void htobll (char *p, long long val)
 

Private Attributes

char * data
 The actual RTP packet that is being sent. More...
 
unsigned int datalen
 Size of rtp packet. More...
 
bool managed
 
int sentBytes
 
int sentPackets
 

Detailed Description

This class is used to make RTP packets. Currently, H264, and AAC are supported. RTP mechanisms, like increasing sequence numbers and setting timestamps are all taken care of in here.

Constructor & Destructor Documentation

RTP::Packet::Packet ( )
RTP::Packet::Packet ( unsigned int  pt,
unsigned int  seq,
unsigned int  ts,
unsigned int  ssr,
unsigned int  csrcCount = 0 
)
RTP::Packet::Packet ( const Packet o)
RTP::Packet::~Packet ( )
RTP::Packet::Packet ( const char *  dat,
unsigned int  len 
)
RTP::Packet::Packet ( )
RTP::Packet::Packet ( unsigned int  pt,
unsigned int  seq,
unsigned int  ts,
unsigned int  ssr,
unsigned int  csrcCount = 0 
)
RTP::Packet::Packet ( const Packet o)
RTP::Packet::~Packet ( )
RTP::Packet::Packet ( const char *  dat,
unsigned int  len 
)

Member Function Documentation

unsigned int RTP::Packet::getContribCount ( ) const
unsigned int RTP::Packet::getContribCount ( ) const
char * RTP::Packet::getData ( )
char* RTP::Packet::getData ( )
unsigned int RTP::Packet::getExtension ( ) const
unsigned int RTP::Packet::getExtension ( ) const
unsigned int RTP::Packet::getHsize ( ) const
unsigned int RTP::Packet::getHsize ( ) const
unsigned int RTP::Packet::getMarker ( ) const
unsigned int RTP::Packet::getMarker ( ) const
unsigned int RTP::Packet::getPadding ( ) const
unsigned int RTP::Packet::getPadding ( ) const
unsigned int RTP::Packet::getPayloadType ( ) const
unsigned int RTP::Packet::getPayloadType ( ) const
unsigned int RTP::Packet::getSequence ( ) const
unsigned int RTP::Packet::getSequence ( ) const
unsigned int RTP::Packet::getSSRC ( ) const
unsigned int RTP::Packet::getSSRC ( ) const
unsigned int RTP::Packet::getTimeStamp ( ) const
unsigned int RTP::Packet::getTimeStamp ( ) const
unsigned int RTP::Packet::getVersion ( ) const
unsigned int RTP::Packet::getVersion ( ) const
void RTP::Packet::htobll ( char *  p,
long long  val 
)
inlineprivate

Stores a long long (64 bits) value of val in network order to the pointer p.

void RTP::Packet::htobll ( char *  p,
long long  val 
)
inlineprivate
void RTP::Packet::increaseSequence ( )
void RTP::Packet::increaseSequence ( )
void RTP::Packet::operator= ( const Packet o)
void RTP::Packet::operator= ( const Packet o)
void RTP::Packet::sendData ( void *  socket,
void   callBackvoid *, char *, unsigned int, unsigned int,
const char *  payload,
unsigned int  payloadlen,
unsigned int  channel,
std::string  codec 
)
Todo:
This function probably belongs in DMS somewhere.
void RTP::Packet::sendData ( void *  socket,
void   callBackvoid *, char *, unsigned int, unsigned int,
const char *  payload,
unsigned int  payloadlen,
unsigned int  channel,
std::string  codec 
)
void RTP::Packet::sendH264 ( void *  socket,
void   callBackvoid *, char *, unsigned int, unsigned int,
const char *  payload,
unsigned int  payloadlen,
unsigned int  channel 
)
void RTP::Packet::sendH264 ( void *  socket,
void   callBackvoid *, char *, unsigned int, unsigned int,
const char *  payload,
unsigned int  payloadlen,
unsigned int  channel 
)
Todo:
This function probably belongs in DMS somewhere.
void RTP::Packet::sendRTCP ( long long &  connectedAt,
void *  socket,
unsigned int  tid,
DTSC::Meta metadata,
void   callBackvoid *, char *, unsigned int, unsigned int 
)
void RTP::Packet::sendRTCP ( long long &  connectedAt,
void *  socket,
unsigned int  tid,
DTSC::Meta metadata,
void   callBackvoid *, char *, unsigned int, unsigned int 
)
void RTP::Packet::setSequence ( unsigned int  seq)
void RTP::Packet::setSequence ( unsigned int  seq)
void RTP::Packet::setSSRC ( unsigned long  ssrc)
void RTP::Packet::setSSRC ( unsigned long  ssrc)
void RTP::Packet::setTimestamp ( unsigned int  t)
void RTP::Packet::setTimestamp ( unsigned int  t)

Field Documentation

char * RTP::Packet::data
private

The actual RTP packet that is being sent.

unsigned int RTP::Packet::datalen
private

Size of rtp packet.

bool RTP::Packet::managed
private
int RTP::Packet::sentBytes
private
int RTP::Packet::sentPackets
private
static double RTP::Packet::startRTCP = 0
static

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