Delete MediaTransportFactory from android and objc apis
Bug: webrtc:9719 Change-Id: Ic3e3c4c323dd4550d2f74269ef08f7035bedf0f4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176855 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31510}
This commit is contained in:
@ -946,7 +946,6 @@ if (is_ios || is_mac) {
|
||||
"../api/crypto:frame_encryptor_interface",
|
||||
"../api/rtc_event_log:rtc_event_log_factory",
|
||||
"../api/task_queue:default_task_queue_factory",
|
||||
"../api/transport/media:media_transport_interface",
|
||||
"../api/video:video_frame",
|
||||
"../api/video:video_rtp_headers",
|
||||
"../api/video_codecs:video_codecs_api",
|
||||
@ -1217,7 +1216,6 @@ if (is_ios || is_mac) {
|
||||
"../api/audio_codecs:audio_codecs_api",
|
||||
"../api/audio_codecs:builtin_audio_decoder_factory",
|
||||
"../api/audio_codecs:builtin_audio_encoder_factory",
|
||||
"../api/transport/media:media_transport_interface",
|
||||
"../api/video_codecs:video_codecs_api",
|
||||
"../media:rtc_media_base",
|
||||
"../modules:module_api",
|
||||
|
@ -272,7 +272,6 @@ if (is_android) {
|
||||
"api/org/webrtc/MediaSource.java",
|
||||
"api/org/webrtc/MediaStream.java",
|
||||
"api/org/webrtc/MediaStreamTrack.java",
|
||||
"api/org/webrtc/MediaTransportFactoryFactory.java",
|
||||
"api/org/webrtc/NativeLibraryLoader.java",
|
||||
"api/org/webrtc/NativePeerConnectionFactory.java",
|
||||
"api/org/webrtc/NetEqFactoryFactory.java",
|
||||
|
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
/**
|
||||
* Factory for creating webrtc::MediaTransportFactory instances.
|
||||
*/
|
||||
public interface MediaTransportFactoryFactory {
|
||||
/**
|
||||
* Dynamically allocates a webrtc::MediaTransportFactory instance and returns a pointer to it.
|
||||
* The caller takes ownership of the object.
|
||||
*/
|
||||
public long createNativeMediaTransportFactory();
|
||||
}
|
@ -536,18 +536,6 @@ public class PeerConnection {
|
||||
// Null indicates no change to currently configured value.
|
||||
@Nullable public Boolean allowCodecSwitching;
|
||||
|
||||
/*
|
||||
* Experimental flag that enables a use of media transport. If this is true, the media transport
|
||||
* factory MUST be provided to the PeerConnectionFactory.
|
||||
*/
|
||||
public boolean useMediaTransport;
|
||||
|
||||
/*
|
||||
* Experimental flag that enables a use of media transport for data channels. If this is true,
|
||||
* the media transport factory MUST be provided to the PeerConnectionFactory.
|
||||
*/
|
||||
public boolean useMediaTransportForDataChannels;
|
||||
|
||||
/**
|
||||
* Defines advanced optional cryptographic settings related to SRTP and
|
||||
* frame encryption for native WebRTC. Setting this will overwrite any
|
||||
@ -602,8 +590,6 @@ public class PeerConnection {
|
||||
networkPreference = AdapterType.UNKNOWN;
|
||||
sdpSemantics = SdpSemantics.PLAN_B;
|
||||
activeResetSrtpParams = false;
|
||||
useMediaTransport = false;
|
||||
useMediaTransportForDataChannels = false;
|
||||
cryptoOptions = null;
|
||||
turnLoggingId = null;
|
||||
allowCodecSwitching = null;
|
||||
@ -816,16 +802,6 @@ public class PeerConnection {
|
||||
return allowCodecSwitching;
|
||||
}
|
||||
|
||||
@CalledByNative("RTCConfiguration")
|
||||
boolean getUseMediaTransport() {
|
||||
return useMediaTransport;
|
||||
}
|
||||
|
||||
@CalledByNative("RTCConfiguration")
|
||||
boolean getUseMediaTransportForDataChannels() {
|
||||
return useMediaTransportForDataChannels;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@CalledByNative("RTCConfiguration")
|
||||
CryptoOptions getCryptoOptions() {
|
||||
|
@ -175,7 +175,6 @@ public class PeerConnectionFactory {
|
||||
@Nullable private FecControllerFactoryFactoryInterface fecControllerFactoryFactory;
|
||||
@Nullable private NetworkControllerFactoryFactory networkControllerFactoryFactory;
|
||||
@Nullable private NetworkStatePredictorFactoryFactory networkStatePredictorFactoryFactory;
|
||||
@Nullable private MediaTransportFactoryFactory mediaTransportFactoryFactory;
|
||||
@Nullable private NetEqFactoryFactory neteqFactoryFactory;
|
||||
|
||||
private Builder() {}
|
||||
@ -247,13 +246,6 @@ public class PeerConnectionFactory {
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Sets a MediaTransportFactoryFactory for a PeerConnectionFactory. */
|
||||
public Builder setMediaTransportFactoryFactory(
|
||||
MediaTransportFactoryFactory mediaTransportFactoryFactory) {
|
||||
this.mediaTransportFactoryFactory = mediaTransportFactoryFactory;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a NetEqFactoryFactory for the PeerConnectionFactory. When using a
|
||||
* custom NetEqFactoryFactory, the AudioDecoderFactoryFactory will be set
|
||||
@ -284,9 +276,6 @@ public class PeerConnectionFactory {
|
||||
networkStatePredictorFactoryFactory == null
|
||||
? 0
|
||||
: networkStatePredictorFactoryFactory.createNativeNetworkStatePredictorFactory(),
|
||||
mediaTransportFactoryFactory == null
|
||||
? 0
|
||||
: mediaTransportFactoryFactory.createNativeMediaTransportFactory(),
|
||||
neteqFactoryFactory == null ? 0 : neteqFactoryFactory.createNativeNetEqFactory());
|
||||
}
|
||||
}
|
||||
@ -607,7 +596,7 @@ public class PeerConnectionFactory {
|
||||
long audioDecoderFactory, VideoEncoderFactory encoderFactory,
|
||||
VideoDecoderFactory decoderFactory, long nativeAudioProcessor,
|
||||
long nativeFecControllerFactory, long nativeNetworkControllerFactory,
|
||||
long nativeNetworkStatePredictorFactory, long mediaTransportFactory, long neteqFactory);
|
||||
long nativeNetworkStatePredictorFactory, long neteqFactory);
|
||||
|
||||
private static native long nativeCreatePeerConnection(long factory,
|
||||
PeerConnection.RTCConfiguration rtcConfig, MediaConstraints constraints, long nativeObserver,
|
||||
|
@ -264,11 +264,6 @@ void JavaToNativeRTCConfiguration(
|
||||
rtc_config->sdp_semantics = JavaToNativeSdpSemantics(jni, j_sdp_semantics);
|
||||
rtc_config->active_reset_srtp_params =
|
||||
Java_RTCConfiguration_getActiveResetSrtpParams(jni, j_rtc_config);
|
||||
rtc_config->use_media_transport =
|
||||
Java_RTCConfiguration_getUseMediaTransport(jni, j_rtc_config);
|
||||
rtc_config->use_media_transport_for_data_channels =
|
||||
Java_RTCConfiguration_getUseMediaTransportForDataChannels(jni,
|
||||
j_rtc_config);
|
||||
rtc_config->crypto_options =
|
||||
JavaToNativeOptionalCryptoOptions(jni, j_crypto_options);
|
||||
|
||||
|
@ -246,7 +246,7 @@ static void JNI_PeerConnectionFactory_ShutdownInternalTracer(JNIEnv* jni) {
|
||||
|
||||
// Following parameters are optional:
|
||||
// |audio_device_module|, |jencoder_factory|, |jdecoder_factory|,
|
||||
// |audio_processor|, |media_transport_factory|, |fec_controller_factory|,
|
||||
// |audio_processor|, |fec_controller_factory|,
|
||||
// |network_state_predictor_factory|, |neteq_factory|.
|
||||
ScopedJavaLocalRef<jobject> CreatePeerConnectionFactoryForJava(
|
||||
JNIEnv* jni,
|
||||
@ -263,7 +263,6 @@ ScopedJavaLocalRef<jobject> CreatePeerConnectionFactoryForJava(
|
||||
network_controller_factory,
|
||||
std::unique_ptr<NetworkStatePredictorFactoryInterface>
|
||||
network_state_predictor_factory,
|
||||
std::unique_ptr<MediaTransportFactory> media_transport_factory,
|
||||
std::unique_ptr<NetEqFactory> neteq_factory) {
|
||||
// talk/ assumes pretty widely that the current Thread is ThreadManager'd, but
|
||||
// ThreadManager only WrapCurrentThread()s the thread where it is first
|
||||
@ -310,7 +309,6 @@ ScopedJavaLocalRef<jobject> CreatePeerConnectionFactoryForJava(
|
||||
std::move(network_controller_factory);
|
||||
dependencies.network_state_predictor_factory =
|
||||
std::move(network_state_predictor_factory);
|
||||
dependencies.media_transport_factory = std::move(media_transport_factory);
|
||||
dependencies.neteq_factory = std::move(neteq_factory);
|
||||
|
||||
cricket::MediaEngineDependencies media_dependencies;
|
||||
@ -355,7 +353,6 @@ JNI_PeerConnectionFactory_CreatePeerConnectionFactory(
|
||||
jlong native_fec_controller_factory,
|
||||
jlong native_network_controller_factory,
|
||||
jlong native_network_state_predictor_factory,
|
||||
jlong native_media_transport_factory,
|
||||
jlong native_neteq_factory) {
|
||||
rtc::scoped_refptr<AudioProcessing> audio_processor =
|
||||
reinterpret_cast<AudioProcessing*>(native_audio_processor);
|
||||
@ -372,8 +369,6 @@ JNI_PeerConnectionFactory_CreatePeerConnectionFactory(
|
||||
native_network_controller_factory),
|
||||
TakeOwnershipOfUniquePtr<NetworkStatePredictorFactoryInterface>(
|
||||
native_network_state_predictor_factory),
|
||||
TakeOwnershipOfUniquePtr<MediaTransportFactory>(
|
||||
native_media_transport_factory),
|
||||
TakeOwnershipOfUniquePtr<NetEqFactory>(native_neteq_factory));
|
||||
}
|
||||
|
||||
|
@ -197,18 +197,6 @@ RTC_OBJC_EXPORT
|
||||
|
||||
@property(nonatomic, assign) BOOL allowCodecSwitching;
|
||||
|
||||
/**
|
||||
* If MediaTransportFactory is provided in PeerConnectionFactory, this flag informs PeerConnection
|
||||
* that it should use the MediaTransportInterface.
|
||||
*/
|
||||
@property(nonatomic, assign) BOOL useMediaTransport;
|
||||
|
||||
/**
|
||||
* If MediaTransportFactory is provided in PeerConnectionFactory, this flag informs PeerConnection
|
||||
* that it should use the MediaTransportInterface for data channels.
|
||||
*/
|
||||
@property(nonatomic, assign) BOOL useMediaTransportForDataChannels;
|
||||
|
||||
/**
|
||||
* Defines advanced optional cryptographic settings related to SRTP and
|
||||
* frame encryption for native WebRTC. Setting this will overwrite any
|
||||
|
@ -52,8 +52,6 @@
|
||||
@synthesize turnCustomizer = _turnCustomizer;
|
||||
@synthesize activeResetSrtpParams = _activeResetSrtpParams;
|
||||
@synthesize allowCodecSwitching = _allowCodecSwitching;
|
||||
@synthesize useMediaTransport = _useMediaTransport;
|
||||
@synthesize useMediaTransportForDataChannels = _useMediaTransportForDataChannels;
|
||||
@synthesize cryptoOptions = _cryptoOptions;
|
||||
@synthesize rtcpAudioReportIntervalMs = _rtcpAudioReportIntervalMs;
|
||||
@synthesize rtcpVideoReportIntervalMs = _rtcpVideoReportIntervalMs;
|
||||
@ -106,8 +104,6 @@
|
||||
_iceConnectionReceivingTimeout = config.ice_connection_receiving_timeout;
|
||||
_iceBackupCandidatePairPingInterval =
|
||||
config.ice_backup_candidate_pair_ping_interval;
|
||||
_useMediaTransport = config.use_media_transport;
|
||||
_useMediaTransportForDataChannels = config.use_media_transport_for_data_channels;
|
||||
_keyType = RTCEncryptionKeyTypeECDSA;
|
||||
_iceCandidatePoolSize = config.ice_candidate_pool_size;
|
||||
_shouldPruneTurnPorts = config.prune_turn_ports;
|
||||
@ -143,7 +139,7 @@
|
||||
- (NSString *)description {
|
||||
static NSString *formatString = @"RTC_OBJC_TYPE(RTCConfiguration): "
|
||||
@"{\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n%d\n%d\n%d\n"
|
||||
@"%d\n%@\n%d\n%d\n%d\n%d\n%d\n%@\n%d\n}\n";
|
||||
@"%d\n%@\n%d\n%d\n%d\n%d\n%d\n%@\n}\n";
|
||||
|
||||
return [NSString
|
||||
stringWithFormat:formatString,
|
||||
@ -169,7 +165,6 @@
|
||||
_disableIPV6OnWiFi,
|
||||
_maxIPv6Networks,
|
||||
_activeResetSrtpParams,
|
||||
_useMediaTransport,
|
||||
_enableDscp];
|
||||
}
|
||||
|
||||
@ -208,8 +203,6 @@
|
||||
_iceConnectionReceivingTimeout;
|
||||
nativeConfig->ice_backup_candidate_pair_ping_interval =
|
||||
_iceBackupCandidatePairPingInterval;
|
||||
nativeConfig->use_media_transport = _useMediaTransport;
|
||||
nativeConfig->use_media_transport_for_data_channels = _useMediaTransportForDataChannels;
|
||||
rtc::KeyType keyType =
|
||||
[[self class] nativeEncryptionKeyTypeForKeyType:_keyType];
|
||||
if (_certificate != nullptr) {
|
||||
|
@ -29,7 +29,6 @@
|
||||
|
||||
#include "api/jsep_ice_candidate.h"
|
||||
#include "api/rtc_event_log_output_file.h"
|
||||
#include "api/transport/media/media_transport_interface.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
|
||||
|
@ -17,7 +17,6 @@ namespace webrtc {
|
||||
class AudioDeviceModule;
|
||||
class AudioEncoderFactory;
|
||||
class AudioDecoderFactory;
|
||||
class MediaTransportFactory;
|
||||
class NetworkControllerFactoryInterface;
|
||||
class VideoEncoderFactory;
|
||||
class VideoDecoderFactory;
|
||||
@ -53,21 +52,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
audioProcessingModule:
|
||||
(rtc::scoped_refptr<webrtc::AudioProcessing>)audioProcessingModule;
|
||||
|
||||
- (instancetype)
|
||||
initWithNativeAudioEncoderFactory:
|
||||
(rtc::scoped_refptr<webrtc::AudioEncoderFactory>)audioEncoderFactory
|
||||
nativeAudioDecoderFactory:
|
||||
(rtc::scoped_refptr<webrtc::AudioDecoderFactory>)audioDecoderFactory
|
||||
nativeVideoEncoderFactory:
|
||||
(std::unique_ptr<webrtc::VideoEncoderFactory>)videoEncoderFactory
|
||||
nativeVideoDecoderFactory:
|
||||
(std::unique_ptr<webrtc::VideoDecoderFactory>)videoDecoderFactory
|
||||
audioDeviceModule:(nullable webrtc::AudioDeviceModule *)audioDeviceModule
|
||||
audioProcessingModule:
|
||||
(rtc::scoped_refptr<webrtc::AudioProcessing>)audioProcessingModule
|
||||
mediaTransportFactory:
|
||||
(std::unique_ptr<webrtc::MediaTransportFactory>)mediaTransportFactory;
|
||||
|
||||
- (instancetype)
|
||||
initWithNativeAudioEncoderFactory:
|
||||
(rtc::scoped_refptr<webrtc::AudioEncoderFactory>)audioEncoderFactory
|
||||
@ -81,14 +65,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
audioProcessingModule:
|
||||
(rtc::scoped_refptr<webrtc::AudioProcessing>)audioProcessingModule
|
||||
networkControllerFactory:(std::unique_ptr<webrtc::NetworkControllerFactoryInterface>)
|
||||
networkControllerFactory
|
||||
mediaTransportFactory:
|
||||
(std::unique_ptr<webrtc::MediaTransportFactory>)mediaTransportFactory;
|
||||
networkControllerFactory;
|
||||
|
||||
- (instancetype)
|
||||
initWithEncoderFactory:(nullable id<RTC_OBJC_TYPE(RTCVideoEncoderFactory)>)encoderFactory
|
||||
decoderFactory:(nullable id<RTC_OBJC_TYPE(RTCVideoDecoderFactory)>)decoderFactory
|
||||
mediaTransportFactory:(std::unique_ptr<webrtc::MediaTransportFactory>)mediaTransportFactory;
|
||||
decoderFactory:(nullable id<RTC_OBJC_TYPE(RTCVideoDecoderFactory)>)decoderFactory;
|
||||
|
||||
/** Initialize an RTCPeerConnection with a configuration, constraints, and
|
||||
* dependencies.
|
||||
|
@ -52,7 +52,6 @@
|
||||
// C++ target.
|
||||
// TODO(zhihuang): Remove nogncheck once MediaEngineInterface is moved to C++
|
||||
// API layer.
|
||||
#include "api/transport/media/media_transport_interface.h"
|
||||
#include "media/engine/webrtc_media_engine.h" // nogncheck
|
||||
|
||||
@implementation RTC_OBJC_TYPE (RTCPeerConnectionFactory) {
|
||||
@ -84,15 +83,13 @@
|
||||
nativeVideoDecoderFactory:webrtc::ObjCToNativeVideoDecoderFactory([[RTC_OBJC_TYPE(
|
||||
RTCVideoDecoderFactoryH264) alloc] init])
|
||||
audioDeviceModule:[self audioDeviceModule]
|
||||
audioProcessingModule:nullptr
|
||||
mediaTransportFactory:nullptr];
|
||||
audioProcessingModule:nullptr];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (instancetype)
|
||||
initWithEncoderFactory:(nullable id<RTC_OBJC_TYPE(RTCVideoEncoderFactory)>)encoderFactory
|
||||
decoderFactory:(nullable id<RTC_OBJC_TYPE(RTCVideoDecoderFactory)>)decoderFactory
|
||||
mediaTransportFactory:(std::unique_ptr<webrtc::MediaTransportFactory>)mediaTransportFactory {
|
||||
decoderFactory:(nullable id<RTC_OBJC_TYPE(RTCVideoDecoderFactory)>)decoderFactory {
|
||||
#ifdef HAVE_NO_MEDIA
|
||||
return [self initWithNoMedia];
|
||||
#else
|
||||
@ -109,18 +106,9 @@
|
||||
nativeVideoEncoderFactory:std::move(native_encoder_factory)
|
||||
nativeVideoDecoderFactory:std::move(native_decoder_factory)
|
||||
audioDeviceModule:[self audioDeviceModule]
|
||||
audioProcessingModule:nullptr
|
||||
mediaTransportFactory:std::move(mediaTransportFactory)];
|
||||
audioProcessingModule:nullptr];
|
||||
#endif
|
||||
}
|
||||
- (instancetype)
|
||||
initWithEncoderFactory:(nullable id<RTC_OBJC_TYPE(RTCVideoEncoderFactory)>)encoderFactory
|
||||
decoderFactory:(nullable id<RTC_OBJC_TYPE(RTCVideoDecoderFactory)>)decoderFactory {
|
||||
return [self initWithEncoderFactory:encoderFactory
|
||||
decoderFactory:decoderFactory
|
||||
mediaTransportFactory:nullptr];
|
||||
}
|
||||
|
||||
- (instancetype)initNative {
|
||||
if (self = [super init]) {
|
||||
_networkThread = rtc::Thread::CreateWithSocketServer();
|
||||
@ -170,30 +158,7 @@
|
||||
nativeVideoDecoderFactory:std::move(videoDecoderFactory)
|
||||
audioDeviceModule:audioDeviceModule
|
||||
audioProcessingModule:audioProcessingModule
|
||||
mediaTransportFactory:nullptr];
|
||||
}
|
||||
|
||||
- (instancetype)initWithNativeAudioEncoderFactory:
|
||||
(rtc::scoped_refptr<webrtc::AudioEncoderFactory>)audioEncoderFactory
|
||||
nativeAudioDecoderFactory:
|
||||
(rtc::scoped_refptr<webrtc::AudioDecoderFactory>)audioDecoderFactory
|
||||
nativeVideoEncoderFactory:
|
||||
(std::unique_ptr<webrtc::VideoEncoderFactory>)videoEncoderFactory
|
||||
nativeVideoDecoderFactory:
|
||||
(std::unique_ptr<webrtc::VideoDecoderFactory>)videoDecoderFactory
|
||||
audioDeviceModule:(webrtc::AudioDeviceModule *)audioDeviceModule
|
||||
audioProcessingModule:
|
||||
(rtc::scoped_refptr<webrtc::AudioProcessing>)audioProcessingModule
|
||||
mediaTransportFactory:(std::unique_ptr<webrtc::MediaTransportFactory>)
|
||||
mediaTransportFactory {
|
||||
return [self initWithNativeAudioEncoderFactory:audioEncoderFactory
|
||||
nativeAudioDecoderFactory:audioDecoderFactory
|
||||
nativeVideoEncoderFactory:std::move(videoEncoderFactory)
|
||||
nativeVideoDecoderFactory:std::move(videoDecoderFactory)
|
||||
audioDeviceModule:audioDeviceModule
|
||||
audioProcessingModule:audioProcessingModule
|
||||
networkControllerFactory:nullptr
|
||||
mediaTransportFactory:std::move(mediaTransportFactory)];
|
||||
networkControllerFactory:nullptr];
|
||||
}
|
||||
- (instancetype)initWithNativeAudioEncoderFactory:
|
||||
(rtc::scoped_refptr<webrtc::AudioEncoderFactory>)audioEncoderFactory
|
||||
@ -208,9 +173,7 @@
|
||||
(rtc::scoped_refptr<webrtc::AudioProcessing>)audioProcessingModule
|
||||
networkControllerFactory:
|
||||
(std::unique_ptr<webrtc::NetworkControllerFactoryInterface>)
|
||||
networkControllerFactory
|
||||
mediaTransportFactory:(std::unique_ptr<webrtc::MediaTransportFactory>)
|
||||
mediaTransportFactory {
|
||||
networkControllerFactory {
|
||||
if (self = [self initNative]) {
|
||||
webrtc::PeerConnectionFactoryDependencies dependencies;
|
||||
dependencies.network_thread = _networkThread.get();
|
||||
@ -235,7 +198,6 @@
|
||||
dependencies.event_log_factory =
|
||||
std::make_unique<webrtc::RtcEventLogFactory>(dependencies.task_queue_factory.get());
|
||||
dependencies.network_controller_factory = std::move(networkControllerFactory);
|
||||
dependencies.media_transport_factory = std::move(mediaTransportFactory);
|
||||
#endif
|
||||
_nativeFactory = webrtc::CreateModularPeerConnectionFactory(std::move(dependencies));
|
||||
NSAssert(_nativeFactory, @"Failed to initialize PeerConnectionFactory!");
|
||||
|
@ -13,7 +13,6 @@
|
||||
|
||||
#include "api/audio_codecs/audio_decoder_factory.h"
|
||||
#include "api/audio_codecs/audio_encoder_factory.h"
|
||||
#include "api/transport/media/media_transport_interface.h"
|
||||
#include "api/video_codecs/video_decoder_factory.h"
|
||||
#include "api/video_codecs/video_encoder_factory.h"
|
||||
#include "modules/audio_device/include/audio_device.h"
|
||||
@ -26,7 +25,6 @@
|
||||
rtc::scoped_refptr<webrtc::AudioDecoderFactory> _audioDecoderFactory;
|
||||
rtc::scoped_refptr<webrtc::AudioDeviceModule> _audioDeviceModule;
|
||||
rtc::scoped_refptr<webrtc::AudioProcessing> _audioProcessingModule;
|
||||
std::unique_ptr<webrtc::MediaTransportFactory> _mediaTransportFactory;
|
||||
}
|
||||
|
||||
+ (RTCPeerConnectionFactoryBuilder *)builder {
|
||||
@ -41,8 +39,7 @@
|
||||
nativeVideoEncoderFactory:std::move(_videoEncoderFactory)
|
||||
nativeVideoDecoderFactory:std::move(_videoDecoderFactory)
|
||||
audioDeviceModule:_audioDeviceModule
|
||||
audioProcessingModule:_audioProcessingModule
|
||||
mediaTransportFactory:std::move(_mediaTransportFactory)];
|
||||
audioProcessingModule:_audioProcessingModule];
|
||||
}
|
||||
|
||||
- (void)setVideoEncoderFactory:(std::unique_ptr<webrtc::VideoEncoderFactory>)videoEncoderFactory {
|
||||
|
@ -22,7 +22,6 @@ extern "C" {
|
||||
|
||||
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||
#include "api/transport/media/media_transport_interface.h"
|
||||
#include "api/video_codecs/video_decoder_factory.h"
|
||||
#include "api/video_codecs/video_encoder_factory.h"
|
||||
#include "modules/audio_device/include/audio_device.h"
|
||||
@ -50,8 +49,7 @@ extern "C" {
|
||||
nativeVideoEncoderFactory:nullptr
|
||||
nativeVideoDecoderFactory:nullptr
|
||||
audioDeviceModule:nullptr
|
||||
audioProcessingModule:nullptr
|
||||
mediaTransportFactory:nullptr]);
|
||||
audioProcessingModule:nullptr]);
|
||||
#endif
|
||||
RTCPeerConnectionFactoryBuilder* builder = [[RTCPeerConnectionFactoryBuilder alloc] init];
|
||||
RTC_OBJC_TYPE(RTCPeerConnectionFactory)* peerConnectionFactory =
|
||||
@ -72,8 +70,7 @@ extern "C" {
|
||||
nativeVideoEncoderFactory:nullptr
|
||||
nativeVideoDecoderFactory:nullptr
|
||||
audioDeviceModule:nullptr
|
||||
audioProcessingModule:nullptr
|
||||
mediaTransportFactory:nullptr]);
|
||||
audioProcessingModule:nullptr]);
|
||||
#endif
|
||||
RTCPeerConnectionFactoryBuilder* builder = [RTCPeerConnectionFactoryBuilder defaultBuilder];
|
||||
RTC_OBJC_TYPE(RTCPeerConnectionFactory)* peerConnectionFactory =
|
||||
|
Reference in New Issue
Block a user