From 12bcfaba75a5ca599d6e95e3a39023cfcb5ff6f9 Mon Sep 17 00:00:00 2001 From: enm10k Date: Tue, 23 Jan 2024 17:44:55 +0900 Subject: [PATCH] =?UTF-8?q?PeerConnectionFactoryDependencies=20=E3=81=AE?= =?UTF-8?q?=20audio=5Fdecoder=5Ffactory,=20audio=5Fencoder=5Ffactory=20?= =?UTF-8?q?=E3=82=92=E7=9B=B4=E6=8E=A5=E8=A8=AD=E5=AE=9A=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=81=A8=E5=87=A6=E7=90=86=E3=81=8C=E9=80=B2=E3=82=80=E3=81=8C?= =?UTF-8?q?=E3=80=81=E4=BB=A5=E4=B8=8B=E3=81=AE=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E3=81=8C=E7=99=BA=E7=94=9F=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit \# Fatal error in: ../../../../_source/macos_arm64/debug/webrtc/src/modules/audio_device/audio_device_buffer.cc, line 77 \# last system error: 0 \# Check failed: (&main_thread_checker_)->IsCurrent() \# \# Expected: TQ: 0x1426089b0 Thread: 0x16f623000 \# Actual: TQ: 0x0 Thread: 0x1d6879ec0 TaskQueue doesn't match --- src/sora_client_context.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/sora_client_context.cpp b/src/sora_client_context.cpp index 50e4f101..62ec5f4c 100644 --- a/src/sora_client_context.cpp +++ b/src/sora_client_context.cpp @@ -1,3 +1,5 @@ +#include + #include "sora/sora_client_context.h" // WebRTC @@ -118,23 +120,24 @@ std::shared_ptr SoraClientContext::Create( c->config_.configure_media_dependencies(dependencies, media_dependencies); } + dependencies.audio_decoder_factory = sora::CreateBuiltinAudioDecoderFactory(); + dependencies.audio_encoder_factory = sora::CreateBuiltinAudioEncoderFactory(); + std::cout << "webrtc::EnableMedia" << std::endl; webrtc::EnableMedia(dependencies); - /* - 自分で CreateMediaEngine しなくても良さそう - // TODO: CallConfig のコンストラクタの第2引数の扱いについて理解する - auto webrtc_env = webrtc::CreateEnvironment(); - // webrtc::CallConfig call_config(webrtc_env); - // dependencies.media_factory->CreateCall(call_config); - - // TODO: Environment に task_queue_factory を持たせる必要があるかもしれない - dependencies.media_factory->CreateMediaEngine(webrtc_env, dependencies); - */ - if (c->config_.configure_dependencies) { c->config_.configure_dependencies(dependencies); } + /* + auto webrtc_env = + webrtc::CreateEnvironment(dependencies.task_queue_factory.get()); + + std::cout << "HOGE: webrtc::ConnectionContext::Create(" << std::endl; + c->connection_context_ = + webrtc::ConnectionContext::Create(webrtc_env, &dependencies); +*/ + c->factory_ = sora::CreateModularPeerConnectionFactoryWithContext( std::move(dependencies), c->connection_context_);