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

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

Issue 1696673003: Tweaks for new Objective-C API. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: More tweaks based on updating AppRTCDemo Created 4 years, 10 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
« no previous file with comments | « webrtc/api/objc/RTCVideoRenderer.h ('k') | webrtc/api/objctests/RTCSessionDescriptionTest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/objc/RTCVideoTrack.mm
diff --git a/webrtc/api/objc/RTCVideoTrack.mm b/webrtc/api/objc/RTCVideoTrack.mm
index 7422eff926ec44808dff11dc10ff1fb947ee2925..cb9f1a58234782de8b82473ee44772bedbd6d00e 100644
--- a/webrtc/api/objc/RTCVideoTrack.mm
+++ b/webrtc/api/objc/RTCVideoTrack.mm
@@ -33,12 +33,17 @@
rtc::scoped_refptr<webrtc::VideoTrackInterface> track =
factory.nativeFactory->CreateVideoTrack(nativeId,
source.nativeVideoSource);
- return [self initWithNativeTrack:track type:RTCMediaStreamTrackTypeVideo];
+ self = [super initWithNativeTrack:track type:RTCMediaStreamTrackTypeVideo];
hjon_webrtc 2016/02/19 20:55:34 If |source| was actually an RTCAVFoundationVideoSo
tkchin_webrtc 2016/02/19 23:26:38 you don't need to re-init the adapters, that shoul
hjon_webrtc 2016/02/19 23:58:36 Done.
+ if (self) {
+ _adapters = [NSMutableArray array];
+ _source = source;
+ }
+ return self;
}
-- (instancetype)initWithNativeMediaTrack:
+- (instancetype)initWithNativeTrack:
(rtc::scoped_refptr<webrtc::MediaStreamTrackInterface>)nativeMediaTrack
- type:(RTCMediaStreamTrackType)type {
+ type:(RTCMediaStreamTrackType)type {
NSParameterAssert(nativeMediaTrack);
NSParameterAssert(type == RTCMediaStreamTrackTypeVideo);
if (self = [super initWithNativeTrack:nativeMediaTrack type:type]) {
« no previous file with comments | « webrtc/api/objc/RTCVideoRenderer.h ('k') | webrtc/api/objctests/RTCSessionDescriptionTest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698