#include <NGIAgoraRtmpConnection.h>
IRtmpConnectionObserver
类,用于监听 SDK 与 CDN 的连接状态。
◆ ~IRtmpConnectionObserver()
virtual agora::rtc::IRtmpConnectionObserver::~IRtmpConnectionObserver |
( |
| ) |
|
|
inlinevirtual |
◆ onConnected()
virtual void agora::rtc::IRtmpConnectionObserver::onConnected |
( |
const RtmpConnectionInfo & |
connectionInfo | ) |
|
|
pure virtual |
SDK 与 CDN 的连接状态变更为 STATE_CONNECTED(3)
时触发。
- 参数
-
◆ onConnectionFailure()
SDK 与 CDN 的连接状态变更为 STATE_FAILED(5)
时触发。
- 参数
-
◆ onDisconnected()
virtual void agora::rtc::IRtmpConnectionObserver::onDisconnected |
( |
const RtmpConnectionInfo & |
connectionInfo | ) |
|
|
pure virtual |
SDK 与 CDN 的连接状态变更为 STATE_DISCONNECTED(1)
时触发。
- 参数
-
◆ onReconnected()
virtual void agora::rtc::IRtmpConnectionObserver::onReconnected |
( |
const RtmpConnectionInfo & |
connectionInfo | ) |
|
|
pure virtual |
SDK 与 CDN 的连接状态变更为 STATE_RECONNECTED(6)
时触发。
- 参数
-
◆ onReconnecting()
virtual void agora::rtc::IRtmpConnectionObserver::onReconnecting |
( |
const RtmpConnectionInfo & |
connectionInfo | ) |
|
|
pure virtual |
SDK 与 CDN 的连接状态变更为 STATE_RECONNECTING(4)
时触发。
- 参数
-
◆ 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 |
旁路推流统计数据回调。
在旁路推流的过程中,SDK 每隔 1 秒触发一次该回调。
- 参数
-
video_width | 已推送视频的宽度(px)。 |
video_height | 已推送视频的高度(px)。 |
video_bitrate | 已推送视频的码率(bps)。 |
audio_bitrate | 已推送音频的码率(bps)。 |
video_frame_rate | 已推送视频的帧率(fps)。 |
push_video_frame_cnt | 已推送的视频帧数。 |
pop_video_frame_cnt | 实际推送到 CDN 的视频帧数。 |
该类的文档由以下文件生成: