blob: e3ab754f3a9cae082579c55ecf8f3907a0bf7f2b [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
14
15@class RTCAudioTrack;
hjona2f77982016-03-04 07:09:09 -080016@class RTCPeerConnectionFactory;
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080017@class RTCVideoTrack;
18
19@interface RTCMediaStream : NSObject
20
21/** The audio tracks in this stream. */
Jon Hjelle32e0c012016-03-08 16:04:46 -080022@property(nonatomic, strong, readonly) NSArray<RTCAudioTrack *> *audioTracks;
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080023
24/** The video tracks in this stream. */
Jon Hjelle32e0c012016-03-08 16:04:46 -080025@property(nonatomic, strong, readonly) NSArray<RTCVideoTrack *> *videoTracks;
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080026
27/** An identifier for this media stream. */
28@property(nonatomic, readonly) NSString *streamId;
29
30- (instancetype)init NS_UNAVAILABLE;
31
hjona2f77982016-03-04 07:09:09 -080032/** Initialize an RTCMediaStream with an id. */
33- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory
34 streamId:(NSString *)streamId;
35
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080036/** Adds the given audio track to this media stream. */
37- (void)addAudioTrack:(RTCAudioTrack *)audioTrack;
38
39/** Adds the given video track to this media stream. */
40- (void)addVideoTrack:(RTCVideoTrack *)videoTrack;
41
42/** Removes the given audio track to this media stream. */
43- (void)removeAudioTrack:(RTCAudioTrack *)audioTrack;
44
45/** Removes the given video track to this media stream. */
46- (void)removeVideoTrack:(RTCVideoTrack *)videoTrack;
47
48@end
49
50NS_ASSUME_NONNULL_END