OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #import <Foundation/Foundation.h> | 11 #import <Foundation/Foundation.h> |
12 | 12 |
13 NS_ASSUME_NONNULL_BEGIN | 13 NS_ASSUME_NONNULL_BEGIN |
14 | 14 |
15 #if defined(WEBRTC_IOS) | |
16 @class RTCAVFoundationVideoSource; | 15 @class RTCAVFoundationVideoSource; |
17 #endif | |
18 @class RTCAudioTrack; | 16 @class RTCAudioTrack; |
19 @class RTCConfiguration; | 17 @class RTCConfiguration; |
20 @class RTCMediaConstraints; | 18 @class RTCMediaConstraints; |
21 @class RTCMediaStream; | 19 @class RTCMediaStream; |
22 @class RTCPeerConnection; | 20 @class RTCPeerConnection; |
23 @class RTCVideoSource; | 21 @class RTCVideoSource; |
24 @class RTCVideoTrack; | 22 @class RTCVideoTrack; |
25 @protocol RTCPeerConnectionDelegate; | 23 @protocol RTCPeerConnectionDelegate; |
26 | 24 |
27 @interface RTCPeerConnectionFactory : NSObject | 25 @interface RTCPeerConnectionFactory : NSObject |
28 | 26 |
29 - (instancetype)init NS_DESIGNATED_INITIALIZER; | 27 - (instancetype)init NS_DESIGNATED_INITIALIZER; |
30 | 28 |
31 #if defined(WEBRTC_IOS) | |
32 /** Initialize an RTCAVFoundationVideoSource with constraints. */ | 29 /** Initialize an RTCAVFoundationVideoSource with constraints. */ |
33 - (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints: | 30 - (RTCAVFoundationVideoSource *)avFoundationVideoSourceWithConstraints: |
34 (nullable RTCMediaConstraints *)constraints; | 31 (nullable RTCMediaConstraints *)constraints; |
35 #endif | |
36 | 32 |
37 /** Initialize an RTCAudioTrack with an id. */ | 33 /** Initialize an RTCAudioTrack with an id. */ |
38 - (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId; | 34 - (RTCAudioTrack *)audioTrackWithTrackId:(NSString *)trackId; |
39 | 35 |
40 /** Initialize an RTCVideoTrack with a source and an id. */ | 36 /** Initialize an RTCVideoTrack with a source and an id. */ |
41 - (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source | 37 - (RTCVideoTrack *)videoTrackWithSource:(RTCVideoSource *)source |
42 trackId:(NSString *)trackId; | 38 trackId:(NSString *)trackId; |
43 | 39 |
44 /** Initialize an RTCMediaStream with an id. */ | 40 /** Initialize an RTCMediaStream with an id. */ |
45 - (RTCMediaStream *)mediaStreamWithStreamId:(NSString *)streamId; | 41 - (RTCMediaStream *)mediaStreamWithStreamId:(NSString *)streamId; |
46 | 42 |
47 /** Initialize an RTCPeerConnection with a configuration, constraints, and | 43 /** Initialize an RTCPeerConnection with a configuration, constraints, and |
48 * delegate. | 44 * delegate. |
49 */ | 45 */ |
50 - (RTCPeerConnection *)peerConnectionWithConfiguration: | 46 - (RTCPeerConnection *)peerConnectionWithConfiguration: |
51 (RTCConfiguration *)configuration | 47 (RTCConfiguration *)configuration |
52 constraints: | 48 constraints: |
53 (RTCMediaConstraints *)constraints | 49 (RTCMediaConstraints *)constraints |
54 delegate: | 50 delegate: |
55 (nullable id<RTCPeerConnectionDelegate>)delegate; | 51 (nullable id<RTCPeerConnectionDelegate>)delegate; |
56 | 52 |
57 @end | 53 @end |
58 | 54 |
59 NS_ASSUME_NONNULL_END | 55 NS_ASSUME_NONNULL_END |
OLD | NEW |