NERtc macOS SDK  V5.5.40
Public 成员函数 | 所有成员列表
nertc::INERtcVideoEncoderQosObserver类 参考

#include <nertc_engine_video_encoder_qos_observer.h>

Public 成员函数

virtual void onRequestSendKeyFrame (NERtcVideoStreamType video_stream_type)
 
virtual void onBitrateUpdated (uint32_t bitrate_bps, NERtcVideoStreamType video_stream_type)
 
virtual void onVideoCodecUpdated (NERtcVideoCodecType video_codec_type, NERtcVideoStreamType video_stream_type)
 

详细描述

INERtcVideoEncoderQosObserver 回调扩展接口类用于 SDK 向 App 上报视频编码qos信息。

成员函数说明

◆ onBitrateUpdated()

virtual void nertc::INERtcVideoEncoderQosObserver::onBitrateUpdated ( uint32_t  bitrate_bps,
NERtcVideoStreamType  video_stream_type 
)
inlinevirtual

视频码率信息回调。

  • 调用 setVideoEncoderQosObserver 方法注册解码前媒体数据观测器后,SDK 可能会在推送外部视频编码帧后触发该回调,此时可以调整对应的码率,防止出现超编,引发视频异常。
    自从
    V4.6.29
    使用前提
    请在 INERtcVideoEncoderQosObserver 接口类中通过 setVideoEncoderQosObserver 接口设置回调监听。
    参数说明
    参数名称 类型 描述
    bitrate_bps uint32_t 码率。单位为 kbps。
    video_stream_type NERtcVideoStreamType 视频通道类型:
    • kNERtcVideoStreamMain:主流。
    • kNERtcVideoStreamSub:辅流。

◆ onRequestSendKeyFrame()

virtual void nertc::INERtcVideoEncoderQosObserver::onRequestSendKeyFrame ( NERtcVideoStreamType  video_stream_type)
inlinevirtual

I 帧请求事件回调。

  • 调用 setVideoEncoderQosObserver 方法注册解码前媒体数据观测器后,SDK 可能会在推送外部视频编码帧后触发该回调,此时请及时发送相应的 IDR 帧,否则对端无法渲染视频画面。
    自从
    V4.6.29
    使用前提
    请在 INERtcVideoEncoderQosObserver 接口类中通过 setVideoEncoderQosObserver 接口设置回调监听。
    参数说明
    参数名称 类型 描述
    video_stream_type NERtcVideoStreamType 视频通道类型:
    • kNERtcVideoStreamMain:主流。
    • kNERtcVideoStreamSub:辅流。

◆ onVideoCodecUpdated()

virtual void nertc::INERtcVideoEncoderQosObserver::onVideoCodecUpdated ( NERtcVideoCodecType  video_codec_type,
NERtcVideoStreamType  video_stream_type 
)
inlinevirtual

视频编码器类型信息回调。

  • 调用 setVideoEncoderQosObserver 方法注册解码前媒体数据观测器后,SDK 默认会在推送外部视频编码帧后触发一次该回调;后续若编码器类型发生变更时会再次触发此回调,此时请重置您的编码器。
    自从
    V4.6.29
    使用前提
    请在 INERtcVideoEncoderQosObserver 接口类中通过 setVideoEncoderQosObserver 接口设置回调监听。
    参数说明
    参数名称 类型 描述
    video_codec_type NERtcVideoCodecType 视频编码器类型:
    • kNERtcVideoCodecTypeH264(3):H.264 编码器。
    video_stream_type NERtcVideoStreamType 视频通道类型:
    • kNERtcVideoStreamMain:主流。
    • kNERtcVideoStreamSub:辅流。


该类的文档由以下文件生成: