2016-01-11 14:39:01 -08:00
|
|
|
/*
|
|
|
|
|
* Copyright 2015 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2016-01-20 13:25:44 -08:00
|
|
|
#import "RTCVideoSource.h"
|
2016-01-11 14:39:01 -08:00
|
|
|
|
2016-02-10 10:53:12 +01:00
|
|
|
#include "webrtc/api/videosourceinterface.h"
|
2016-01-11 14:39:01 -08:00
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
2016-01-20 13:25:44 -08:00
|
|
|
@interface RTCVideoSource ()
|
2016-01-11 14:39:01 -08:00
|
|
|
|
|
|
|
|
/**
|
2016-01-20 13:25:44 -08:00
|
|
|
* The VideoSourceInterface object passed to this RTCVideoSource during
|
2016-01-11 14:39:01 -08:00
|
|
|
* construction.
|
|
|
|
|
*/
|
|
|
|
|
@property(nonatomic, readonly)
|
2016-01-20 13:25:44 -08:00
|
|
|
rtc::scoped_refptr<webrtc::VideoSourceInterface> nativeVideoSource;
|
2016-01-11 14:39:01 -08:00
|
|
|
|
2016-01-20 13:25:44 -08:00
|
|
|
/** Initialize an RTCVideoSource from a native VideoSourceInterface. */
|
|
|
|
|
- (instancetype)initWithNativeVideoSource:
|
|
|
|
|
(rtc::scoped_refptr<webrtc::VideoSourceInterface>)nativeVideoSource
|
2016-01-11 14:39:01 -08:00
|
|
|
NS_DESIGNATED_INITIALIZER;
|
|
|
|
|
|
|
|
|
|
+ (webrtc::MediaSourceInterface::SourceState)nativeSourceStateForState:
|
|
|
|
|
(RTCSourceState)state;
|
|
|
|
|
|
|
|
|
|
+ (RTCSourceState)sourceStateForNativeState:
|
|
|
|
|
(webrtc::MediaSourceInterface::SourceState)nativeState;
|
|
|
|
|
|
|
|
|
|
+ (NSString *)stringForState:(RTCSourceState)state;
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|