Moving iOS Audio Device to sdk.
This change forks the existing iOS audio device module and audio device from modules/audio_device/ into sdk/objc/Framework. It also updates RTCPeerConnectionFactory to use the forked implementation. The unit tests are re-implemented as XCTests. (was: https://webrtc-review.googlesource.com/c/src/+/67300) Bug: webrtc:9120 Change-Id: I07340505137b16c2dd487569ad0112f984557bba Reviewed-on: https://webrtc-review.googlesource.com/75125 Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23208}
This commit is contained in:

committed by
Commit Bot

parent
c6ce9c5938
commit
08da28dd60
@ -38,6 +38,10 @@
|
||||
#include "sdk/objc/Framework/Native/src/objc_video_encoder_factory.h"
|
||||
#endif
|
||||
|
||||
#if defined(WEBRTC_IOS)
|
||||
#import "sdk/objc/Framework/Native/api/audio_device_module.h"
|
||||
#endif
|
||||
|
||||
// Adding the nogncheck to disable the including header check.
|
||||
// The no-media version PeerConnectionFactory doesn't depend on media related
|
||||
// C++ target.
|
||||
@ -55,6 +59,14 @@
|
||||
|
||||
@synthesize nativeFactory = _nativeFactory;
|
||||
|
||||
- (rtc::scoped_refptr<webrtc::AudioDeviceModule>)audioDeviceModule {
|
||||
#if defined(WEBRTC_IOS)
|
||||
return webrtc::CreateAudioDeviceModule();
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (instancetype)init {
|
||||
#ifdef HAVE_NO_MEDIA
|
||||
return [self initWithNoMedia];
|
||||
@ -65,7 +77,7 @@
|
||||
[[RTCVideoEncoderFactoryH264 alloc] init])
|
||||
nativeVideoDecoderFactory:webrtc::ObjCToNativeVideoDecoderFactory(
|
||||
[[RTCVideoDecoderFactoryH264 alloc] init])
|
||||
audioDeviceModule:nullptr
|
||||
audioDeviceModule:[self audioDeviceModule]
|
||||
audioProcessingModule:nullptr];
|
||||
#endif
|
||||
}
|
||||
@ -87,7 +99,7 @@
|
||||
nativeAudioDecoderFactory:webrtc::CreateBuiltinAudioDecoderFactory()
|
||||
nativeVideoEncoderFactory:std::move(native_encoder_factory)
|
||||
nativeVideoDecoderFactory:std::move(native_decoder_factory)
|
||||
audioDeviceModule:nullptr
|
||||
audioDeviceModule:[self audioDeviceModule]
|
||||
audioProcessingModule:nullptr];
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user