blob: 6c8a6027665f6779eeb5fcecfa958e0d1013c60f [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
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020011#import "RTCMediaStream.h"
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080012
Steve Anton10542f22019-01-11 09:11:00 -080013#include "api/media_stream_interface.h"
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080014
15NS_ASSUME_NONNULL_BEGIN
16
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020017@interface RTC_OBJC_TYPE (RTCMediaStream)
18()
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080019
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020020 /**
21 * MediaStreamInterface representation of this RTCMediaStream object. This is
22 * needed to pass to the underlying C++ APIs.
23 */
24 @property(nonatomic,
25 readonly) rtc::scoped_refptr<webrtc::MediaStreamInterface> nativeMediaStream;
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080026
Tze Kwang Chinf3cb49f2016-03-22 10:57:40 -070027/** Initialize an RTCMediaStream with an id. */
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020028- (instancetype)initWithFactory:(RTC_OBJC_TYPE(RTCPeerConnectionFactory) *)factory
29 streamId:(NSString *)streamId;
Tze Kwang Chinf3cb49f2016-03-22 10:57:40 -070030
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080031/** Initialize an RTCMediaStream from a native MediaStreamInterface. */
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020032- (instancetype)initWithFactory:(RTC_OBJC_TYPE(RTCPeerConnectionFactory) *)factory
Yura Yaroshevichc806c1d2018-06-21 12:51:11 +030033 nativeMediaStream:(rtc::scoped_refptr<webrtc::MediaStreamInterface>)nativeMediaStream;
Jon Hjelle2bf9a5f2016-01-21 16:14:11 -080034
35@end
36
37NS_ASSUME_NONNULL_END