]> sjero.net Git - linphone/commitdiff
Fix regression video with Galaxy S.
authorGuillaume Beraudo <guillaume.beraudo@belledonne-communications.com>
Tue, 21 Jun 2011 13:33:33 +0000 (15:33 +0200)
committerGuillaume Beraudo <guillaume.beraudo@belledonne-communications.com>
Tue, 21 Jun 2011 13:33:33 +0000 (15:33 +0200)
video/AndroidCameraRecordManager.java

index beb8fecb060cd5171a0585bea82ded34a2f324c3..6ad9a78defb255ce60cca1902088d98a4271e728 100644 (file)
@@ -294,7 +294,10 @@ public class AndroidCameraRecordManager {
 
                final int phoneOrientation = mAlwaysChangingPhoneOrientation;
                final int cameraOrientation = cc.getCameraOrientation(cameraId);
-               final int rotation = (cameraOrientation + phoneOrientation) % 360;
+               int frontCameraCorrection = 0;
+               if (cc.isFrontCamera(cameraId)) // TODO: check with other phones (Nexus S, ...)
+                       frontCameraCorrection=180; // hack that "just works" on Galaxy S.
+               final int rotation = (cameraOrientation + phoneOrientation + frontCameraCorrection) % 360;
                Log.d("Capture video buffer of cameraId=",cameraId,
                                " will need a rotation of ",rotation,
                                " degrees: camera_orientation=",cameraOrientation,