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

相关推荐
SendTomo16 小时前
send.wang私传网:P2P直连传大文件首选工具
javascript·网络·网络协议·webrtc·p2p
桑榆4162 天前
WebRTC 本地视频文件推流 Demo 搭建指南 (Ubuntu 24.04)
linux·ubuntu·webrtc
音视频牛哥6 天前
WebRTC 能解决低延迟直播吗?为什么 RTSP、RTMP、GB28181 仍然不可替代?
音视频·webrtc·低延迟rtsp播放器·音视频sdk·smartmediakit·低延迟rtmp播放器·低延迟音视频
云栖梦泽在13 天前
稳如狗网络工具箱:IP、DNS、WebRTC、测速、连通性和全球延迟检测工具简明介绍
网络·网络协议·tcp/ip·网络安全·性能优化·webrtc
用户07806253471915 天前
getUserMedia 权限排障实战:浏览器拒绝,不一定是用户点了“拒绝”
nginx·webrtc
某林21218 天前
ROS2 + WebRTC + MQTT 异构系统架构
架构·系统架构·机器人·硬件架构·webrtc·ros2
EasyGBS1 个月前
RTSP、RTMP、HLS、FLV、WebRTC……国标GB28181视频平台EasyGBS五大流媒体协议,你的场景该用哪个?
音视频·webrtc
REDcker1 个月前
libdatachannel 快速入门
c++·webrtc·datachannel
冯程1 个月前
WebRTC 之 AllocationSequence 详解
webrtc·音视频开发
阿拉斯攀登1 个月前
售货柜实战:IPC 拉流 → 抽帧 → YOLO 识别完整流水线
yolo·ffmpeg·音视频·webrtc·视频编解码