【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>

相关推荐
大佐不会说日语~2 小时前
WebRTC技术实现简易直播平台
webrtc
YRYDZFtyVKg2 天前
光伏MPPT仿真之扰动观察法探索
webrtc
Knight_AL7 天前
WebRTC / HLS / HTTP-FLV 的本质区别与选型指南
网络协议·http·webrtc
runner365.git7 天前
webrtc推流能成为直播的主要方案吗?
webrtc
XHW___0018 天前
RTP/RTCP 基本知识
webrtc·rtp/rtcp
runner365.git8 天前
语言接入大模型,websocket还是webrtc?
websocket·网络协议·webrtc
好多渔鱼好多11 天前
【流媒体协议】WebRTC 技术详解
webrtc
txp玩Linux11 天前
webrtc降噪模块NS源码解析(1)
webrtc
鲲鹏混子鱼11 天前
WebRTC P2P信令服务架构设计文档
网络协议·webrtc·p2p
平行云18 天前
实时云渲染支持数字孪生智能工厂:迈向“零原型”制造
人工智能·unity·ue5·云计算·webrtc·制造·实时云渲染