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;
|
AVCaptureVideoOrientation orientation = AVCaptureVideoOrientationPortrait;
|
||||||
switch ([UIDevice currentDevice].orientation) {
|
switch ([UIDevice currentDevice].orientation) {
|
||||||
case UIDeviceOrientationPortrait:
|
case UIDeviceOrientationPortrait:
|
||||||
orientation = AVCaptureVideoOrientationPortraitUpsideDown;
|
|
||||||
case UIDeviceOrientationPortraitUpsideDown:
|
|
||||||
orientation = AVCaptureVideoOrientationPortrait;
|
orientation = AVCaptureVideoOrientationPortrait;
|
||||||
break;
|
break;
|
||||||
|
case UIDeviceOrientationPortraitUpsideDown:
|
||||||
|
orientation = AVCaptureVideoOrientationPortraitUpsideDown;
|
||||||
|
break;
|
||||||
case UIDeviceOrientationLandscapeLeft:
|
case UIDeviceOrientationLandscapeLeft:
|
||||||
orientation = AVCaptureVideoOrientationLandscapeRight;
|
orientation = AVCaptureVideoOrientationLandscapeRight;
|
||||||
break;
|
break;
|
||||||
|
@ -250,10 +250,11 @@ using namespace webrtc::videocapturemodule;
|
|||||||
switch ([UIDevice currentDevice].orientation) {
|
switch ([UIDevice currentDevice].orientation) {
|
||||||
case UIDeviceOrientationPortrait:
|
case UIDeviceOrientationPortrait:
|
||||||
_connection.videoOrientation =
|
_connection.videoOrientation =
|
||||||
AVCaptureVideoOrientationPortraitUpsideDown;
|
AVCaptureVideoOrientationPortrait;
|
||||||
|
break;
|
||||||
case UIDeviceOrientationPortraitUpsideDown:
|
case UIDeviceOrientationPortraitUpsideDown:
|
||||||
_connection.videoOrientation =
|
_connection.videoOrientation =
|
||||||
AVCaptureVideoOrientationPortrait;
|
AVCaptureVideoOrientationPortraitUpsideDown;
|
||||||
break;
|
break;
|
||||||
case UIDeviceOrientationLandscapeLeft:
|
case UIDeviceOrientationLandscapeLeft:
|
||||||
_connection.videoOrientation =
|
_connection.videoOrientation =
|
||||||
|
Reference in New Issue
Block a user