camera视频数据采集总结
WebRtcVideoCapturer会被注册到VideoCaptureImpl中,当摄像头一帧图像数据准备好时,会调用VideoCaptureImpl的IncomingFrame(uint8_t* videoFrame), 接着会调用到WebRtcVideoCapturer的OnIncomingCapturerFrame(),WebRtcVideoCapturer最终通过SignalFrameCaptured使用信号与槽机制跳转到VideoCapturer的OnFrameCaptured。而VideoCapturerr持有VideoBroadcaster,所以当一帧视频准备好的时候会广播到所有通过AddOrUpdateSink()注册过来的sink子类中。
而WebRtcVideoSendStream实现了VideoSinkInterface接口,当一帧图片准备好的时候,WebRtcVideoSendStream将调用OnFrame()函数。