Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
rogurotus committed Sep 11, 2023
1 parent 613fadb commit cef443f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions crates/libwebrtc-sys/src/cpp/bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,16 @@ std::unique_ptr<VideoTrackSourceInterface> create_device_video_source(
size_t fps,
uint32_t device) {
rtc::scoped_refptr<DeviceVideoCapturer> dvc =
#if __APPLE__
signaling_thread.BlockingCall([width, height, fps, device] {
#if __APPLE__
auto dvc = MacCapturer::Create(width, height, fps, device);
#else
auto dvc = DeviceVideoCapturer::Create(width, height, fps, device);
#endif
return dvc;
});

return MacCapturer::Create(width, height, fps, device);
});
#else
signaling_thread.BlockingCall([width, height, fps, device] {
return DeviceVideoCapturer::Create(width, height, fps, device);
});
#endif
auto src = webrtc::CreateVideoTrackSourceProxy(&signaling_thread,
&worker_thread, dvc.get());
if (src == nullptr) {
Expand Down Expand Up @@ -498,7 +499,7 @@ std::unique_ptr<PeerConnectionFactoryInterface> create_peer_connection_factory(
const std::unique_ptr<Thread>& signaling_thread,
const std::unique_ptr<AudioDeviceModule>& default_adm,
const std::unique_ptr<AudioProcessing>& ap) {

std::unique_ptr<webrtc::VideoEncoderFactory> video_encoder_factory =
std::make_unique<webrtc::VideoEncoderFactoryTemplate<
webrtc::LibvpxVp8EncoderTemplateAdapter, webrtc::LibvpxVp9EncoderTemplateAdapter,
Expand Down

0 comments on commit cef443f

Please sign in to comment.