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 // TODO(hjon): Update nullability types. See http://crbug/webrtc/5592 | 14 // TODO(hjon): Update nullability types. See http://crbug/webrtc/5592 |
15 | 15 |
16 @class RTCAudioTrack; | 16 @class RTCAudioTrack; |
| 17 @class RTCPeerConnectionFactory; |
17 @class RTCVideoTrack; | 18 @class RTCVideoTrack; |
18 | 19 |
19 @interface RTCMediaStream : NSObject | 20 @interface RTCMediaStream : NSObject |
20 | 21 |
21 /** The audio tracks in this stream. */ | 22 /** The audio tracks in this stream. */ |
22 @property(nonatomic, strong, readonly) NSArray *audioTracks; | 23 @property(nonatomic, strong, readonly) NSArray *audioTracks; |
23 // @property(nonatomic, strong, readonly) NSArray<RTCAudioTrack *> *audioTracks; | 24 // @property(nonatomic, strong, readonly) NSArray<RTCAudioTrack *> *audioTracks; |
24 | 25 |
25 /** The video tracks in this stream. */ | 26 /** The video tracks in this stream. */ |
26 @property(nonatomic, strong, readonly) NSArray *videoTracks; | 27 @property(nonatomic, strong, readonly) NSArray *videoTracks; |
27 // @property(nonatomic, strong, readonly) NSArray<RTCVideoTrack *> *videoTracks; | 28 // @property(nonatomic, strong, readonly) NSArray<RTCVideoTrack *> *videoTracks; |
28 | 29 |
29 /** An identifier for this media stream. */ | 30 /** An identifier for this media stream. */ |
30 @property(nonatomic, readonly) NSString *streamId; | 31 @property(nonatomic, readonly) NSString *streamId; |
31 | 32 |
32 - (instancetype)init NS_UNAVAILABLE; | 33 - (instancetype)init NS_UNAVAILABLE; |
33 | 34 |
| 35 /** Initialize an RTCMediaStream with an id. */ |
| 36 - (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory |
| 37 streamId:(NSString *)streamId; |
| 38 |
34 /** Adds the given audio track to this media stream. */ | 39 /** Adds the given audio track to this media stream. */ |
35 - (void)addAudioTrack:(RTCAudioTrack *)audioTrack; | 40 - (void)addAudioTrack:(RTCAudioTrack *)audioTrack; |
36 | 41 |
37 /** Adds the given video track to this media stream. */ | 42 /** Adds the given video track to this media stream. */ |
38 - (void)addVideoTrack:(RTCVideoTrack *)videoTrack; | 43 - (void)addVideoTrack:(RTCVideoTrack *)videoTrack; |
39 | 44 |
40 /** Removes the given audio track to this media stream. */ | 45 /** Removes the given audio track to this media stream. */ |
41 - (void)removeAudioTrack:(RTCAudioTrack *)audioTrack; | 46 - (void)removeAudioTrack:(RTCAudioTrack *)audioTrack; |
42 | 47 |
43 /** Removes the given video track to this media stream. */ | 48 /** Removes the given video track to this media stream. */ |
44 - (void)removeVideoTrack:(RTCVideoTrack *)videoTrack; | 49 - (void)removeVideoTrack:(RTCVideoTrack *)videoTrack; |
45 | 50 |
46 @end | 51 @end |
47 | 52 |
48 NS_ASSUME_NONNULL_END | 53 NS_ASSUME_NONNULL_END |
OLD | NEW |