【WebRTC---源码篇】(二:三)视频消费者VideoSinkInterfacee

作用:这是一个视频消费的基类,所有需要使用视频帧数据的类都需要继承它

cpp 复制代码
namespace rtc {
//VideoSinkInterface是WebRTC中用于接收和处理视频帧数据的接口类。
//通过实现该接口,可以实现自定义的视频数据处理逻辑。
template <typename VideoFrameT>
class VideoSinkInterface {
 public:
  virtual ~VideoSinkInterface() = default;

  virtual void OnFrame(const VideoFrameT& frame) = 0;

  // Should be called by the source when it discards the frame due to rate
  // limiting.
  virtual void OnDiscardedFrame() {}
};

}  // namespace rtc

看看哪些类继承了它

class Renderer : public rtc::VideoSinkInterface<VideoFrame>

class VideoRtcpAndSyncObserver : public test::RtpRtcpObserver,

public rtc::VideoSinkInterface<VideoFrame>

相关推荐
却道天凉_好个秋9 天前
WebRTC(七):媒体能力协商
webrtc
GetcharZp14 天前
告别“只闻其名”!一文带你深入浅出 WebRTC,并用 Go 搭建你的第一个实时应用
后端·webrtc
平行云14 天前
3分钟搭建LarkXR实时云渲染PaaS平台,实现各类3D/XR应用的一键推流
云原生·webrtc·xr·云渲染·虚幻引擎·实时云渲染·像素流送
却道天凉_好个秋15 天前
WebRTC(六):ICE协议
服务器·网络·webrtc
从后端到QT15 天前
WebRtc ICE 模块分析
webrtc
平行云19 天前
LarkXR 赋能AI x XR数字供应链:引领智能设计、数字孪生与零售新未来
人工智能·webrtc·xr·云渲染·虚幻引擎·云展厅
CatalyzeSec19 天前
【插件推荐】WebRTC Protect — 防止 IP 泄漏
网络·webrtc
却道天凉_好个秋19 天前
WebRTC(一):整体架构
webrtc
邪恶的贝利亚20 天前
从sdp开始到webrtc的通信过程
webrtc·流媒体·sdp
却道天凉_好个秋21 天前
WebRTC(三):P2P协议
网络协议·webrtc·p2p