blob: 7a57645c0e1c2093fb794a5405d07e1945c63659 [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
Mirko Bonadeid9708072019-01-25 20:26:48 +010013#include "api/scoped_refptr.h"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020014
15namespace webrtc {
16
17class AudioDeviceModule;
18class AudioEncoderFactory;
19class AudioDecoderFactory;
Piotr (Peter) Slatalae0c2e972018-10-08 09:43:21 -070020class MediaTransportFactory;
Sebastian Jansson77c0a622019-04-23 10:24:03 +020021class NetworkControllerFactoryInterface;
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020022class VideoEncoderFactory;
23class VideoDecoderFactory;
24class AudioProcessing;
25
26} // namespace webrtc
27
28NS_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) Slatalae0c2e972018-10-08 09:43:21 -070054- (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 Jansson77c0a622019-04-23 10:24:03 +020069- (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) Slatalae0c2e972018-10-08 09:43:21 -070086- (instancetype)initWithEncoderFactory:(nullable id<RTCVideoEncoderFactory>)encoderFactory
87 decoderFactory:(nullable id<RTCVideoDecoderFactory>)decoderFactory
88 mediaTransportFactory:
89 (std::unique_ptr<webrtc::MediaTransportFactory>)mediaTransportFactory;
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020090@end
91
92NS_ASSUME_NONNULL_END