Match video orientation with device orientation for portrait and portrait upside down
BUG= R=tkchin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/55459004 Patch from Jon Hjelle <hjon@andynet.net>. Cr-Commit-Position: refs/heads/master@{#9336}
This commit is contained in:
@ -262,10 +262,11 @@ static dispatch_queue_t kBackgroundQueue = nil;
|
||||
AVCaptureVideoOrientation orientation = AVCaptureVideoOrientationPortrait;
|
||||
switch ([UIDevice currentDevice].orientation) {
|
||||
case UIDeviceOrientationPortrait:
|
||||
orientation = AVCaptureVideoOrientationPortraitUpsideDown;
|
||||
case UIDeviceOrientationPortraitUpsideDown:
|
||||
orientation = AVCaptureVideoOrientationPortrait;
|
||||
break;
|
||||
case UIDeviceOrientationPortraitUpsideDown:
|
||||
orientation = AVCaptureVideoOrientationPortraitUpsideDown;
|
||||
break;
|
||||
case UIDeviceOrientationLandscapeLeft:
|
||||
orientation = AVCaptureVideoOrientationLandscapeRight;
|
||||
break;
|
||||
|
@ -250,10 +250,11 @@ using namespace webrtc::videocapturemodule;
|
||||
switch ([UIDevice currentDevice].orientation) {
|
||||
case UIDeviceOrientationPortrait:
|
||||
_connection.videoOrientation =
|
||||
AVCaptureVideoOrientationPortraitUpsideDown;
|
||||
AVCaptureVideoOrientationPortrait;
|
||||
break;
|
||||
case UIDeviceOrientationPortraitUpsideDown:
|
||||
_connection.videoOrientation =
|
||||
AVCaptureVideoOrientationPortrait;
|
||||
AVCaptureVideoOrientationPortraitUpsideDown;
|
||||
break;
|
||||
case UIDeviceOrientationLandscapeLeft:
|
||||
_connection.videoOrientation =
|
||||
|
Reference in New Issue
Block a user