Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -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 | |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame^] | 11 | #import "RTCVideoSource.h" |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 12 | |
tkchin | d4bfbfc | 2016-08-30 11:56:05 -0700 | [diff] [blame] | 13 | #import "RTCMediaSource+Private.h" |
| 14 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 15 | #include "api/mediastreaminterface.h" |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 16 | |
| 17 | NS_ASSUME_NONNULL_BEGIN |
| 18 | |
Jon Hjelle | 065aacc | 2016-01-20 13:25:44 -0800 | [diff] [blame] | 19 | @interface RTCVideoSource () |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 20 | |
| 21 | /** |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 22 | * The VideoTrackSourceInterface object passed to this RTCVideoSource during |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 23 | * construction. |
| 24 | */ |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 25 | @property(nonatomic, readonly) rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> |
| 26 | nativeVideoSource; |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 27 | |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 28 | /** Initialize an RTCVideoSource from a native VideoTrackSourceInterface. */ |
Yura Yaroshevich | 01cee07 | 2018-07-11 15:35:40 +0300 | [diff] [blame] | 29 | - (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory |
| 30 | nativeVideoSource: |
| 31 | (rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>)nativeVideoSource |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 32 | NS_DESIGNATED_INITIALIZER; |
| 33 | |
Yura Yaroshevich | 01cee07 | 2018-07-11 15:35:40 +0300 | [diff] [blame] | 34 | - (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory |
| 35 | nativeMediaSource:(rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource |
| 36 | type:(RTCMediaSourceType)type NS_UNAVAILABLE; |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 37 | |
Yura Yaroshevich | 01cee07 | 2018-07-11 15:35:40 +0300 | [diff] [blame] | 38 | - (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory |
| 39 | signalingThread:(rtc::Thread *)signalingThread |
| 40 | workerThread:(rtc::Thread *)workerThread; |
Anders Carlsson | 9823ee4 | 2018-03-07 10:32:03 +0100 | [diff] [blame] | 41 | |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 42 | @end |
| 43 | |
| 44 | NS_ASSUME_NONNULL_END |