Is there a way (or hack) to let me use a "custom" video capturer to create a VideoTrack and provide frames to it ?
The classic way to build a VideoTrack is :
Get a VideoCapturer Instance :
std::unique_ptr<cricket::VideoCapturer> capturer;
Create a VideoSource with a provided capturer :
rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> videoSource = peer_connection_factory_->CreateVideoSource(std::move(capturer), NULL);
Create a VideoTrack using the VideoSource :
rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track;
video_track = peer_connection_factory_->CreateVideoTrack(kVideoLabel, videoSource);
I was wondering if there is a way to override step one, instead of using the native one, using a custom capturer, so that i can provide the frames to the video track using a callback. That will let me use any video source (file, yuv stream...) and be very flexible.
Any advice on this one ?
This question is a C++ reference to : Create a WebRTC VideoTrack with a “custom” Capturer on Android with libjingle