Jon Hjelle | da99da8 | 2016-01-20 13:40:30 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 13 | NS_ASSUME_NONNULL_BEGIN |
| 14 | |
Tze Kwang Chin | f3cb49f | 2016-03-22 10:57:40 -0700 | [diff] [blame] | 15 | #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 Hjelle | da99da8 | 2016-01-20 13:40:30 -0800 | [diff] [blame] | 27 | @interface RTCPeerConnectionFactory : NSObject |
Tze Kwang Chin | f3cb49f | 2016-03-22 10:57:40 -0700 | [diff] [blame] | 28 | |
| 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 Hjelle | da99da8 | 2016-01-20 13:40:30 -0800 | [diff] [blame] | 57 | @end |
| 58 | |
| 59 | NS_ASSUME_NONNULL_END |