I compiled the native WebRTC (C ++) code and I play with peerconnection servers and client examples (under src\talk\examples\peerconnection ). In particular, I am trying to modify a client sample to stream a user-defined sequence of images, not video from a webcam. I used something like http://sourcey.com/webrtc-custom-opencv-video-capture/ as a starting point where a custom VideoCapturerFactory returns a custom VideoCapturer that I can use to create custom image frames. Every time I have a new image for a stream, I call SignalFrameCaptured(this, &frame) in VideoCapturer .
My problem is that in debug mode I get this failure:
# # Fatal error in e:\webrtc\webrtc checkout\src\webrtc\modules\video_coding\main\source\video_sender.cc, line 90 # Check failed: main_thread_.CalledOnValidThread() #
And I understand that this has something to do with the inconsistency between the stream that started the video stream and the stream that clicks on these individual frames. The former seems to be an internal WebRTC thread, and the latter is currently the main thread of the application.
Things work in Release mode because this thread check is disabled.
Any idea how to fix this correctly? Thanks
source share