Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #import "RTCPeerConnectionFactory.h" |
| 12 | |
Mirko Bonadei | d970807 | 2019-01-25 20:26:48 +0100 | [diff] [blame] | 13 | #include "api/scoped_refptr.h" |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 14 | |
| 15 | namespace webrtc { |
| 16 | |
| 17 | class AudioDeviceModule; |
| 18 | class AudioEncoderFactory; |
| 19 | class AudioDecoderFactory; |
Piotr (Peter) Slatala | e0c2e97 | 2018-10-08 09:43:21 -0700 | [diff] [blame] | 20 | class MediaTransportFactory; |
Sebastian Jansson | 77c0a62 | 2019-04-23 10:24:03 +0200 | [diff] [blame] | 21 | class NetworkControllerFactoryInterface; |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 22 | class VideoEncoderFactory; |
| 23 | class VideoDecoderFactory; |
| 24 | class AudioProcessing; |
| 25 | |
| 26 | } // namespace webrtc |
| 27 | |
| 28 | NS_ASSUME_NONNULL_BEGIN |
| 29 | |
| 30 | /** |
| 31 | * This class extension exposes methods that work directly with injectable C++ components. |
| 32 | */ |
| 33 | @interface RTCPeerConnectionFactory () |
| 34 | |
| 35 | - (instancetype)initNative NS_DESIGNATED_INITIALIZER; |
| 36 | |
| 37 | /* Initializer used when WebRTC is compiled with no media support */ |
| 38 | - (instancetype)initWithNoMedia; |
| 39 | |
| 40 | /* Initialize object with injectable native audio/video encoder/decoder factories */ |
| 41 | - (instancetype)initWithNativeAudioEncoderFactory: |
| 42 | (rtc::scoped_refptr<webrtc::AudioEncoderFactory>)audioEncoderFactory |
| 43 | nativeAudioDecoderFactory: |
| 44 | (rtc::scoped_refptr<webrtc::AudioDecoderFactory>)audioDecoderFactory |
| 45 | nativeVideoEncoderFactory: |
| 46 | (std::unique_ptr<webrtc::VideoEncoderFactory>)videoEncoderFactory |
| 47 | nativeVideoDecoderFactory: |
| 48 | (std::unique_ptr<webrtc::VideoDecoderFactory>)videoDecoderFactory |
| 49 | audioDeviceModule: |
| 50 | (nullable webrtc::AudioDeviceModule *)audioDeviceModule |
| 51 | audioProcessingModule: |
| 52 | (rtc::scoped_refptr<webrtc::AudioProcessing>)audioProcessingModule; |
| 53 | |
Piotr (Peter) Slatala | e0c2e97 | 2018-10-08 09:43:21 -0700 | [diff] [blame] | 54 | - (instancetype) |
| 55 | initWithNativeAudioEncoderFactory: |
| 56 | (rtc::scoped_refptr<webrtc::AudioEncoderFactory>)audioEncoderFactory |
| 57 | nativeAudioDecoderFactory: |
| 58 | (rtc::scoped_refptr<webrtc::AudioDecoderFactory>)audioDecoderFactory |
| 59 | nativeVideoEncoderFactory: |
| 60 | (std::unique_ptr<webrtc::VideoEncoderFactory>)videoEncoderFactory |
| 61 | nativeVideoDecoderFactory: |
| 62 | (std::unique_ptr<webrtc::VideoDecoderFactory>)videoDecoderFactory |
| 63 | audioDeviceModule:(nullable webrtc::AudioDeviceModule *)audioDeviceModule |
| 64 | audioProcessingModule: |
| 65 | (rtc::scoped_refptr<webrtc::AudioProcessing>)audioProcessingModule |
| 66 | mediaTransportFactory: |
| 67 | (std::unique_ptr<webrtc::MediaTransportFactory>)mediaTransportFactory; |
| 68 | |
Sebastian Jansson | 77c0a62 | 2019-04-23 10:24:03 +0200 | [diff] [blame] | 69 | - (instancetype) |
| 70 | initWithNativeAudioEncoderFactory: |
| 71 | (rtc::scoped_refptr<webrtc::AudioEncoderFactory>)audioEncoderFactory |
| 72 | nativeAudioDecoderFactory: |
| 73 | (rtc::scoped_refptr<webrtc::AudioDecoderFactory>)audioDecoderFactory |
| 74 | nativeVideoEncoderFactory: |
| 75 | (std::unique_ptr<webrtc::VideoEncoderFactory>)videoEncoderFactory |
| 76 | nativeVideoDecoderFactory: |
| 77 | (std::unique_ptr<webrtc::VideoDecoderFactory>)videoDecoderFactory |
| 78 | audioDeviceModule:(nullable webrtc::AudioDeviceModule *)audioDeviceModule |
| 79 | audioProcessingModule: |
| 80 | (rtc::scoped_refptr<webrtc::AudioProcessing>)audioProcessingModule |
| 81 | networkControllerFactory:(std::unique_ptr<webrtc::NetworkControllerFactoryInterface>) |
| 82 | networkControllerFactory |
| 83 | mediaTransportFactory: |
| 84 | (std::unique_ptr<webrtc::MediaTransportFactory>)mediaTransportFactory; |
| 85 | |
Piotr (Peter) Slatala | e0c2e97 | 2018-10-08 09:43:21 -0700 | [diff] [blame] | 86 | - (instancetype)initWithEncoderFactory:(nullable id<RTCVideoEncoderFactory>)encoderFactory |
| 87 | decoderFactory:(nullable id<RTCVideoDecoderFactory>)decoderFactory |
| 88 | mediaTransportFactory: |
| 89 | (std::unique_ptr<webrtc::MediaTransportFactory>)mediaTransportFactory; |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 90 | @end |
| 91 | |
| 92 | NS_ASSUME_NONNULL_END |