Webrtc二 | 共享桌面
环境
- Ubuntu18.04
- webrtc M84
改造peerconnection例子,用来实现桌面共享
改造类CapturerTrackSource
- 增加桌面的数据源类
RcrtcDesktopCapturerTrackSource - 继承
webrtc::DesktopCapturer::Callback, 用于桌面数据捕获与回调 - 继承类
rtc::VideoSourceInterface<webrtc::VideoFrame>, 用于rendered_track_->AddOrUpdateSink(this, rtc::VideoSinkWants());添加class VideoRenderer : public rtc::VideoSinkInterface<webrtc::VideoFrame>的回调
详细代码:
……