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

Unified Diff: webrtc/api/objc/RTCMediaSource.mm

Issue 1546783002: Move RTCVideoSource to webrtc/api/objc. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@updateRTCMediaSource
Patch Set: Changes based on feedback Created 4 years, 11 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/api/objc/RTCMediaSource.mm
diff --git a/webrtc/api/objc/RTCMediaSource.mm b/webrtc/api/objc/RTCMediaSource.mm
index 5f46ab831891bf243a82cba0173fc94e526f31d2..5d462ff471c0e66e28c4cee200a429d8ab4dc257 100644
--- a/webrtc/api/objc/RTCMediaSource.mm
+++ b/webrtc/api/objc/RTCMediaSource.mm
@@ -12,12 +12,11 @@
#import "webrtc/api/objc/RTCMediaSource+Private.h"
-@implementation RTCMediaSource {
- rtc::scoped_refptr<webrtc::MediaSourceInterface> _nativeMediaSource;
-}
+@implementation RTCMediaSource
- (RTCSourceState)state {
- return [[self class] sourceStateForNativeState:_nativeMediaSource->state()];
+ return [[self class] sourceStateForNativeState:
+ self.nativeMediaSource->state()];
}
- (NSString *)description {
@@ -28,16 +27,13 @@
#pragma mark - Private
- (rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource {
- return _nativeMediaSource;
+ [self doesNotRecognizeSelector:_cmd];
+ return nullptr;
}
-- (instancetype)initWithNativeMediaSource:
tkchin_webrtc 2016/01/13 02:26:27 You know what, I think the safest thing to do is t
hjon 2016/01/13 18:07:00 If we keep this ctor as a designated initializer a
tkchin_webrtc 2016/01/14 01:34:02 The RTCVideoSource ctor will call [super initWithN
hjon 2016/01/14 17:04:24 Let me think through this "out loud" to work throu
tkchin_webrtc 2016/01/14 22:27:41 Aha I gotcha. Sorry, I didn't think it through. Al
hjon 2016/01/14 23:18:10 It was a good exercise to think through it again a
- (rtc::scoped_refptr<webrtc::MediaSourceInterface>)nativeMediaSource {
- NSParameterAssert(nativeMediaSource);
- if (self = [super init]) {
- _nativeMediaSource = nativeMediaSource;
- }
- return self;
+- (rtc::scoped_refptr<webrtc::VideoSourceInterface>)nativeVideoSource {
+ [self doesNotRecognizeSelector:_cmd];
+ return nullptr;
}
+ (webrtc::MediaSourceInterface::SourceState)nativeSourceStateForState:

Powered by Google App Engine
This is Rietveld 408576698