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 | |
Mirko Bonadei | a81e9c8 | 2020-05-04 16:14:32 +0200 | [diff] [blame] | 20 | @interface RTC_OBJC_TYPE (RTCVideoSource) |
| 21 | () |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 22 | |
Mirko Bonadei | a81e9c8 | 2020-05-04 16:14:32 +0200 | [diff] [blame] | 23 | /** |
| 24 | * The VideoTrackSourceInterface object passed to this RTCVideoSource during |
| 25 | * construction. |
| 26 | */ |
| 27 | @property(nonatomic, |
| 28 | readonly) rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> nativeVideoSource; |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 29 | |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 30 | /** Initialize an RTCVideoSource from a native VideoTrackSourceInterface. */ |
Mirko Bonadei | a81e9c8 | 2020-05-04 16:14:32 +0200 | [diff] [blame] | 31 | - (instancetype)initWithFactory:(RTC_OBJC_TYPE(RTCPeerConnectionFactory) *)factory |
Yura Yaroshevich | 01cee07 | 2018-07-11 15:35:40 +0300 | [diff] [blame] | 32 | nativeVideoSource: |
| 33 | (rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>)nativeVideoSource |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 34 | NS_DESIGNATED_INITIALIZER; |
| 35 | |
Mirko Bonadei | a81e9c8 | 2020-05-04 16:14:32 +0200 | [diff] [blame] | 36 | - (instancetype)initWithFactory:(RTC_OBJC_TYPE(RTCPeerConnectionFactory) *)factory |
Yura Yaroshevich | 01cee07 | 2018-07-11 15:35:40 +0300 | [diff] [blame] | 37 | nativeMediaSource:(rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource |
| 38 | type:(RTCMediaSourceType)type NS_UNAVAILABLE; |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 39 | |
Mirko Bonadei | a81e9c8 | 2020-05-04 16:14:32 +0200 | [diff] [blame] | 40 | - (instancetype)initWithFactory:(RTC_OBJC_TYPE(RTCPeerConnectionFactory) *)factory |
Yura Yaroshevich | 01cee07 | 2018-07-11 15:35:40 +0300 | [diff] [blame] | 41 | signalingThread:(rtc::Thread *)signalingThread |
| 42 | workerThread:(rtc::Thread *)workerThread; |
Anders Carlsson | 9823ee4 | 2018-03-07 10:32:03 +0100 | [diff] [blame] | 43 | |
Saúl Ibarra Corretgé | 4d0760e | 2021-08-06 16:17:12 +0200 | [diff] [blame] | 44 | - (instancetype)initWithFactory:(RTC_OBJC_TYPE(RTCPeerConnectionFactory) *)factory |
| 45 | signalingThread:(rtc::Thread *)signalingThread |
| 46 | workerThread:(rtc::Thread *)workerThread |
| 47 | isScreenCast:(BOOL)isScreenCast; |
| 48 | |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 49 | @end |
| 50 | |
| 51 | NS_ASSUME_NONNULL_END |