blob: 2752cf411766b9046f4123232f34f4a45a701a96 [file] [log] [blame]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001/*
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
15namespace webrtc {
16
17class AudioDeviceModule;
18class AudioEncoderFactory;
19class AudioDecoderFactory;
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -070020class MediaTransportFactory;
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020021class VideoEncoderFactory;
22class VideoDecoderFactory;
23class AudioProcessing;
24
25} // namespace webrtc
26
27NS_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) Slatalae0c2e972018-10-08 09:43:21 -070053- (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 Carlsson7bca8ca2018-08-30 09:30:29 +020072@end
73
74NS_ASSUME_NONNULL_END