blob: be064bdd9b0e176674173b7272a2c701a63b8fa7 [file] [log] [blame]
Jon Hjellef6c318e2016-01-11 14:39:01 -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
Jon Hjelle065aacc2016-01-20 13:25:44 -080011#import "RTCVideoSource.h"
Jon Hjellef6c318e2016-01-11 14:39:01 -080012
Henrik Kjellander15583c12016-02-10 10:53:12 +010013#include "webrtc/api/videosourceinterface.h"
Jon Hjellef6c318e2016-01-11 14:39:01 -080014
15NS_ASSUME_NONNULL_BEGIN
16
Jon Hjelle065aacc2016-01-20 13:25:44 -080017@interface RTCVideoSource ()
Jon Hjellef6c318e2016-01-11 14:39:01 -080018
19/**
perkja3ede6c2016-03-08 01:27:48 +010020 * The VideoTrackSourceInterface object passed to this RTCVideoSource during
Jon Hjellef6c318e2016-01-11 14:39:01 -080021 * construction.
22 */
23@property(nonatomic, readonly)
perkja3ede6c2016-03-08 01:27:48 +010024 rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>
25 nativeVideoSource;
Jon Hjellef6c318e2016-01-11 14:39:01 -080026
perkja3ede6c2016-03-08 01:27:48 +010027/** Initialize an RTCVideoSource from a native VideoTrackSourceInterface. */
Jon Hjelle065aacc2016-01-20 13:25:44 -080028- (instancetype)initWithNativeVideoSource:
perkja3ede6c2016-03-08 01:27:48 +010029 (rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>)nativeVideoSource
Jon Hjellef6c318e2016-01-11 14:39:01 -080030 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
42NS_ASSUME_NONNULL_END