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_);