Considering orientation status during capture itself:N_SE-39786,N_SE-39880
authorrahul varna <rahul.varna@samsung.com>
Thu, 30 May 2013 03:25:46 +0000 (08:55 +0530)
committerrahul varna <rahul.varna@samsung.com>
Thu, 30 May 2013 03:25:46 +0000 (08:55 +0530)
Signed-off-by: rahul varna <rahul.varna@samsung.com>
project/src/Camera/CameraCaptureForm.cpp
project/src/Camera/CameraCaptureForm.h
project/src/Recorder/VideoRecorderForm.cpp

index 2056a8e..b7216ce 100644 (file)
@@ -200,6 +200,7 @@ CameraCaptureForm::CameraCaptureForm(void)
        , __flashModeIndex(INIT)
        , __previewFormatIndex(INIT)
        , __deviceOrientation(DEVICE_LANDSCAPE)
+       , __orientationAtCapture(DEVICE_LANDSCAPE)
        , __currentListViewId(INIT)
        , __brightnessSliderValue(INIT)
        , __contrastSliderValue(INIT)
@@ -1603,6 +1604,8 @@ CameraCaptureForm::Capture(void)
                TryCatch(r == E_SUCCESS, ShowError(r, METHOD_FILE_LINENO),"[%s] __pCamera->Capture()", GetErrorMessage(r));
        }
 
+       __orientationAtCapture = __deviceOrientation;
+
        return r;
 CATCH:
        Footer * pFotter = null;
@@ -2056,7 +2059,7 @@ CameraCaptureForm::LaunchImageViewer(String* pFile)
        pFilePath->Clear();
        pFilePath->Append(*pFile);
 
-       pDeviceOrientation = new (std::nothrow) Integer(__deviceOrientation);
+       pDeviceOrientation = new (std::nothrow) Integer(__orientationAtCapture);
        TryReturnVoid(pDeviceOrientation != null, "pDeviceOrientation string is null, no memory");
 
        pArg = new (std::nothrow) ArrayList;
@@ -2095,7 +2098,7 @@ CameraCaptureForm::LaunchImageViewer(int index)
        pFilePath->Clear();
        pFilePath->Append(*(String*)__pCapturedFileNameList->GetAt(index));
 
-       pDeviceOrientation = new (std::nothrow) Integer(__deviceOrientation);
+       pDeviceOrientation = new (std::nothrow) Integer(__orientationAtCapture);
        TryReturnVoid(pDeviceOrientation != null, "pDeviceOrientation string is null, no memory");
 
        pArg = new (std::nothrow) ArrayList;
index 6530136..9658350 100644 (file)
@@ -287,6 +287,7 @@ private:
        int __flashModeIndex;
        int __previewFormatIndex;
        int __deviceOrientation;
+       int __orientationAtCapture;
        int __currentListViewId;
        int __brightnessSliderValue;
        int __contrastSliderValue;
index 7881d66..98dac6f 100644 (file)
@@ -1485,7 +1485,6 @@ VideoRecorderForm::Activate(void* pActivateParam)
        {
                tempContainerType = static_cast< MediaContainerType >(tempVal);
        }
-       tempContainerType = MEDIA_CONTAINER_MP4;
 
        pTemp = (char*) &tempContainerType;
 
@@ -5540,6 +5539,7 @@ VideoRecorderForm::DoRotation(void)
        Draw();
 
        AppLog("VideoRecorderForm::DoRotation");
+       TryReturn(__pCamera != null, r, "__pCamera handle is null");
 
        r = CreateOverlayRegion();
        TryReturn(r == E_SUCCESS, r, "[%s] CreateOverlayRegion", GetErrorMessage(r));