blob: 8897c999e0a984173845fc39b5eef314fd4e8df5 [file] [log] [blame]
Jon Hjelleda99da82016-01-20 13:40:30 -08001/*
2 * Copyright 2015 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 <Foundation/Foundation.h>
12
13NS_ASSUME_NONNULL_BEGIN
14
Tze Kwang Chinf3cb49f2016-03-22 10:57:40 -070015#if defined(WEBRTC_IOS)
16@class RTCAVFoundationVideoSource;
17#endif
18@class RTCAudioTrack;
19@class RTCConfiguration;
20@class RTCMediaConstraints;
21@class RTCMediaStream;
22@class RTCPeerConnection;
23@class RTCVideoSource;
24@class RTCVideoTrack;
25@protocol RTCPeerConnectionDelegate;
26
Jon Hjelleda99da82016-01-20 13:40:30 -080027@interface RTCPeerConnectionFactory : NSObject
Tze Kwang Chinf3cb49f2016-03-22 10:57:40 -070028
29- (instancetype)init NS_DESIGNATED_INITIALIZER;
30
31#if defined(WEBRTC_IOS)
32/** Initialize an RTCAVFoundationVideoSource with constraints. */
33- (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints:
34 (nullable RTCMediaConstraints *)constraints;
35#endif
36
37/** Initialize an RTCAudioTrack with an id. */
38- (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId;
39
40/** Initialize an RTCVideoTrack with a source and an id. */
41- (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source
42 trackId:(NSString *)trackId;
43
44/** Initialize an RTCMediaStream with an id. */
45- (RTCMediaStream *)mediaStreamWithStreamId:(NSString *)streamId;
46
47/** Initialize an RTCPeerConnection with a configuration, constraints, and
48 * delegate.
49 */
50- (RTCPeerConnection *)peerConnectionWithConfiguration:
51 (RTCConfiguration *)configuration
52 constraints:
53 (RTCMediaConstraints *)constraints
54 delegate:
55 (nullable id<RTCPeerConnectionDelegate>)delegate;
56
Jon Hjelleda99da82016-01-20 13:40:30 -080057@end
58
59NS_ASSUME_NONNULL_END