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

相关推荐
REDcker1 天前
QUIC应用实践
音视频·webrtc·实时音视频·webtransport
深念Y2 天前
我明白为什么B站没法在浏览器开直播了——Windows Chrome推流踩坑全记录
前端·chrome·webrtc·浏览器·srs·直播·flv
Fisher3Star2 天前
Mediasoup SVC分层传输实现解析
webrtc
深念Y2 天前
仿B站直播功能技术选型:为什么必须用SRS而不是WebRTC P2P?
webrtc·srs·直播·推流·b站·多媒体·obs
REDcker2 天前
QUIC协议详解1
音视频·webrtc·实时音视频·webtransport
许彰午3 天前
WebRTC只管流不管控——自研信令服务器的状态机设计
运维·服务器·webrtc
ltlovezh4 天前
WebRTC SFU 架构:角色、推拉流与清晰度处理逻辑
webrtc
RTC老炮4 天前
WebRTC AEC3 算法原理分析
算法·webrtc
格林黄5 天前
WebSocket vs WebRTC 音频处理对比
websocket·音视频·webrtc
Fisher3Star5 天前
Mediasoup WebRtcTransport创建全流程解析
webrtc