blob: c363d3390e5378d16e5a009bfe59ed13d7ff65de [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/**
Jon Hjelle065aacc2016-01-20 13:25:44 -080020 * The VideoSourceInterface object passed to this RTCVideoSource during
Jon Hjellef6c318e2016-01-11 14:39:01 -080021 * construction.
22 */
23@property(nonatomic, readonly)
Jon Hjelle065aacc2016-01-20 13:25:44 -080024 rtc::scoped_refptr<webrtc::VideoSourceInterface> nativeVideoSource;
Jon Hjellef6c318e2016-01-11 14:39:01 -080025
Jon Hjelle065aacc2016-01-20 13:25:44 -080026/** Initialize an RTCVideoSource from a native VideoSourceInterface. */
27- (instancetype)initWithNativeVideoSource:
28 (rtc::scoped_refptr<webrtc::VideoSourceInterface>)nativeVideoSource
Jon Hjellef6c318e2016-01-11 14:39:01 -080029 NS_DESIGNATED_INITIALIZER;
30
31+ (webrtc::MediaSourceInterface::SourceState)nativeSourceStateForState:
32 (RTCSourceState)state;
33
34+ (RTCSourceState)sourceStateForNativeState:
35 (webrtc::MediaSourceInterface::SourceState)nativeState;
36
37+ (NSString *)stringForState:(RTCSourceState)state;
38
39@end
40
41NS_ASSUME_NONNULL_END