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

Unified Diff: webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m

Issue 1497393002: Add new view that renders local video using AVCaptureLayerPreview. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removing duplicated check in presubmit.py Created 5 years 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/examples/objc/AppRTCDemo/ios/ARDVideoCallView.m ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m
diff --git a/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m
index 8de6b959f026150a13fa87be3d1bd9026890096f..51290a05b585bed47fe4074f17bf80b0cbec5026 100644
--- a/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m
+++ b/webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallViewController.m
@@ -128,18 +128,21 @@
if (_localVideoTrack == localVideoTrack) {
return;
}
- [_localVideoTrack removeRenderer:_videoCallView.localVideoView];
_localVideoTrack = nil;
- [_videoCallView.localVideoView renderFrame:nil];
_localVideoTrack = localVideoTrack;
- [_localVideoTrack addRenderer:_videoCallView.localVideoView];
+ RTCAVFoundationVideoSource *source = nil;
+ if ([localVideoTrack.source
+ isKindOfClass:[RTCAVFoundationVideoSource class]]) {
+ source = (RTCAVFoundationVideoSource*)localVideoTrack.source;
+ }
+ _videoCallView.localVideoView.captureSession = source.captureSession;
}
- (void)setRemoteVideoTrack:(RTCVideoTrack *)remoteVideoTrack {
if (_remoteVideoTrack == remoteVideoTrack) {
return;
}
- [_remoteVideoTrack removeRenderer:_videoCallView.localVideoView];
+ [_remoteVideoTrack removeRenderer:_videoCallView.remoteVideoView];
_remoteVideoTrack = nil;
[_videoCallView.remoteVideoView renderFrame:nil];
_remoteVideoTrack = remoteVideoTrack;
« no previous file with comments | « webrtc/examples/objc/AppRTCDemo/ios/ARDVideoCallView.m ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698