TAO_AV
2.1.0
|
The RTCP_Channel_In class represents a single incoming data channel, or stream. The class has several responsibilities. When the class is instantiated, the incoming RTP traffic must be declared a valid source based on the RTP packets received. Once declared valie, this class is responsible for keeping up with reception statistics and other information. When an SR or RR is created (outside of this class), this class is used to get the Receiver Report block for this particular stream. More...
#include <RTCP_Channel.h>
Public Member Functions | |
RTCP_Channel_In (ACE_UINT32 ssrc, const ACE_Addr *addr) | |
~RTCP_Channel_In (void) | |
Destructor. | |
void | recv_rtp_packet (ACE_Message_Block *mb, const ACE_Addr *peer_addr) |
RR_Block * | getRRBlock (void) |
Takes statistics of incoming RTP traffic and creates a receiver report block. | |
ACE_UINT32 | dlsr (void) |
Returns the delay since last sender report. | |
ACE_UINT32 | lsr (void) |
Returns the last sender report timestamp. | |
int | updateStatistics (RTCP_SR_Packet *sr) |
Updates channel information with incoming sender report. | |
int | updateStatistics (RTCP_RR_Packet *rr) |
Updates channel information with incoming receiver report. | |
int | sender (void) |
Returns 1 if data has been sent since the last report, 0 if not. | |
int | active (void) |
Returns 1 if this is an active source, 0 if not. | |
Private Member Functions | |
RTCP_Channel_In (void) | |
Don't want default constructor. | |
RTCP_Channel_In (const RTCP_Channel_In &ch) | |
Don't want copy constructor. | |
void | updateStatistics (RTP_Packet *pkt) |
This operation is used update statistics for the incoming RTP packet. | |
void | init_seq (ACE_UINT16 seq) |
This is called when the first RTP packet is received. | |
int | update_seq (ACE_UINT16 seq) |
Private Attributes | |
ACE_UINT32 | remote_ssrc_ |
The synchronization source id of the source this channel represents. | |
ACE_CString | cname_ |
The canonical name of the source this channel represents. | |
ACE_UINT16 | max_seq_ |
The highest sequence number seen. | |
ACE_UINT32 | cycles_ |
The shifted count of sequence number cycles (ie when sequence number wraps) | |
ACE_UINT32 | base_seq_ |
The first sequence number received. | |
ACE_UINT32 | bad_seq_ |
last 'bad' sequence number + 1 | |
ACE_UINT32 | probation_ |
The number of in sequence packets until a source is declared valid. | |
ACE_UINT32 | received_ |
The number of packets received. | |
ACE_UINT32 | expected_prior_ |
The packet expected at last interval. | |
ACE_UINT32 | received_prior_ |
The packet received at last interval. | |
ACE_UINT32 | transit_ |
The last transit time. | |
double | jitter_ |
The inter-arrival jitter measured in timestamp units. | |
char | first_data_packet_ |
Flag to indicate the first data packet received. | |
ACE_UINT32 | init_time_stamp_ |
The first timestamp received. | |
ACE_Time_Value | init_local_time_ |
The local time that the initial packet was received. | |
ACE_Addr * | peer_address_ |
The address that the first RTP packet was received from. | |
ACE_UINT32 | ntp_ts_msw_ |
The most significant word of the last sender report NTP timestamp. | |
ACE_UINT32 | ntp_ts_lsw_ |
The least significant word of the last sender report NTP timestamp. | |
ACE_UINT32 | rtp_ts_ |
The last sender report RTP timestamp. | |
ACE_UINT32 | last_sr_time_ |
int | active_ |
Flag to indicate whether or not the source is active. | |
int | no_data_counter_ |
char | data_since_last_report_ |
int | payload_type_ |
The RTP payload type. |
The RTCP_Channel_In class represents a single incoming data channel, or stream. The class has several responsibilities. When the class is instantiated, the incoming RTP traffic must be declared a valid source based on the RTP packets received. Once declared valie, this class is responsible for keeping up with reception statistics and other information. When an SR or RR is created (outside of this class), this class is used to get the Receiver Report block for this particular stream.
RTCP_Channel_In::RTCP_Channel_In | ( | ACE_UINT32 | ssrc, |
const ACE_Addr * | addr | ||
) |
Constructor for an incoming channel. Requires the synchronization source id and address of the sender.
RTCP_Channel_In::~RTCP_Channel_In | ( | void | ) |
Destructor.
RTCP_Channel_In::RTCP_Channel_In | ( | void | ) | [private] |
Don't want default constructor.
RTCP_Channel_In::RTCP_Channel_In | ( | const RTCP_Channel_In & | ch | ) | [private] |
Don't want copy constructor.
int RTCP_Channel_In::active | ( | void | ) | [inline] |
Returns 1 if this is an active source, 0 if not.
ACE_UINT32 RTCP_Channel_In::dlsr | ( | void | ) |
Returns the delay since last sender report.
RR_Block * RTCP_Channel_In::getRRBlock | ( | void | ) |
Takes statistics of incoming RTP traffic and creates a receiver report block.
void RTCP_Channel_In::init_seq | ( | ACE_UINT16 | seq | ) | [private] |
This is called when the first RTP packet is received.
ACE_UINT32 RTCP_Channel_In::lsr | ( | void | ) |
Returns the last sender report timestamp.
void RTCP_Channel_In::recv_rtp_packet | ( | ACE_Message_Block * | mb, |
const ACE_Addr * | peer_addr | ||
) |
This operation takes the incoming ACE_Message_Block, converts it to an RTP_Packet and calls updateStatistics. It also uses compares the peer_addr to the stored peer_address_ to check for loops.
int RTCP_Channel_In::sender | ( | void | ) | [inline] |
Returns 1 if data has been sent since the last report, 0 if not.
int RTCP_Channel_In::update_seq | ( | ACE_UINT16 | seq | ) | [private] |
This is called when each RTP packet is received. It is used to declare a source as valid.
int RTCP_Channel_In::updateStatistics | ( | RTCP_SR_Packet * | sr | ) |
Updates channel information with incoming sender report.
int RTCP_Channel_In::updateStatistics | ( | RTCP_RR_Packet * | rr | ) |
Updates channel information with incoming receiver report.
void RTCP_Channel_In::updateStatistics | ( | RTP_Packet * | pkt | ) | [private] |
This operation is used update statistics for the incoming RTP packet.
int RTCP_Channel_In::active_ [private] |
Flag to indicate whether or not the source is active.
ACE_UINT32 RTCP_Channel_In::bad_seq_ [private] |
last 'bad' sequence number + 1
ACE_UINT32 RTCP_Channel_In::base_seq_ [private] |
The first sequence number received.
ACE_CString RTCP_Channel_In::cname_ [private] |
The canonical name of the source this channel represents.
ACE_UINT32 RTCP_Channel_In::cycles_ [private] |
The shifted count of sequence number cycles (ie when sequence number wraps)
char RTCP_Channel_In::data_since_last_report_ [private] |
This flag indicates that data has been received since the last report was sent.
ACE_UINT32 RTCP_Channel_In::expected_prior_ [private] |
The packet expected at last interval.
char RTCP_Channel_In::first_data_packet_ [private] |
Flag to indicate the first data packet received.
The local time that the initial packet was received.
ACE_UINT32 RTCP_Channel_In::init_time_stamp_ [private] |
The first timestamp received.
double RTCP_Channel_In::jitter_ [private] |
The inter-arrival jitter measured in timestamp units.
ACE_UINT32 RTCP_Channel_In::last_sr_time_ [private] |
The last time a sender report was received in 1/65536 seconds. Used to calculate DLSR.
ACE_UINT16 RTCP_Channel_In::max_seq_ [private] |
The highest sequence number seen.
int RTCP_Channel_In::no_data_counter_ [private] |
This is a counter to indicate the number of reporting intervals that have passed since data has been received. After 32, declare the source inactive.
ACE_UINT32 RTCP_Channel_In::ntp_ts_lsw_ [private] |
The least significant word of the last sender report NTP timestamp.
ACE_UINT32 RTCP_Channel_In::ntp_ts_msw_ [private] |
The most significant word of the last sender report NTP timestamp.
int RTCP_Channel_In::payload_type_ [private] |
The RTP payload type.
ACE_Addr* RTCP_Channel_In::peer_address_ [private] |
The address that the first RTP packet was received from.
ACE_UINT32 RTCP_Channel_In::probation_ [private] |
The number of in sequence packets until a source is declared valid.
ACE_UINT32 RTCP_Channel_In::received_ [private] |
The number of packets received.
ACE_UINT32 RTCP_Channel_In::received_prior_ [private] |
The packet received at last interval.
ACE_UINT32 RTCP_Channel_In::remote_ssrc_ [private] |
The synchronization source id of the source this channel represents.
ACE_UINT32 RTCP_Channel_In::rtp_ts_ [private] |
The last sender report RTP timestamp.
ACE_UINT32 RTCP_Channel_In::transit_ [private] |
The last transit time.