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 | |
| 13 | #include "rtc_base/scoped_ref_ptr.h" |
| 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; |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 21 | class VideoEncoderFactory; |
| 22 | class VideoDecoderFactory; |
| 23 | class AudioProcessing; |
| 24 | |
| 25 | } // namespace webrtc |
| 26 | |
| 27 | NS_ASSUME_NONNULL_BEGIN |
| 28 | |
| 29 | /** |
| 30 | * This class extension exposes methods that work directly with injectable C++ components. |
| 31 | */ |
| 32 | @interface RTCPeerConnectionFactory () |
| 33 | |
| 34 | - (instancetype)initNative NS_DESIGNATED_INITIALIZER; |
| 35 | |
| 36 | /* Initializer used when WebRTC is compiled with no media support */ |
| 37 | - (instancetype)initWithNoMedia; |
| 38 | |
| 39 | /* Initialize object with injectable native audio/video encoder/decoder factories */ |
| 40 | - (instancetype)initWithNativeAudioEncoderFactory: |
| 41 | (rtc::scoped_refptr<webrtc::AudioEncoderFactory>)audioEncoderFactory |
| 42 | nativeAudioDecoderFactory: |
| 43 | (rtc::scoped_refptr<webrtc::AudioDecoderFactory>)audioDecoderFactory |
| 44 | nativeVideoEncoderFactory: |
| 45 | (std::unique_ptr<webrtc::VideoEncoderFactory>)videoEncoderFactory |
| 46 | nativeVideoDecoderFactory: |
| 47 | (std::unique_ptr<webrtc::VideoDecoderFactory>)videoDecoderFactory |
| 48 | audioDeviceModule: |
| 49 | (nullable webrtc::AudioDeviceModule *)audioDeviceModule |
| 50 | audioProcessingModule: |
| 51 | (rtc::scoped_refptr<webrtc::AudioProcessing>)audioProcessingModule; |
| 52 | |
Piotr (Peter) Slatala | e0c2e97 | 2018-10-08 09:43:21 -0700 | [diff] [blame] | 53 | - (instancetype) |
| 54 | initWithNativeAudioEncoderFactory: |
| 55 | (rtc::scoped_refptr<webrtc::AudioEncoderFactory>)audioEncoderFactory |
| 56 | nativeAudioDecoderFactory: |
| 57 | (rtc::scoped_refptr<webrtc::AudioDecoderFactory>)audioDecoderFactory |
| 58 | nativeVideoEncoderFactory: |
| 59 | (std::unique_ptr<webrtc::VideoEncoderFactory>)videoEncoderFactory |
| 60 | nativeVideoDecoderFactory: |
| 61 | (std::unique_ptr<webrtc::VideoDecoderFactory>)videoDecoderFactory |
| 62 | audioDeviceModule:(nullable webrtc::AudioDeviceModule *)audioDeviceModule |
| 63 | audioProcessingModule: |
| 64 | (rtc::scoped_refptr<webrtc::AudioProcessing>)audioProcessingModule |
| 65 | mediaTransportFactory: |
| 66 | (std::unique_ptr<webrtc::MediaTransportFactory>)mediaTransportFactory; |
| 67 | |
| 68 | - (instancetype)initWithEncoderFactory:(nullable id<RTCVideoEncoderFactory>)encoderFactory |
| 69 | decoderFactory:(nullable id<RTCVideoDecoderFactory>)decoderFactory |
| 70 | mediaTransportFactory: |
| 71 | (std::unique_ptr<webrtc::MediaTransportFactory>)mediaTransportFactory; |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 72 | @end |
| 73 | |
| 74 | NS_ASSUME_NONNULL_END |