blob: 7d69aaae7c68bde9191fa06f583e44b6f62bba17 [file] [log] [blame]
tkchind4bfbfc2016-08-30 11:56:05 -07001/*
2 * Copyright 2016 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 Carlsson7bca8ca2018-08-30 09:30:29 +020011#import "RTCMediaSource.h"
tkchind4bfbfc2016-08-30 11:56:05 -070012
Steve Anton10542f22019-01-11 09:11:00 -080013#include "api/media_stream_interface.h"
tkchind4bfbfc2016-08-30 11:56:05 -070014
15NS_ASSUME_NONNULL_BEGIN
16
Yura Yaroshevich01cee072018-07-11 15:35:40 +030017@class RTCPeerConnectionFactory;
18
tkchind4bfbfc2016-08-30 11:56:05 -070019typedef NS_ENUM(NSInteger, RTCMediaSourceType) {
20 RTCMediaSourceTypeAudio,
21 RTCMediaSourceTypeVideo,
22};
23
24@interface RTCMediaSource ()
25
Yves Gerey665174f2018-06-19 15:03:05 +020026@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::MediaSourceInterface> nativeMediaSource;
tkchind4bfbfc2016-08-30 11:56:05 -070027
Yura Yaroshevich01cee072018-07-11 15:35:40 +030028- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory
29 nativeMediaSource:(rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource
30 type:(RTCMediaSourceType)type NS_DESIGNATED_INITIALIZER;
tkchind4bfbfc2016-08-30 11:56:05 -070031
Yves Gerey665174f2018-06-19 15:03:05 +020032+ (webrtc::MediaSourceInterface::SourceState)nativeSourceStateForState:(RTCSourceState)state;
tkchind4bfbfc2016-08-30 11:56:05 -070033
Yves Gerey665174f2018-06-19 15:03:05 +020034+ (RTCSourceState)sourceStateForNativeState:(webrtc::MediaSourceInterface::SourceState)nativeState;
tkchind4bfbfc2016-08-30 11:56:05 -070035
36+ (NSString *)stringForState:(RTCSourceState)state;
37
38@end
39
40NS_ASSUME_NONNULL_END