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