TAO_AV
2.1.2
|
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.
|
private |
Don't want default constructor.
|
private |
Don't want copy constructor.
|
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.
|
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.
|
inline |
Returns 1 if data has been sent since the last report, 0 if not.
|
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.
|
private |
This operation is used update statistics for the incoming RTP packet.
|
private |
Flag to indicate whether or not the source is active.
|
private |
last 'bad' sequence number + 1
|
private |
The first sequence number received.
|
private |
The canonical name of the source this channel represents.
|
private |
The shifted count of sequence number cycles (ie when sequence number wraps)
|
private |
This flag indicates that data has been received since the last report was sent.
|
private |
The packet expected at last interval.
|
private |
Flag to indicate the first data packet received.
The local time that the initial packet was received.
|
private |
The first timestamp received.
|
private |
The inter-arrival jitter measured in timestamp units.
|
private |
The last time a sender report was received in 1/65536 seconds. Used to calculate DLSR.
|
private |
The highest sequence number seen.
|
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.
|
private |
The least significant word of the last sender report NTP timestamp.
|
private |
The most significant word of the last sender report NTP timestamp.
|
private |
The RTP payload type.
|
private |
The address that the first RTP packet was received from.
|
private |
The number of in sequence packets until a source is declared valid.
|
private |
The number of packets received.
|
private |
The packet received at last interval.
|
private |
The synchronization source id of the source this channel represents.
|
private |
The last sender report RTP timestamp.
|
private |
The last transit time.