Closed ashellunts closed 2 years ago
I think this needs to be traced to the video capture device level to find a solution.
https://github.com/webrtc-sdk/webrtc/tree/main/modules/video_capture/windows
1, If flutter-webrtc itself needs to create video capture multiple times, we need a video capture proxy to allow multiple sinks to capture the camera
2,If other applications occupy the camera, we can only inform the user that the camera cannot be obtained and prevent the crash from occurring.
Sounds good 👍
Currently https://github.com/webrtc-sdk/webrtc/blob/main/test/vcm_capturer.h is used for capturing on windows. Will try to fix the bug if it takes not too long.
Crash occurs when calling
base_->factory_->CreateVideoTrack(source, uuid.c_str());
inFlutterMediaStream::GetUserVideo
.Crash is inside libwebrtc. Also there is no (or I don't see) a way to understand that camera is busy and don't call
createVideoTrack
.