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

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

Issue 2401033002: iOS: Fix rotation bug for back camera (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm b/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm
index 4195f9bd37e804a79b79f73d914b010f3b798421..f104b9dc46cb9d4c3bfbcad2ba96d6b91d87fb21 100644
--- a/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm
+++ b/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm
@@ -629,10 +629,12 @@ static BOOL SetFormatForCaptureDevice(AVCaptureDevice *device,
_rotation = webrtc::kVideoRotation_270;
break;
case UIDeviceOrientationLandscapeLeft:
- _rotation = webrtc::kVideoRotation_180;
+ _rotation = _capturer->GetUseBackCamera() ? webrtc::kVideoRotation_0
+ : webrtc::kVideoRotation_180;
break;
case UIDeviceOrientationLandscapeRight:
- _rotation = webrtc::kVideoRotation_0;
+ _rotation = _capturer->GetUseBackCamera() ? webrtc::kVideoRotation_180
+ : webrtc::kVideoRotation_0;
break;
case UIDeviceOrientationFaceUp:
case UIDeviceOrientationFaceDown:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698