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

相关推荐
换个昵称都难5 天前
webrtc peerconnection_server 模块介绍
运维·服务器·webrtc
EasyGBS5 天前
延迟直降90%!国标GB28181视频平台EasyGBS支持WebRTC WHIP推流设备接入,让万物互联更简单
音视频·webrtc
换个昵称都难6 天前
webrtc RtpRtcp模块化测试-MockRtpRtcp
webrtc
如意IT6 天前
指纹浏览器检测之BrowserScan的webrtc指纹检测和反检测
自动化·webrtc·chromium·浏览器开发
换个昵称都难6 天前
webrtc TURN 主要源码介绍
webrtc
换个昵称都难6 天前
webrtc RTC_P2P源码解析
asp.net·webrtc·p2p
换个昵称都难6 天前
webrtc StunServer源码介绍
webrtc
数据知道8 天前
指纹浏览器:DNS 泄漏防范与 WebRTC 本地 IP 屏蔽的底层实现
爬虫·网络协议·tcp/ip·安全·webrtc·数据采集·指纹浏览器
换个昵称都难8 天前
webrtc源码解析概要介绍
webrtc
换个昵称都难8 天前
WebRTC 完整调用流程(前端纯 JS 实现,最简可运行)
webrtc