Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(871)

Unified Diff: webrtc/sdk/objc/Framework/Classes/RTCMediaSource.mm

Issue 2290583003: iOS: Add ability to specify audio constraints. (Closed)
Patch Set: Update ctor order. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/objc/Framework/Classes/RTCMediaSource.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCVideoSource.mm b/webrtc/sdk/objc/Framework/Classes/RTCMediaSource.mm
similarity index 69%
copy from webrtc/sdk/objc/Framework/Classes/RTCVideoSource.mm
copy to webrtc/sdk/objc/Framework/Classes/RTCMediaSource.mm
index eddf5e0c684d7ad51a0d0360053d700fc0942b00..996563b6506764e560e2a9fe4a6ccd0e5d77521b 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCVideoSource.mm
+++ b/webrtc/sdk/objc/Framework/Classes/RTCMediaSource.mm
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 The WebRTC project authors. All Rights Reserved.
+ * Copyright 2016 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
@@ -8,36 +8,33 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#import "RTCVideoSource+Private.h"
+#import "RTCMediaSource+Private.h"
-@implementation RTCVideoSource {
- rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> _nativeVideoSource;
-}
-
-- (RTCSourceState)state {
- return [[self class] sourceStateForNativeState:_nativeVideoSource->state()];
-}
+#include "webrtc/base/checks.h"
-- (NSString *)description {
- return [NSString stringWithFormat:@"RTCVideoSource:\n%@",
- [[self class] stringForState:self.state]];
+@implementation RTCMediaSource {
+ RTCMediaSourceType _type;
}
-#pragma mark - Private
-
-- (rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>)nativeVideoSource {
- return _nativeVideoSource;
-}
+@synthesize nativeMediaSource = _nativeMediaSource;
-- (instancetype)initWithNativeVideoSource:
- (rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>)nativeVideoSource {
- NSParameterAssert(nativeVideoSource);
+- (instancetype)initWithNativeMediaSource:
+ (rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource
+ type:(RTCMediaSourceType)type {
+ RTC_DCHECK(nativeMediaSource);
if (self = [super init]) {
- _nativeVideoSource = nativeVideoSource;
+ _nativeMediaSource = nativeMediaSource;
+ _type = type;
}
return self;
}
+- (RTCSourceState)state {
+ return [[self class] sourceStateForNativeState:_nativeMediaSource->state()];
+}
+
+#pragma mark - Private
+
+ (webrtc::MediaSourceInterface::SourceState)nativeSourceStateForState:
(RTCSourceState)state {
switch (state) {
« no previous file with comments | « webrtc/sdk/objc/Framework/Classes/RTCAudioTrack+Private.h ('k') | webrtc/sdk/objc/Framework/Classes/RTCMediaSource+Private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698