From f5decce0f7cc6ce8ba21a3c1ed5a85640a40acfa Mon Sep 17 00:00:00 2001 From: melpon Date: Wed, 6 Sep 2023 04:47:03 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=91=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sora.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/sora.cpp b/src/sora.cpp index 291de08..1572ed6 100644 --- a/src/sora.cpp +++ b/src/sora.cpp @@ -294,7 +294,8 @@ void Sora::DoConnect(const sora_conf::internal::ConnectConfig& cc, (void*)cc.camera_config.unity_camera_texture, cc.no_video_device, cc.camera_config.video_capturer_device, cc.camera_config.video_width, cc.camera_config.video_height, cc.camera_config.video_fps, on_frame, - signaling_thread_.get(), env, android_context); + sora_context_->signaling_thread(), env, android_context, + unity_context_); if (!cc.no_video_device && !capturer) { on_disconnect((int)sora_conf::ErrorCode::INTERNAL_ERROR, "Capturer Init Failed"); @@ -527,7 +528,8 @@ void Sora::DoSwitchCamera(const sora_conf::internal::CameraConfig& cc) { auto capturer = CreateVideoCapturer( cc.capturer_type, (void*)cc.unity_camera_texture, false, cc.video_capturer_device, cc.video_width, cc.video_height, cc.video_fps, - on_frame, signaling_thread_.get(), env, android_context); + on_frame, sora_context_->signaling_thread(), env, android_context, + unity_context_); if (!capturer) { RTC_LOG(LS_ERROR) << "Failed to CreateVideoCapturer"; return; @@ -537,7 +539,8 @@ void Sora::DoSwitchCamera(const sora_conf::internal::CameraConfig& cc) { capturer_type_ = cc.capturer_type; std::string video_track_id = rtc::CreateRandomString(16); - auto video_track = factory_->CreateVideoTrack(video_track_id, capturer.get()); + auto video_track = sora_context_->peer_connection_factory()->CreateVideoTrack( + video_track_id, capturer.get()); if (video_track_ == nullptr) { auto track_id = renderer_->AddTrack(video_track.get()); PushEvent([this, track_id]() {