From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../examples/objcnativeapi/objc/objc_call_client.mm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'third_party/libwebrtc/examples/objcnativeapi') diff --git a/third_party/libwebrtc/examples/objcnativeapi/objc/objc_call_client.mm b/third_party/libwebrtc/examples/objcnativeapi/objc/objc_call_client.mm index 90bcfcc35b..996c6a9c7f 100644 --- a/third_party/libwebrtc/examples/objcnativeapi/objc/objc_call_client.mm +++ b/third_party/libwebrtc/examples/objcnativeapi/objc/objc_call_client.mm @@ -20,10 +20,10 @@ #include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h" +#include "api/enable_media.h" #include "api/peer_connection_interface.h" #include "api/rtc_event_log/rtc_event_log_factory.h" #include "api/task_queue/default_task_queue_factory.h" -#include "media/engine/webrtc_media_engine.h" #include "modules/audio_processing/include/audio_processing.h" #include "sdk/objc/native/api/video_capturer.h" #include "sdk/objc/native/api/video_decoder_factory.h" @@ -118,18 +118,14 @@ void ObjCCallClient::CreatePeerConnectionFactory() { dependencies.worker_thread = worker_thread_.get(); dependencies.signaling_thread = signaling_thread_.get(); dependencies.task_queue_factory = webrtc::CreateDefaultTaskQueueFactory(); - cricket::MediaEngineDependencies media_deps; - media_deps.task_queue_factory = dependencies.task_queue_factory.get(); - media_deps.audio_encoder_factory = webrtc::CreateBuiltinAudioEncoderFactory(); - media_deps.audio_decoder_factory = webrtc::CreateBuiltinAudioDecoderFactory(); - media_deps.video_encoder_factory = webrtc::ObjCToNativeVideoEncoderFactory( + dependencies.audio_encoder_factory = webrtc::CreateBuiltinAudioEncoderFactory(); + dependencies.audio_decoder_factory = webrtc::CreateBuiltinAudioDecoderFactory(); + dependencies.video_encoder_factory = webrtc::ObjCToNativeVideoEncoderFactory( [[RTC_OBJC_TYPE(RTCDefaultVideoEncoderFactory) alloc] init]); - media_deps.video_decoder_factory = webrtc::ObjCToNativeVideoDecoderFactory( + dependencies.video_decoder_factory = webrtc::ObjCToNativeVideoDecoderFactory( [[RTC_OBJC_TYPE(RTCDefaultVideoDecoderFactory) alloc] init]); - media_deps.audio_processing = webrtc::AudioProcessingBuilder().Create(); - dependencies.media_engine = cricket::CreateMediaEngine(std::move(media_deps)); - RTC_LOG(LS_INFO) << "Media engine created: " << dependencies.media_engine.get(); - dependencies.call_factory = webrtc::CreateCallFactory(); + dependencies.audio_processing = webrtc::AudioProcessingBuilder().Create(); + webrtc::EnableMedia(dependencies); dependencies.event_log_factory = std::make_unique(dependencies.task_queue_factory.get()); pcf_ = webrtc::CreateModularPeerConnectionFactory(std::move(dependencies)); -- cgit v1.2.3