fix rotation issue introduced by fixe of mode display_filter_auto_rotate

This commit is contained in:
Jehan Monnier 2013-04-22 10:48:36 +02:00
parent 336d090a90
commit ed0ad82970
5 changed files with 8 additions and 21 deletions

View file

@ -202,24 +202,7 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
[super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
CGRect frame = [videoPreview frame];
switch (toInterfaceOrientation) {
case UIInterfaceOrientationPortrait:
[videoPreview setTransform: CGAffineTransformMakeRotation(0)];
break;
case UIInterfaceOrientationPortraitUpsideDown:
[videoPreview setTransform: CGAffineTransformMakeRotation(M_PI)];
break;
case UIInterfaceOrientationLandscapeLeft:
[videoPreview setTransform: CGAffineTransformMakeRotation(M_PI / 2)];
break;
case UIInterfaceOrientationLandscapeRight:
[videoPreview setTransform: CGAffineTransformMakeRotation(-M_PI / 2)];
break;
default:
break;
}
[videoPreview setFrame:frame];
// in mode display_filter_auto_rotate=0, no need to rotate the preview
}

View file

@ -14,7 +14,6 @@ capture=1
show_local=0
enabled=1
size=qvga
display_filter_auto_rotate=1
automatically_initiate=0
automatically_accept=0

View file

@ -45,3 +45,5 @@ sharing_server=https://www.linphone.org:444/upload.php
ice=1
stun=stun.linphone.org
[video]
display_filter_auto_rotate=0

View file

@ -44,3 +44,6 @@ transport=tls
sharing_server=https://www.linphone.org:444/upload.php
ice=1
stun=stun.linphone.org
[video]
display_filter_auto_rotate=0

View file

@ -14,7 +14,6 @@ capture=1
show_local=1
enabled=1
size=vga
display_filter_auto_rotate=1
automatically_initiate=0
automatically_accept=0
@ -27,4 +26,5 @@ animations_preference=1
edge_opt_preference=0
[default_values]
reg_expires=600
reg_expires=600