blob: 7df1ea8ea80ee8c12d419a210f4548d2e5deccc0 [file] [log] [blame]
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -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
hjon6b039952016-02-25 12:32:58 -080014// TODO(hjon): Update nullability types. See http://crbug/webrtc/5592
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080015
16@class RTCAudioTrack;
hjona2f77982016-03-04 07:09:09 -080017@class RTCPeerConnectionFactory;
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080018@class RTCVideoTrack;
19
20@interface RTCMediaStream : NSObject
21
22/** The audio tracks in this stream. */
hjon6b039952016-02-25 12:32:58 -080023@property(nonatomic, strong, readonly) NSArray *audioTracks;
24// @property(nonatomic, strong, readonly) NSArray<RTCAudioTrack *> *audioTracks;
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080025
26/** The video tracks in this stream. */
hjon6b039952016-02-25 12:32:58 -080027@property(nonatomic, strong, readonly) NSArray *videoTracks;
28// @property(nonatomic, strong, readonly) NSArray<RTCVideoTrack *> *videoTracks;
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080029
30/** An identifier for this media stream. */
31@property(nonatomic, readonly) NSString *streamId;
32
33- (instancetype)init NS_UNAVAILABLE;
34
hjona2f77982016-03-04 07:09:09 -080035/** Initialize an RTCMediaStream with an id. */
36- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory
37 streamId:(NSString *)streamId;
38
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080039/** Adds the given audio track to this media stream. */
40- (void)addAudioTrack:(RTCAudioTrack *)audioTrack;
41
42/** Adds the given video track to this media stream. */
43- (void)addVideoTrack:(RTCVideoTrack *)videoTrack;
44
45/** Removes the given audio track to this media stream. */
46- (void)removeAudioTrack:(RTCAudioTrack *)audioTrack;
47
48/** Removes the given video track to this media stream. */
49- (void)removeVideoTrack:(RTCVideoTrack *)videoTrack;
50
51@end
52
53NS_ASSUME_NONNULL_END