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 | |
Jon Hjelle | 065aacc | 2016-01-20 13:25:44 -0800 | [diff] [blame] | 11 | #import "RTCVideoSource.h" |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 12 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 13 | #include "webrtc/api/videosourceinterface.h" |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 14 | |
| 15 | NS_ASSUME_NONNULL_BEGIN |
| 16 | |
Jon Hjelle | 065aacc | 2016-01-20 13:25:44 -0800 | [diff] [blame] | 17 | @interface RTCVideoSource () |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 18 | |
| 19 | /** |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame^] | 20 | * The VideoTrackSourceInterface object passed to this RTCVideoSource during |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 21 | * construction. |
| 22 | */ |
| 23 | @property(nonatomic, readonly) |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame^] | 24 | rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> |
| 25 | nativeVideoSource; |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 26 | |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame^] | 27 | /** Initialize an RTCVideoSource from a native VideoTrackSourceInterface. */ |
Jon Hjelle | 065aacc | 2016-01-20 13:25:44 -0800 | [diff] [blame] | 28 | - (instancetype)initWithNativeVideoSource: |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame^] | 29 | (rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>)nativeVideoSource |
Jon Hjelle | f6c318e | 2016-01-11 14:39:01 -0800 | [diff] [blame] | 30 | NS_DESIGNATED_INITIALIZER; |
| 31 | |
| 32 | + (webrtc::MediaSourceInterface::SourceState)nativeSourceStateForState: |
| 33 | (RTCSourceState)state; |
| 34 | |
| 35 | + (RTCSourceState)sourceStateForNativeState: |
| 36 | (webrtc::MediaSourceInterface::SourceState)nativeState; |
| 37 | |
| 38 | + (NSString *)stringForState:(RTCSourceState)state; |
| 39 | |
| 40 | @end |
| 41 | |
| 42 | NS_ASSUME_NONNULL_END |