Chromium Code Reviews| 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: |