Public Member Functions | Private Attributes

RTCP_Channel_Out Class Reference

The RTCP_Channel_Out class represents a single outgoing data channel, or stream. It keeps track of statistics such as number of packets sent and number of bytes sent. More...

#include <RTCP_Channel.h>

Collaboration diagram for RTCP_Channel_Out:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RTCP_Channel_Out (void)
 Constructor.
 ~RTCP_Channel_Out (void)
 Destructor.
void updateStatistics (RTP_Packet *pkt)
 Update the channel statistics each time an RTP packet is sent.
ACE_UINT32 timestamp (void)
 Returns the timestamp of the last RTP packet sent.
ACE_UINT32 packets_sent (void)
 Returns the number of packets sent.
ACE_UINT32 octets_sent (void)
 Returns the number of octets sent.
void cname (const char *cname)
 Sets the canonical name of the source.
const char * cname (void)
 Returns the canonical name of the source.
char active (void)
 Returns whether or not this source is active.

Private Attributes

ACE_CString cname_
 Holds the canonical name for this channel.
char active_
 Flag to indicate whether or not this channel is active.
unsigned int seq_num_
 The sequence number of the last RTP packet sent.
unsigned int timestamp_
 The timestamp of the last RTP packet sent.
unsigned int timestamp_offset_
 The initial offset of the timestamp.
unsigned int packets_sent_
 The total number of packets sent.
unsigned int octets_sent_
 The total numbef of octets sent.

Detailed Description

The RTCP_Channel_Out class represents a single outgoing data channel, or stream. It keeps track of statistics such as number of packets sent and number of bytes sent.

Definition at line 167 of file RTCP_Channel.h.


Constructor & Destructor Documentation

RTCP_Channel_Out::RTCP_Channel_Out ( void   ) 

Constructor.

Definition at line 313 of file RTCP_Channel.cpp.

  :cname_ ("cname"),
   active_ (0),
   timestamp_ (0),
   timestamp_offset_ (0),
   packets_sent_ (0),
   octets_sent_ (0)
{
}

RTCP_Channel_Out::~RTCP_Channel_Out ( void   ) 

Destructor.

Definition at line 323 of file RTCP_Channel.cpp.

{
}


Member Function Documentation

char RTCP_Channel_Out::active ( void   ) 

Returns whether or not this source is active.

Definition at line 359 of file RTCP_Channel.cpp.

{
  return this->active_;
}

const char* RTCP_Channel_Out::cname ( void   )  [inline]

Returns the canonical name of the source.

Definition at line 192 of file RTCP_Channel.h.

{ return this->cname_.c_str(); }

void RTCP_Channel_Out::cname ( const char *  cname  )  [inline]

Sets the canonical name of the source.

Definition at line 189 of file RTCP_Channel.h.

{ this->cname_ = cname; }

ACE_UINT32 RTCP_Channel_Out::octets_sent ( void   ) 

Returns the number of octets sent.

Definition at line 353 of file RTCP_Channel.cpp.

{
  return this->octets_sent_;
}

ACE_UINT32 RTCP_Channel_Out::packets_sent ( void   ) 

Returns the number of packets sent.

Definition at line 347 of file RTCP_Channel.cpp.

{
  return this->packets_sent_;
}

ACE_UINT32 RTCP_Channel_Out::timestamp ( void   ) 

Returns the timestamp of the last RTP packet sent.

Definition at line 341 of file RTCP_Channel.cpp.

{
  return this->timestamp_;
}

void RTCP_Channel_Out::updateStatistics ( RTP_Packet pkt  ) 

Update the channel statistics each time an RTP packet is sent.

Definition at line 328 of file RTCP_Channel.cpp.

{
  // indicate that this source is active
  this->active_ = 1;

  // Update various counters.
  this->octets_sent_ += data_packet->payload_size();
  this->packets_sent_ ++;
  this->seq_num_ = data_packet->sn ();
  this->timestamp_ = data_packet->ts ();
}


Member Data Documentation

char RTCP_Channel_Out::active_ [private]

Flag to indicate whether or not this channel is active.

Definition at line 202 of file RTCP_Channel.h.

Holds the canonical name for this channel.

Definition at line 199 of file RTCP_Channel.h.

unsigned int RTCP_Channel_Out::octets_sent_ [private]

The total numbef of octets sent.

Definition at line 217 of file RTCP_Channel.h.

unsigned int RTCP_Channel_Out::packets_sent_ [private]

The total number of packets sent.

Definition at line 214 of file RTCP_Channel.h.

unsigned int RTCP_Channel_Out::seq_num_ [private]

The sequence number of the last RTP packet sent.

Definition at line 205 of file RTCP_Channel.h.

unsigned int RTCP_Channel_Out::timestamp_ [private]

The timestamp of the last RTP packet sent.

Definition at line 208 of file RTCP_Channel.h.

unsigned int RTCP_Channel_Out::timestamp_offset_ [private]

The initial offset of the timestamp.

Definition at line 211 of file RTCP_Channel.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines