sipxmedialib  Version 3.3
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CRTCPConnection Class Reference

#include <RTCPConnection.h>

Inheritance diagram for CRTCPConnection:
Inheritance graph
[legend]
Collaboration diagram for CRTCPConnection:
Collaboration graph
[legend]

Public Member Functions

 CRTCPConnection (unsigned long ulSSRC, IRTCPNotify *piRTCPNotify, ISDESReport *piSDESReport)
 
 ~CRTCPConnection (void)
 
bool Initialize (void)
 
void GetDispatchInterfaces (INetDispatch **ppiNetDispatch, IRTPDispatch **ppiRTPDispatch, ISetSenderStatistics **piSenderStats)
 
unsigned long GetRemoteSSRC (void)
 
bool isRemoteSSRCValid (void)
 
IRTCPRender * GetRenderInterface (void)
 
void GenerateRTCPReports (unsigned char *puchByeReason=NULL, ssrc_t aulCSRC[]=NULL, unsigned long ulCSRCs=0)
 
bool StopRenderer (void)
 
bool Terminate (void)
 
unsigned long GetEventInterest (void)
 
void NewSDES (IGetSrcDescription *piGetSrcDescription, IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
void UpdatedSDES (IGetSrcDescription *piGetSrcDescription, unsigned long ulChangeMask, IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
void SenderReportReceived (IGetSenderStatistics *piGetSenderStatistics, IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
void ReceiverReportReceived (IGetReceiverStatistics *piGetReceiverStatistics, IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
void ByeReportReceived (IGetByeInfo *piGetByeInfo, IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
void SDESReportSent (IGetSrcDescription *piGetSrcDescription, IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
void SenderReportSent (IGetSenderStatistics *piGetSenderStatistics, IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
void ReceiverReportSent (IGetReceiverStatistics *piGetReceiverStatistics, IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
void ByeReportSent (IGetByeInfo *piGetByeInfo, IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
void LocalSSRCCollision (IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
void RemoteSSRCCollision (IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
void RTCPReportingAlarm (IRTCPConnection *piRTCPConnection=NULL, IRTCPSession *piRTCPSession=NULL)
 
- Public Member Functions inherited from CBaseClass
CBaseClass CBASECLASS_PROTO_ARGS ((const char *pDerivedType="Unknown", int callLineNum=0))
 
virtual ~CBaseClass (void)
 
bool IsInitialized (void)
 
void setAutomatic (bool)
 
virtual unsigned long AddRef ADD_RELEASE_PROTO_ARGS ((int callLineNum))
 
virtual unsigned long Release ADD_RELEASE_PROTO_ARGS ((int callLineNum))
 
- Public Member Functions inherited from CRTCPTimer
 CRTCPTimer (unsigned long ulTimerPeriod)
 
virtual ~CRTCPTimer (void)
 
bool Initialize (void)
 
virtual void SetReportTimer (unsigned long ulTimerPeriod)
 
virtual unsigned long GetReportTimer (void)
 

Private Member Functions

bool StartRenderer (INetworkRender *piNetworkRender)
 

Private Attributes

unsigned long m_ulSSRC
 
INetworkRender * m_piRTCPNetworkRender
 
IRTCPNotify * m_piRTCPNotify
 
ISDESReport * m_piSDESReport
 
unsigned long m_ulEventInterest
 
CRTCPRenderm_poRTCPRender
 
CRTCPSourcem_poRTCPSource
 

Additional Inherited Members

- Static Public Member Functions inherited from CBaseClass
static bool AllowDeletes (void)
 
static void s_SetAllowDeletes (int v)
 
- Public Attributes inherited from CBaseClass
bool m_bInitialized
 
bool m_bAutomatic
 
int m_ulReferences
 
- Static Public Attributes inherited from CBaseClass
static bool s_bAllowDeletes = true
 
- Protected Member Functions inherited from CRTCPTimer
bool Shutdown (void)
 

Detailed Description

Class Name: CRTCPConnection

Inheritance: CBaseClass - Base Class Implementation

Interfaces: IRTCPConnection - RTCP Session Control Interface

Description: The CRTCPConnection Class shall manage the instantiation of RTCP objects used to report and track the identity and performance RTP connections. At RTP connection creation time, the RTCPConnection will instantiate a CRTCPRender and CRTCPSource object and make the appropriate association between objects to: ==> Allow the RTPRender object to dispatch RTP Headers, as received, to the RTCPRender ==> Allow the RTCPSource object to receive RTCP Reports from the Network Source object through the INetDispatch interface ==> Allow the RTCPRender object to send RTCP Reports through the INetSend interface exposed by an associated Network Render object. ==> Allow the SenderReport object associated with the RTCPSource object to update Sender Report statistics within ReceiverReport object associated with the RTCPSource object.

In addition to RTCP setup, the RTCPConnection shall coordinate the generation of periodic RTCP Sender, Receiver, and SDES Reports as well as the aperiodic generation of RTCP BYE Reports. The CRTCPConnection shall provide the the thread of execution for these activities and will use the resources of the various CRTCPRender objects to actually carry out report generation and transmission. Additionally, the CRTCPConnection object shall be responsible for managing registered interests in RTCP events both in and outside of a call in addition to be an intermediate dispatcher of these events.

Notes: CRTCPConnection is derived from CBaseClass which provides basic Initialization and reference counting support.

Constructor & Destructor Documentation

CRTCPConnection ( unsigned long  ulSSRC,
IRTCPNotify *  piRTCPNotify,
ISDESReport *  piSDESReport 
)

Method Name: CRTCPConnection() - Constructor

Inputs: unsigned long ulSSRC - SSRC ID IRTCPNotify *piRTCPNotify - RTCP Event Notification Interface ISDESReport *piSDESReport - Local Source Description Interface

Outputs: None

Returns: None

Description: Allocates the RTCP Source and Render components of an RTCP Connection.

Usage Notes: Allocation is not normally performed at construction time but a flag shall be set that will be used during the initialization phase to determine whether all went well. This is being done so construction arguments do not have to be stored as attributes of the RTCP Session object.

~CRTCPConnection ( void  )

Method Name: ~CRTCPConnection() - Destructor

Inputs: None

Outputs: None

Returns: None

Description: Shall deallocated and/or release all resources which was acquired over the course of runtime. In particular, the following shall occur: ==> Shall release the reference to the RTCP Render object ==> Shall release the reference to the RTCP Source object ==> Shall release the reference to the RTCP Timer object

Usage Notes:

Member Function Documentation

bool Initialize ( void  )
virtual

Method Name: Initialize

Inputs: None

Outputs: None

Returns: bool

Description: Performs runtime initialization that may be failure prone and therefore inappropriate for execution within a constructor. This includes the verification of construction time initialization as well as the instantiation of the RTCP Timer object.

Usage Notes: This is an overload of the CBaseClass Initialize() method.

Reimplemented from CBaseClass.

void GetDispatchInterfaces ( INetDispatch **  ppiNetDispatch,
IRTPDispatch **  ppiRTPDispatch,
ISetSenderStatistics **  piSenderStats 
)

Method Name: GetDispatchInterfaces()

Inputs: None

Outputs: INetDispatch **ppiNetDispatch

  • Interface used to route Network packets to the RTCP Source object IRTPDispatch **ppRTPDispatch
  • Interface used to route RTP Header packets to the RTPRender object's instance of an RTCP Receiver Report ISetSenderStatistics **piSenderStats 8 - Statistical Dispatch Interface

Returns: void

Description: This method allow a consumer to obtain the dispatch interfaces that are crucial to routing inbound RTCP and RTP network packets.

Usage Notes:

unsigned long GetRemoteSSRC ( void  )
inline

Method Name: GetRemoteSSRC()

Inputs: None

Outputs: None

Returns: unsigned long - SSRC of remote particant

Description: This method returns the remote SSRC ID associated with an RTCP Connection.

Usage Notes:

bool isRemoteSSRCValid ( void  )
inline
IRTCPRender* GetRenderInterface ( void  )

Method Name: GetRenderInterface()

Inputs: None

Outputs: None

Returns: IRTCPRender * - RTCP Render Interface

Description: This method allows a consumer to gain access to the RTCP Render interface associated with a specific RTCP Connection.

Usage Notes:

void GenerateRTCPReports ( unsigned char *  puchByeReason = NULL,
ssrc_t  aulCSRC[] = NULL,
unsigned long  ulCSRCs = 0 
)

Method Name: GenerateRTCPReports

Inputs: unsigned char *puchByeReason - Reason for terminating Connection ssrc_t aulCSRC[] - Array of contributing sources unsigned long ulCSRCs - Number of contributing sources

Outputs: None

Returns: None

Description: The GenerateRTCPReports() method is called when the RTCP Report Timer has expired. This method will obtain the interface of the CRTCPRender object and instruct it to generate reports. The reports generate shall be returned and shall result in event delivery to the RTC Manager onto subscribing clients.

Usage Notes:

bool StopRenderer ( void  )

Method Name: StopRenderer

Inputs: bool bRelease

Outputs: None

Returns: bool

Description: Performs connection based shutdown related to the orderly deallocation of connection based filters.

Usage Notes:

bool Terminate ( void  )

Method Name: Terminate

Inputs: None

Outputs: None

Returns: bool

Description: Performs connection based shutdown related to the orderly deallocation of connection based filters.

Usage Notes: This method must be called in order for the Connection object and its constituents to be gracefully deallocated.

unsigned long GetEventInterest ( void  )
inline

Method Name: GetEventInterest()

Inputs: None

Outputs: None

Returns: unsigned long - Mask of Event Interests

Description: The GetEventInterest() event method shall allow the dispatcher of notifications to access the event interests of a subscriber and use these wishes to dispatch RTCP event notifications

Usage Notes:

void NewSDES ( IGetSrcDescription *  piGetSrcDescription,
IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)

Method Name: NewSDES()

Inputs: IGetSrcDescription *piGetSrcDescription

  • Interface to the new Source Description info IRTCPConnection *piRTCPConnection
  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: Provides the corresponding RTCPConnection interface to the notification and passes it along to the subscribing Session Object.

Usage Notes:

void UpdatedSDES ( IGetSrcDescription *  piGetSrcDescription,
unsigned long  ulChangeMask,
IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)

Method Name: UpdatedSDES()

Inputs: IGetSrcDescription *piGetSrcDescription

  • Interface to the new Source Description info unsigned long ulChangeMask
  • The SDES fields that were subject to change IRTCPConnection *piRTCPConnection
  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: Provides the corresponding RTCPConnection interface to the notification and passes it along to the subscribing Session Object.

Usage Notes:

void SenderReportReceived ( IGetSenderStatistics *  piGetSenderStatistics,
IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)

Method Name: SenderReportReceived()

Inputs: IGetSenderStatistics *piGetSenderStatistics

  • Interface to the Sender Statistics IRTCPConnection *piRTCPConnection
  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: Provides the corresponding RTCPConnection interface to the notification and passes it along to the subscribing Session Object.

Usage Notes:

void ReceiverReportReceived ( IGetReceiverStatistics *  piGetReceiverStatistics,
IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)

Method Name: ReceiverReportReceived()

Inputs: IGetReceiverStatistics *piGetReceiverStatistics

  • Interface to the Receiver Statistics IRTCPConnection *piRTCPConnection
  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: Provides the corresponding RTCPConnection interface to the notification and passes it along to the subscribing Session Object.

Usage Notes:

void ByeReportReceived ( IGetByeInfo *  piGetByeInfo,
IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)

Method Name: ByeReportReceived()

Inputs: IGetByeInfo *piGetByeInfo

  • Interface used to retrieve Bye Report information IRTCPConnection *piRTCPConnection
  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: Provides the corresponding RTCPConnection interface to the notification and passes it along to the subscribing Session Object.

Usage Notes:

void SDESReportSent ( IGetSrcDescription *  piGetSrcDescription,
IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)
inline

Method Name: SDESReportSent()

Inputs: IGetSrcDescription *piGetSrcDescription

  • Interface to the local Source Description IRTCPConnection *piRTCPConnection
  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: Provides the corresponding RTCPConnection interface to the notification and passes it along to the subscribing Session Object.

Usage Notes:

void SenderReportSent ( IGetSenderStatistics *  piGetSenderStatistics,
IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)
inline

Method Name: SenderReportSent()

Inputs: IGetSenderStatistics *piGetSenderStatistics

  • Interface to the Sender Statistics IRTCPConnection *piRTCPConnection
  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: Provides the corresponding RTCPConnection interface to the notification and passes it along to the subscribing Session Object.

Usage Notes:

void ReceiverReportSent ( IGetReceiverStatistics *  piGetReceiverStatistics,
IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)
inline

Method Name: ReceiverReportSent()

Inputs: IGetReceiverStatistics *piGetReceiverStatistics

  • Interface to the Receiver Statistics IRTCPConnection *piRTCPConnection
  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: Provides the corresponding RTCPConnection interface to the notification and passes it along to the subscribing Session Object.

Usage Notes:

void ByeReportSent ( IGetByeInfo *  piGetByeInfo,
IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)
inline

Method Name: ByeReportSent()

Inputs: IGetByeInfo *piGetByeInfo

  • Interface used to retrieve Bye Report information IRTCPConnection *piRTCPConnection
  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: Provides the corresponding RTCPConnection interface to the notification and passes it along to the subscribing Session Object.

Usage Notes:

void LocalSSRCCollision ( IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)
inline

Method Name: LocalSSRCCollision()

Inputs: IRTCPConnection *piRTCPConnection

  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: The LocalSSRCCollision() event method shall inform the recipient of a collision between the local SSRC and one used by one of the remote participants.

Usage Notes:

void RemoteSSRCCollision ( IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)
inline

Method Name: RemoteSSRCCollision()

Inputs: IRTCPConnection *piRTCPConnection

  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: The RemoteSSRCCollision() event method shall inform the recipient of a collision between two remote participants.

Usage Notes:

void RTCPReportingAlarm ( IRTCPConnection *  piRTCPConnection = NULL,
IRTCPSession *  piRTCPSession = NULL 
)
virtual

Method Name: RTCPReportingAlarm

Inputs: IRTCPConnection *piRTCPConnection

  • Interface to associated RTCP Connection IRTCPSession *piRTCPSession
  • Interface to associated RTCP Session

Outputs: None

Returns: None

Description: The RTCPReportingAlarm() event method shall inform the recipient of the expiration of the RTCP Reporting Timer. This signals the generation of the next round of RTCP Reports.

Usage Notes:

Reimplemented from CRTCPTimer.

bool StartRenderer ( INetworkRender *  piNetworkRender)
private

Macro Name: DECLARE_IBASE_M

Inputs: None

Outputs: None

Returns: None

Description: This implements the IBaseClass functions used and exposed by derived classes.

Usage Notes:

Member Data Documentation

unsigned long m_ulSSRC
private

Attribute Name: m_ulSSRC

Type: unsigned long

Description: This member shall cache the SSRC associated with this connection

INetworkRender* m_piRTCPNetworkRender
private

Attribute Name: m_piRTCPNetworkRender

Type: INetworkRender *

Description: This member shall store the interface to the CNetworkChannel wrapper to the Pingtel OSSocket object.

IRTCPNotify* m_piRTCPNotify
private

Attribute Name: m_piRTCPNotify

Type: IRTCPNotify *

Description: This member shall contain the interface for delivering notification to a registered consumer.

ISDESReport* m_piSDESReport
private

Attribute Name: m_piSDESReport

Type: ISDESReport *

Description: This member shall cache the control interface for the Source Description report that identifies the local site.

unsigned long m_ulEventInterest
private

Attribute Name: m_ulEventInterest

Type: unsigned long

Description: This member shall store the events of interest for this Session object.

CRTCPRender* m_poRTCPRender
private

Attribute Name: m_poRTCPRender

Type: CRTCPRender *

Description: This member shall store an instance to the RTCP Render object.

CRTCPSource* m_poRTCPSource
private

Attribute Name: m_poRTCPSource

Type: CRTCPSource *

Description: This member shall store an instance to the RTCP Source object.