Agora Server Gateway SDK C++ API Reference
Public Member Functions | List of all members
agora::rtc::IRtmpConnectionObserver Class Referenceabstract

#include <NGIAgoraRtmpConnection.h>

Public Member Functions

virtual void onConnected (const RtmpConnectionInfo &connectionInfo)=0
 
virtual void onDisconnected (const RtmpConnectionInfo &connectionInfo)=0
 
virtual void onReconnecting (const RtmpConnectionInfo &connectionInfo)=0
 
virtual void onReconnected (const RtmpConnectionInfo &connectionInfo)=0
 
virtual void onConnectionFailure (const RtmpConnectionInfo &connectionInfo, RTMP_CONNECTION_ERROR errCode)=0
 
virtual void onTransferStatistics (uint64_t video_width, uint64_t video_height, uint64_t video_bitrate, uint64_t audio_bitrate, uint64_t video_frame_rate, uint64_t push_video_frame_cnt, uint64_t pop_video_frame_cnt)=0
 
virtual ~IRtmpConnectionObserver ()
 

Detailed Description

The IRtmpConnectionObserver class, which observes the connection state between the SDK and CDN.

Constructor & Destructor Documentation

◆ ~IRtmpConnectionObserver()

virtual agora::rtc::IRtmpConnectionObserver::~IRtmpConnectionObserver ( )
inlinevirtual

Member Function Documentation

◆ onConnected()

virtual void agora::rtc::IRtmpConnectionObserver::onConnected ( const RtmpConnectionInfo connectionInfo)
pure virtual

Occurs when the connection state between the SDK and CDN changes to STATE_CONNECTED(3).

Parameters
connectionInfoThe connection information. See RtmpConnectionInfo.

◆ onConnectionFailure()

virtual void agora::rtc::IRtmpConnectionObserver::onConnectionFailure ( const RtmpConnectionInfo connectionInfo,
RTMP_CONNECTION_ERROR  errCode 
)
pure virtual

Occurs when the connection state between the SDK and CDN changes to STATE_FAILED(5).

Parameters
connectionInfoThe connection information. See RtmpConnectionInfo.
errCodeThe error code for connection failure. See RTMP_CONNECTION_ERROR.

◆ onDisconnected()

virtual void agora::rtc::IRtmpConnectionObserver::onDisconnected ( const RtmpConnectionInfo connectionInfo)
pure virtual

Occurs when the connection state between the SDK and CDN changes to STATE_DISCONNECTED(1).

Parameters
connectionInfoThe connection information. See RtmpConnectionInfo.

◆ onReconnected()

virtual void agora::rtc::IRtmpConnectionObserver::onReconnected ( const RtmpConnectionInfo connectionInfo)
pure virtual

Occurs when the connection state between the SDK and CDN changes to STATE_RECONNECTED(6).

Parameters
connectionInfoThe connection information. See RtmpConnectionInfo.

◆ onReconnecting()

virtual void agora::rtc::IRtmpConnectionObserver::onReconnecting ( const RtmpConnectionInfo connectionInfo)
pure virtual

Occurs when the connection state between the SDK and CDN changes to STATE_RECONNECTING(4).

Parameters
connectionInfoThe connection information. See RtmpConnectionInfo.

◆ onTransferStatistics()

virtual void agora::rtc::IRtmpConnectionObserver::onTransferStatistics ( uint64_t  video_width,
uint64_t  video_height,
uint64_t  video_bitrate,
uint64_t  audio_bitrate,
uint64_t  video_frame_rate,
uint64_t  push_video_frame_cnt,
uint64_t  pop_video_frame_cnt 
)
pure virtual

Reports the media push statistics.

The SDK triggers this callback once per second during the media push.

Parameters
video_widthThe width (px) of the current video frame.
video_heightThe height (px) of the current video frame.
video_bitrateThe video bitrate (bps) of the current video frame.
audio_bitrateThe audio bitrate (bps) of the current audio frame.
video_frame_rateThe video frame rate (fps) of the current video frame.
push_video_frame_cntThe number of pushed video frames.
pop_video_frame_cntThe number of video frames actually pushed to the CDN.

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