Revision: 201001
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 18 Jan 2010 20:06:55 +0200
changeset 1 f5ec9446e5bf
parent 0 1ddebce53859
child 2 e8773a61782d
Revision: 201001 Kit: 201003
camerauis/cameraapp/build/cameraapp.mmp
camerauis/cameraapp/generic/GsCamcorderPlugin/data/gscamerapluginrsc.rss
camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamcorderPlugin.cpp
camerauis/cameraapp/generic/camerauiconfigmanager/bwins/camerauiconfigmanageru.def
camerauis/cameraapp/generic/camerauiconfigmanager/conf/camerauiconfigmanager.confml
camerauis/cameraapp/generic/camerauiconfigmanager/conf/camerauiconfigmanager_2001B29B.crml
camerauis/cameraapp/generic/camerauiconfigmanager/eabi/camerauiconfigmanageru.def
camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraConfigurationCrKeys.h
camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraDynamicSettings.hrh
camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraUiConfigManager.h
camerauis/cameraapp/generic/camerauiconfigmanager/src/CameraUiConfigManager.cpp
camerauis/cameraapp/generic/camerauiconfigmanager/src/CameraUiConfigManagerImp.cpp
camerauis/cameraapp/generic/common/inc/Cam.hrh
camerauis/cameraapp/generic/common/inc/mcamsettingsmodel.h
camerauis/cameraapp/generic/common/src/CamStaticSettingsModel.cpp
camerauis/cameraapp/generic/inc/CamAppController.h
camerauis/cameraapp/generic/inc/CamAppUi.h
camerauis/cameraapp/generic/inc/CamSettingsModel.h
camerauis/cameraapp/generic/inc/cameracontroller/camcameraevents.h
camerauis/cameraapp/generic/inc/camsnapshotrotator.h
camerauis/cameraapp/generic/src/CamAppController.cpp
camerauis/cameraapp/generic/src/CamAppui.cpp
camerauis/cameraapp/generic/src/CamCaptureSetupSlider.cpp
camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp
camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp
camerauis/cameraapp/generic/src/CamSettingsModel.cpp
camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp
camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp
camerauis/cameraapp/generic/src/CamVideoPreCaptureContainer.cpp
camerauis/cameraapp/generic/src/CamZoomPane.cpp
camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp
camerauis/cameraapp/generic/src/camlinevfgriddrawer.cpp
camerauis/cameraapp/generic/src/camsnapshotrotator.cpp
camerauis/cameraapp/traces/OstTraceDefinitions.h
--- a/camerauis/cameraapp/build/cameraapp.mmp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/build/cameraapp.mmp	Mon Jan 18 20:06:55 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -189,7 +189,8 @@
 SOURCE          CamDriveChangeNotifier.cpp
 SOURCE          camoneclickuploadutility.cpp
 SOURCE          CamMemoryMonitor.cpp
-SOURCE 		cambackupcontainer.cpp
+SOURCE 	        cambackupcontainer.cpp
+SOURCE          camsnapshotrotator.cpp
 
 // Camera controller sources
 SOURCEPATH      ../generic/src/cameracontroller
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/data/gscamerapluginrsc.rss	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/data/gscamerapluginrsc.rss	Mon Jan 18 20:06:55 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -264,6 +264,7 @@
             { 
             command = EAknCmdOpen; 
             txt = qtn_msk_open; 
+            flags = EEikMenuItemAction;
             },
 #ifdef __SERIES60_HELP
         MENU_ITEM
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamcorderPlugin.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamcorderPlugin.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -535,7 +535,23 @@
     {
     if ( LaunchedFromGS() )
         {
-        return iSettingsModel->IntegerSettingValue( aSettingItem );
+        TInt settingValue = iSettingsModel->IntegerSettingValue( aSettingItem );
+
+        if (  ( ECamSettingItemPhotoMediaStorage == aSettingItem || 
+                ECamSettingItemVideoMediaStorage == aSettingItem ) && 
+              ( settingValue == ECamMediaStorageCard ) &&
+              ( CamUtility::MemoryCardStatus() != ECamMemoryCardInserted ) )
+          {
+          if ( CamUtility::MassMemoryDrive() > 0 )
+              {
+              settingValue = ECamMediaStorageMassStorage;
+              }
+          else
+              {
+              settingValue = ECamMediaStoragePhone;
+              }
+          }
+        return settingValue;
         }
     else
         {
--- a/camerauis/cameraapp/generic/camerauiconfigmanager/bwins/camerauiconfigmanageru.def	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/camerauiconfigmanager/bwins/camerauiconfigmanageru.def	Mon Jan 18 20:06:55 2010 +0200
@@ -59,4 +59,5 @@
 	?SupportedSecondaryCameraZoomOutKeysL@CCameraUiConfigManager@@QAEXAAV?$RArray@H@@@Z @ 58 NONAME ; void CCameraUiConfigManager::SupportedSecondaryCameraZoomOutKeysL(class RArray<int> &)
 	?IsDSAViewFinderSupported@CCameraUiConfigManager@@QBEHH@Z @ 59 NONAME ; int CCameraUiConfigManager::IsDSAViewFinderSupported(int) const
 	?CriticalLevelRamMemoryFocusGained@CCameraUiConfigManager@@QBEHXZ @ 60 NONAME ; int CCameraUiConfigManager::CriticalLevelRamMemoryFocusGained(void) const
+	?SupportedScreenModesL@CCameraUiConfigManager@@QAEXAAV?$RArray@H@@@Z @ 61 NONAME ; void CCameraUiConfigManager::SupportedScreenModesL(class RArray<int> &)
 
Binary file camerauis/cameraapp/generic/camerauiconfigmanager/conf/camerauiconfigmanager.confml has changed
Binary file camerauis/cameraapp/generic/camerauiconfigmanager/conf/camerauiconfigmanager_2001B29B.crml has changed
--- a/camerauis/cameraapp/generic/camerauiconfigmanager/eabi/camerauiconfigmanageru.def	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/camerauiconfigmanager/eabi/camerauiconfigmanageru.def	Mon Jan 18 20:06:55 2010 +0200
@@ -63,4 +63,5 @@
 	_ZTI25CCameraUiConfigManagerImp @ 62 NONAME
 	_ZTV22CCameraUiConfigManager @ 63 NONAME
 	_ZTV25CCameraUiConfigManagerImp @ 64 NONAME
+	_ZN22CCameraUiConfigManager21SupportedScreenModesLER6RArrayIiE @ 65 NONAME
 
--- a/camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraConfigurationCrKeys.h	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraConfigurationCrKeys.h	Mon Jan 18 20:06:55 2010 +0200
@@ -86,7 +86,7 @@
 const TUint32 KCamCrFeatureImageSceneModeNightPotrait       = 0x049;
 const TUint32 KCamCrFeatureBurstFileSizeEstimateFactor      = 0x04A;
 const TUint32 KCamCrFeatureZoomDelays                       = 0x04B;
-
+const TUint32 KCamCrFeatureScreenModes                      = 0x04C;
 
 // Cr key for Settings where we check both for feature support 
 // And configured setting items
--- a/camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraDynamicSettings.hrh	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraDynamicSettings.hrh	Mon Jan 18 20:06:55 2010 +0200
@@ -104,6 +104,7 @@
     ECamDynamicSettingBurstFileSizeEstimateFactor,
     
     ECamDynamicSettingZoomDelays,
+    ECamDynamicSettingScreenModes,
     
     // video scene mode and scene specific setting cr keys
     ECamDynamicSettingVideoSceneModeNormal,
--- a/camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraUiConfigManager.h	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/camerauiconfigmanager/inc/CameraUiConfigManager.h	Mon Jan 18 20:06:55 2010 +0200
@@ -454,7 +454,13 @@
         * @return ETrue if continuous autofocus feature is enabled
         */
         IMPORT_C TBool IsContinuosAutofocusSupported() const; 
-        
+        /*
+        * @aSupportedValues[0] -> Value for iLandscapeScreenMode
+        * @aSupportedValues[1] -> Value for iPortraitScreenmode
+        */
+        IMPORT_C void SupportedScreenModesL( 
+                                    RArray<TInt>& aSupportedValues );
+
  private:
         void ConstructL();
   
--- a/camerauis/cameraapp/generic/camerauiconfigmanager/src/CameraUiConfigManager.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/camerauiconfigmanager/src/CameraUiConfigManager.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -694,7 +694,11 @@
 //
 EXPORT_C TBool CCameraUiConfigManager::IsUIOrientationOverrideSupported() const
     {
+#if defined(__WINS__) || defined(__WINSCW__)
+    return EFalse;
+#else    
     return iConfigManagerImp->IsFeatureSupported( ECamDynamicSettingUIOrientationOverride );
+#endif    
     }
 
 // ----------------------------------------------------------------------------------
@@ -743,5 +747,15 @@
     {
     return iConfigManagerImp->IsFeatureSupported( ECamDynamicSettingContinuousAF );
     }
-		
+	
+// ----------------------------------------------------------------------------------
+// CCameraUiConfigManager::SupportedScreenModesL
+// ----------------------------------------------------------------------------------
+//    
+EXPORT_C void CCameraUiConfigManager::SupportedScreenModesL( 
+                                        RArray<TInt>& aSupportedValues )
+    {
+    iConfigManagerImp->SupportedSettingItemsL( ECamDynamicSettingScreenModes,
+                                               aSupportedValues );
+    }	
 //End of File
--- a/camerauis/cameraapp/generic/camerauiconfigmanager/src/CameraUiConfigManagerImp.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/camerauiconfigmanager/src/CameraUiConfigManagerImp.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -297,6 +297,7 @@
             case ECamDynamicSettingMaxExtendedZoomLimits:
             case ECamDynamicSettingMaxDigitalZoomLimits:
             case ECamDynamicSettingZoomDelays:
+            case ECamDynamicSettingScreenModes:
                 {
                 PRINT1( _L("Camera <> CCameraUiConfigManagerImp::LoadAllDynamicSettingsL() %d" ), settingId )
                 LoadConfiguredSettingItemValuesFromCrL( settingId,
@@ -797,6 +798,9 @@
         case ECamDynamicSettingZoomDelays:
                 crKey = KCamCrFeatureZoomDelays;
                 break;
+        case ECamDynamicSettingScreenModes:
+                crKey = KCamCrFeatureScreenModes;
+                break;
         default:
             PRINT( _L("Camera <> CCameraUiConfigManagerImp::MapSettingItemToCrItemsKeyL, leave!!!" ) )
             User::Leave( KErrNotSupported );
@@ -840,6 +844,7 @@
         case ECamDynamicSettingVideoSceneModeNight:
         case ECamDynamicSettingVideoSceneModeLowLight:
         case ECamDynamicSettingZoomDelays:
+        case ECamDynamicSettingScreenModes:
              loadFromCr = EFalse;
              break;
         default:
--- a/camerauis/cameraapp/generic/common/inc/Cam.hrh	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/common/inc/Cam.hrh	Mon Jan 18 20:06:55 2010 +0200
@@ -161,10 +161,6 @@
   ECamCmdCustomiseToolbarUp,
   ECamCmdCustomiseToolbarDown,
   ECamCmdCustomiseToolbarReset,
-  
-  ECamCmdSend, // NOTE any new commands should be placed before this
-               // with the exception of the AIW command below
-  ECamCmdAIWCommands = 200, // AIW needs to have its own area
   ECamCmdEditPhoto,
   ECamCmdEditVideo,
   ECamCmdPrint,
@@ -179,8 +175,11 @@
   ECamCmdRecord,
   ECamCmdToolbarExtension,  // Command ID for toolbar extension button
   ECamCmdToolbarMarkUnmark, // for sequence post capture view
-  ECamCmdToggleActiveToolbar // switches activepalette visibility
-
+  ECamCmdToggleActiveToolbar, // switches activepalette visibility
+  
+  ECamCmdSend, // NOTE any new commands should be placed before this
+               // with the exception of the AIW command below
+  ECamCmdAIWCommands = 200 // AIW needs to have its own area
   };
 
 enum TCamWaitNoteCtrls
--- a/camerauis/cameraapp/generic/common/inc/mcamsettingsmodel.h	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/common/inc/mcamsettingsmodel.h	Mon Jan 18 20:06:55 2010 +0200
@@ -291,6 +291,12 @@
     * @since 5.0
     */
     virtual void StoreFaceTrackingValue() = 0;
+    
+    /**
+    * Store UserScene settings
+    * @since 5.1
+    */
+    virtual void StoreUserSceneSettingsL() = 0;
   };
 // ===========================================================================
 
--- a/camerauis/cameraapp/generic/common/src/CamStaticSettingsModel.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/common/src/CamStaticSettingsModel.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -1082,7 +1082,7 @@
 //
 void CCamStaticSettingsModel::StorePrimaryCameraSettingsL()
     {
-    PRINT( _L("Camera => CCamSettingsModel::StorePrimaryCameraSettingsL"))
+    PRINT( _L("Camera => CCamStaticSettingsModel::StorePrimaryCameraSettingsL"))
     TInt settingIndex = SearchInSettingsListFor( iStaticPhotoIntSettings, 
                                                  ECamSettingItemPhotoQuality );
     if ( settingIndex != KErrNotFound )
@@ -1098,6 +1098,7 @@
         iPrimaryCameraSettings.iVideoQuality = 
             iStaticVideoIntSettings[settingIndex]->iValueId;
         }
+    PRINT( _L("Camera <= CCamStaticSettingsModel::StorePrimaryCameraSettingsL"))    
     }
 
 // ---------------------------------------------------------------------------
--- a/camerauis/cameraapp/generic/inc/CamAppController.h	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamAppController.h	Mon Jan 18 20:06:55 2010 +0200
@@ -22,7 +22,6 @@
 // ===========================================================================
 //  INCLUDES
 #include <e32base.h>
-#include <ProductVariant.hrh>
 
 #include <cflistener.h> // publish zoom state related
 #include <cfclient.h>
@@ -106,7 +105,7 @@
 class CCamGSInterface;
 class CCameraUiConfigManager;
 class CCamPropertyWatcher;
-
+class CCamSnapShotRotator;
 
 
 class CCamFlashStatus;
@@ -2192,6 +2191,11 @@
          */
         TBool VideoInitNeeded();
         
+        /**
+         * Stores the UserScene settings
+         */
+        void StoreUserSceneSettingsL();
+        
   private:
 
     // -----------------------------------------------------
@@ -2560,10 +2564,11 @@
     TBool iDeepSleepTimerExpired;
     // not owned by camappcontroller
     CCameraUiConfigManager* iConfigManager;
-    TBool iVideoInitNeeded; // Used to decide if the need to call CAE video init //PS
+    TBool iVideoInitNeeded; // Used to decide if the need to call CAE video init
     CCamSyncRotatorAo* iRotatorAo;
     CFbsBitmap* iRotatedSnapshot;
     CCamBurstCaptureArray* iRotationArray;
+    CCamSnapShotRotator* iSnapShotRotator;
     // orientation at capture time
     TCamImageOrientation  iCaptureOrientation;
     
--- a/camerauis/cameraapp/generic/inc/CamAppUi.h	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamAppUi.h	Mon Jan 18 20:06:55 2010 +0200
@@ -1765,9 +1765,12 @@
         T2ndCamOrientation iLockedQwertyState; 
         TBool iUiConstructionComplete;
         CCamMemoryMonitor* iMemoryMonitor;
-        
+		        
         //Flag to monitor viewfinder window handle switch
         TBool iViewFinderInTransit;
+
+		TInt iLandscapeScreenMode;
+        TInt iPortraitScreenMode;
         };
 
 // ===========================================================================
--- a/camerauis/cameraapp/generic/inc/CamSettingsModel.h	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/CamSettingsModel.h	Mon Jan 18 20:06:55 2010 +0200
@@ -608,6 +608,12 @@
                  RPointerArray<TIntSetting>& aDest, 
                  TBool aRestore = EFalse);
 
+    /**
+    * Store UserScene Settings 
+    * @since 5.1
+    */
+    void StoreUserSceneSettingsL();
+    
   private: // Functions from base classes
 
     /**
--- a/camerauis/cameraapp/generic/inc/cameracontroller/camcameraevents.h	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/inc/cameracontroller/camcameraevents.h	Mon Jan 18 20:06:55 2010 +0200
@@ -39,6 +39,7 @@
 
   ECamCameraEventReserveGain,
   ECamCameraEventReserveLose,
+  ECamCameraEventReserveRequested,
 
   ECamCameraEventPowerOn,
   ECamCameraEventPowerOff,      
@@ -156,6 +157,7 @@
 
   (const TUint16*)_S16("ECamCameraEventReserveGain"),
   (const TUint16*)_S16("ECamCameraEventReserveLose"),
+  (const TUint16*)_S16("ECamCameraEventReserveRequested"),
   (const TUint16*)_S16("ECamCameraEventPowerOn"),
   (const TUint16*)_S16("ECamCameraEventPowerOff"),      
   (const TUint16*)_S16("ECamCameraEventIveRecover"),
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraapp/generic/inc/camsnapshotrotator.h	Mon Jan 18 20:06:55 2010 +0200
@@ -0,0 +1,109 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Utility class to rotate bitmaps*
+*/
+
+
+
+
+
+#ifndef __CAMSNAPSHOTROTATOR_H
+#define __CAMSNAPSHOTROTATOR_H
+
+//  INCLUDES
+#include <bitmaptransforms.h>
+
+#include "CamSyncRotatorAo.h"
+
+// CONSTANTS
+
+// MACROS
+
+// DATA TYPES
+
+// FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATION
+class CCamAppController;
+
+/**
+*  Utility class to help in the rotating of bitmaps (for post-capture snapshot)
+*
+*  @since 5.1
+*/
+class CCamSnapShotRotator : public CBase, public MBitmapRotationObserver
+    {
+ 
+    public:  // Constructors and destructor
+        
+        /**
+        * Two-phased constructor.
+        */
+        static CCamSnapShotRotator* NewL( CCamAppController& aController );
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CCamSnapShotRotator();
+
+    public: // New functions      
+
+        /**
+        * C++ default constructor.
+        * @since 5.1
+        * @param aBitmap The bitmap to rotate
+        */
+        void RotateL( CFbsBitmap* aBitmap );
+
+        /**
+        * Indicates rotation process state.
+        * @since 5.1
+        * @return ETrue if image rotation is in progress
+        */
+        TBool IsActive();
+            
+        /**
+        * From MBitmapRotationObserver
+        * Notification of bitmap rotation complete events
+        * @param aErr KErrNone if successful
+        */
+        void RotationCompleteL( TInt aErr ); 
+
+    private:
+
+        /**
+        * C++ default constructor.
+        * @since 5.1
+        */
+        CCamSnapShotRotator( CCamAppController& aController );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        * @since 5.1
+        */
+        void ConstructL();
+
+    private:    // Data
+  
+        CCamAppController& iController; // not owned
+        CFbsBitmap* iRotatedSnapshot;   // owned
+        CCamSyncRotatorAo* iRotatorAo;  // owned
+        
+    };
+
+#endif      // __CAMSNAPSHOTROTATOR_H
+            
+// End of File
--- a/camerauis/cameraapp/generic/src/CamAppController.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamAppController.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -32,7 +32,6 @@
 #include <barsread.h>
 #include <AknUtils.h>
 #include <akntoolbar.h>
-#include <ProductVariant.hrh>
 #include <centralrepository.h>
 
 #include <ctsydomainpskeys.h>
@@ -105,6 +104,7 @@
 #include "camvideotime.h"
 #include "CamGSInterface.h"
 #include "CameraUiConfigManager.h"
+#include "camsnapshotrotator.h"
 #include <bitmaptransforms.h> 
 
 #ifdef _DEBUG
@@ -593,6 +593,8 @@
       {
       delete iRotatorAo;
       }
+
+  delete iSnapShotRotator;
   PRINT( _L("Camera <= ~CCamAppController") );
   }
 
@@ -2263,6 +2265,13 @@
   PRINT1( _L("Camera <> CCamAppController::SnapshotImage .. current image index: %d"), iCurrentImageIndex ); 
   PRINT1( _L("Camera => CCamAppController::SnapshotImage .. saved current image: %d"), SavedCurrentImage() ); 
 
+  if ( iSnapShotRotator->IsActive() )
+    {
+    // Avoid flickering. Do not show original snapshot, if it needs to be rotated
+    PRINT( _L("Camera <= CCamAppController::SnapshotImage - return null") );
+    return NULL;
+    }
+
   //Sometime burst capture array includes more than one image in single capture mode, 
   //so just display the latest image here.
   CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() ); 
@@ -4731,6 +4740,7 @@
   iImageSaveActive       = CCamImageSaveActive::NewL( *this , *this );        
   iCaptureArray          = CCamBurstCaptureArray::NewL( *iImageSaveActive );
   iRotationArray         = CCamBurstCaptureArray::NewL( *iImageSaveActive );
+  iSnapShotRotator       = CCamSnapShotRotator::NewL( *this );
   iSequenceFilenameArray = new( ELeave ) CDesCArraySeg( KTimelapseArrayGranularity );
   iSoundPlayer           = CCamAudioPlayerController::NewL( *this, *this );
 
@@ -6182,7 +6192,15 @@
     PRINT( _L("Camera <> CCamAppController: status in KErrNone..") );
     __ASSERT_ALWAYS( aBitmap, CamPanic( ECamPanicNullPointer ) );
 
-          
+    if( iInfo.iActiveCamera == ECamActiveCameraSecondary &&
+        iCaptureOrientation == ECamOrientation90 &&
+        ECamSettOn == iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) &&
+        ECamSettOn == IntegerSettingValue( ECamSettingItemShowCapturedPhoto ) )
+        {
+        PRINT( _L( "Camera <> Rotate portrait secondary camera snapshot image 180 degrees" ) )
+        TRAP_IGNORE( iSnapShotRotator->RotateL( aBitmap ) );
+        }
+     
     CopySnapshotIfNeeded( *aBitmap, aStatus );
      
     // Removed filename reservation when snapshot arrives.
@@ -6326,8 +6344,8 @@
         // check if snapshot bitmap needs to be rotated before creating a thumbnail from it
         TBool rotate( ECamSettOn == iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) &&
                       ECamSettOn == IntegerSettingValue( ECamSettingItemShowCapturedPhoto ) &&
-                      iCaptureOrientation != ECamOrientation0 &&
-                      iInfo.iActiveCamera == ECamActiveCameraPrimary );
+                      iCaptureOrientation != ECamOrientation0 );
+
         if ( ECamImageCaptureBurst != iInfo.iImageMode )
           {
           //create thumbnail or rotate first if needed
@@ -7337,6 +7355,7 @@
   OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, CCAMAPPCONTROLLER_LOADSECONDARYCAMERASETTINGSL, "e_CCamAppController_LoadSecondaryCameraSettingsL 1" );
   PRINT( _L("Camera => CCamAppController::LoadSecondaryCameraSettingsL" ))
   iSettingsModel->StorePrimaryCameraSettingsL();
+  iSettingsModel->StoreUserSceneSettingsL();
 
   PRINT( _L("Camera <> CCamAppController::LoadSecondaryCameraSettingsL B" ))
   
@@ -7505,17 +7524,10 @@
     if( iConfigManager && iConfigManager->IsOrientationSensorSupported()
     		&& iCameraController )
         {
-        if ( ECamActiveCameraPrimary == iInfo.iActiveCamera )
-            {
-            // Camera controller asks for the current orientation through
-            // our ImageOrientation(). Value for that was updated in 
-            // DataReceived() callback.
-            iCameraController->DirectSettingsChangeL( ECameraSettingOrientation );
-            }
-        else
-            {
-            // No action in secondary camera.
-            }
+        // Camera controller asks for the current orientation through
+        // our ImageOrientation(). Value for that was updated in 
+        // DataReceived() callback.
+        iCameraController->DirectSettingsChangeL( ECameraSettingOrientation );
         }
     PRINT( _L("Camera <= CCamAppController::SetImageOrientationL"))   
     }
@@ -10900,5 +10912,14 @@
     {
     return iVideoInitNeeded;  
     }
-        
+    
+// ---------------------------------------------------------------------------
+// StoreUserSceneSettingsL
+// Stores the UserScene settings
+// ---------------------------------------------------------------------------
+//  
+void CCamAppController::StoreUserSceneSettingsL()
+    {
+    iSettingsModel->StoreUserSceneSettingsL();	    
+    }      
 //  End of File  
--- a/camerauis/cameraapp/generic/src/CamAppui.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamAppui.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -281,6 +281,15 @@
   
   TBool uiOrientationOverride = iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported();
   
+  // Get the screenmode values used for setting  the orientation
+  RArray<TInt> screenModeValues;
+  if ( uiOrientationOverride )
+      {
+      iController.UiConfigManagerPtr()->SupportedScreenModesL( screenModeValues );
+      iLandscapeScreenMode = screenModeValues[0];
+      iPortraitScreenMode = screenModeValues[1];
+      }
+  
   // The embedded views are set after ConstructL completes
   // but the value is only of interest if the app is embedded
   iEmbeddedViewSet = !IsEmbedded();
@@ -385,7 +394,7 @@
     if( uiOrientationOverride )
       {
       //set orientation to CCamera	
-      iController.SetCameraOrientationModeL( CFbsBitGc::EGraphicsOrientationRotated90 );
+      iController.SetCameraOrientationModeL( iLandscapeScreenMode );
       // and complete the cameracontroller construction
       iController.CompleteCameraConstructionL();
       }
@@ -403,7 +412,7 @@
     if( uiOrientationOverride )
       {
       //set orientation to CCamera	
-      iController.SetCameraOrientationModeL( CFbsBitGc::EGraphicsOrientationRotated270 );
+      iController.SetCameraOrientationModeL( iPortraitScreenMode );
       // and complete the cameracontroller construction
       iController.CompleteCameraConstructionL();
       }     
@@ -455,6 +464,7 @@
       {
     OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP8_CCAMAPPUI_CONSTRUCTL, "e_EngineConstructionDelayed 1" );
       iController.CompleteConstructionL();
+      iController.StoreUserSceneSettingsL();
     OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP9_CCAMAPPUI_CONSTRUCTL, "e_EngineConstructionDelayed 0" );
 
       } 
@@ -1943,13 +1953,14 @@
         }
     // -----------------------------------------------------        
     case ECamCameraEventPowerOnRequested:
+    case ECamCameraEventReserveRequested:
       {
       // event only send if UIOrientationOverride feature is supported,
       // in that case UI construction is divided into two parts, call here 
       // to complete the construction	if in first startup
       if( iFirstBoot )
           {	
-          PRINT( _L( "Camera <> CCamAppUi::HandleCameraEventL ECamCameraEventPowerOnRequested" ) )	
+          PRINT( _L( "Camera <> CCamAppUi::HandleCameraEventL ECamCameraEventReserveRequested/ECamCameraEventPowerOnRequested" ) )	
           if ( iWaitTimer->IsActive() )
               {
               PRINT( _L( "Camera <> timer already active" ) )
@@ -8265,6 +8276,8 @@
     // Load the settings model static settings
     PRINT( _L("Camera <> call CCamAppController::LoadStaticSettingsL..") )
     iController.LoadStaticSettingsL( IsEmbedded() );
+    // store the userscene settings
+    iController.StoreUserSceneSettingsL();
 
 /*#ifndef __WINSCW__    
         if ( !iSFIUtils )
@@ -8318,12 +8331,7 @@
 
     // Check to see if we are set to use mmc storage but the card has
     // been removed.  
-    if( iController.CheckMemoryToUseL() )
-  	    {
-        // Record that we need to show the mmc removal note when the ui is 
-        // ready.
-        iMMCRemoveNoteRequired = ETrue;  	
-  	    }
+    iController.CheckMemoryToUseL();
 
     // create navi-pane and navi-porgress bar for use in camcorder mode 
     PRINT( _L("Camera <> CCamAppUi::CompleteAppUIConstructionL create navicounter control") );
--- a/camerauis/cameraapp/generic/src/CamCaptureSetupSlider.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamCaptureSetupSlider.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -965,7 +965,10 @@
 //
 void CCamCaptureSetupSlider::HandlePointerEventL(const TPointerEvent& aPointerEvent)
     {   
-   
+    if(!Rect().Contains(aPointerEvent.iPosition))
+        {
+        return;
+        }
     CCoeControl::HandlePointerEventL( aPointerEvent );
 
     // This is the max bitmap offset from the top of the shaft that the thumb can be
--- a/camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -469,7 +469,7 @@
       {
       if(!iPartialBackground)
           {
-      appUi->RaisePostCaptureCourtesyUI();
+          appUi->RaisePostCaptureCourtesyUI();
           }
       }
     else if ( iSuppressAPUntilCameraReady ) 
@@ -478,7 +478,7 @@
       }
     iPartialBackground = EFalse;
     
-    if ( iController.CameraSwitchQueued() )   
+    if ( appUi && iController.CameraSwitchQueued() )   
         {
         appUi->HandleCommandL( ECamCmdSwitchCamera );
         }
--- a/camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -236,20 +236,28 @@
       SetLocationIndicatorVisibility();
       }
 
-  TInt color;
-  TInt gray;
-  
-  TDisplayMode displaymode =
-      CEikonEnv::Static()->WsSession().GetDefModeMaxNumColors( color, gray );
+  TBool dsaAlways = iController.IsDirectScreenVFSupported( ETrue ) && 
+                    iController.IsDirectScreenVFSupported( EFalse );
+                 
+  if ( !dsaAlways )
+      {
+      // If bitmap VF is not possible in this configuration, 
+      // offscreen bitmap is not needed
+      TInt color;
+      TInt gray;
   
-  // set up the offscreen bitmap
-  iOffScreenBitmap = new ( ELeave ) CFbsBitmap();
+      TDisplayMode displaymode =
+          CEikonEnv::Static()->WsSession().GetDefModeMaxNumColors( color, gray );
+  
+      // set up the offscreen bitmap
+      iOffScreenBitmap = new ( ELeave ) CFbsBitmap();  
   
-  User::LeaveIfError( iOffScreenBitmap->Create( Rect().Size(), EColor16MU/*displaymode*/ ) );
+      User::LeaveIfError( iOffScreenBitmap->Create( Rect().Size(), EColor16MU/*displaymode*/ ) );
   
-  PRINT1( _L("Camera => CCamPreCaptureContainerBase::BaseConstructL disp mode (%d)"), displaymode )
-  iBitmapDevice = CFbsBitmapDevice::NewL( iOffScreenBitmap );
-  User::LeaveIfError( iBitmapDevice->CreateContext( iBitmapGc ) );
+      PRINT1( _L("Camera => CCamPreCaptureContainerBase::BaseConstructL disp mode (%d)"), displaymode )
+      iBitmapDevice = CFbsBitmapDevice::NewL( iOffScreenBitmap );
+      User::LeaveIfError( iBitmapDevice->CreateContext( iBitmapGc ) );
+      }
 
   iRect = ViewFinderFrameRect();
   // if using direct viewfinding pass Rect to control
@@ -435,8 +443,8 @@
         }
 
     CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
-
-    if ( appUi && appUi->CheckCourtesyKeyEventL( aKeyEvent, aType, ETrue ) == EKeyWasConsumed )
+	__ASSERT_DEBUG(appUi, CamPanic(ECamPanicNullPointer) );
+    if ( appUi->CheckCourtesyKeyEventL( aKeyEvent, aType, ETrue ) == EKeyWasConsumed )
         {
         PRINT( _L("Camera <= CCamPreCaptureContainerBase::OfferKeyEventL courtesy key") );
         return EKeyWasConsumed;
@@ -480,7 +488,7 @@
             && 0         == aKeyEvent.iRepeats )
         {
         TBool MSKCapture(EFalse);
-        if ( appUi && !appUi->IsToolBarVisible() && aKeyEvent.iScanCode == EStdKeyDevice3 )
+        if ( !appUi->IsToolBarVisible() && aKeyEvent.iScanCode == EStdKeyDevice3 )
             {
             MSKCapture = ETrue;
             }
--- a/camerauis/cameraapp/generic/src/CamSettingsModel.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamSettingsModel.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -1603,7 +1603,6 @@
     iStaticModel->StorePrimaryCameraSettingsL();
     CopySettingsL(iDynamicPhotoIntSettings, iDynamicPhotoIntSettingsBackup);
     CopySettingsL(iDynamicVideoIntSettings, iDynamicVideoIntSettingsBackup);
-    CopySettingsL(iUserSceneSettings, iUserSceneSettingsBackup);
     }
 
 // ---------------------------------------------------------------------------
@@ -2336,7 +2335,17 @@
             index++;
             }while(index < count);
         }
-    
+    }
+
+// ---------------------------------------------------------------------------
+// CCamSettingsModel::StoreUserSceneSettingsL
+//
+// Store UserScene Settings
+// ---------------------------------------------------------------------------
+// 
+void CCamSettingsModel::StoreUserSceneSettingsL()
+    {
+    CopySettingsL(iUserSceneSettings, iUserSceneSettingsBackup);   
     }
 
 // ===========================================================================
--- a/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -738,6 +738,7 @@
       }    
     else
       {
+      ViewCba()->MakeVisible( ETrue );
       SetSoftKeysL( R_CAM_SOFTKEYS_ACTIVATE_CANCEL__SELECT );                
       }
     }
--- a/camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -107,6 +107,7 @@
             break;           
         case ECamCmdCaptureSetupSceneUser:
             {
+            StatusPane()->MakeVisible( EFalse );
             SwitchToSceneSettingModeL();
             }
             break;
--- a/camerauis/cameraapp/generic/src/CamVideoPreCaptureContainer.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamVideoPreCaptureContainer.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -209,12 +209,12 @@
         break;
         }
       // ---------------------------------------------------
-      case ECamEventImageQualityChanged:
-	    {
-	    // To get correct viewfinder resolution:
-		TCamVideoResolution res = iController.GetCurrentVideoResolution();
-		iVFRes = iController.VideoViewFinderResourceId( res );
-		}
+//      case ECamEventImageQualityChanged:
+//	    {
+//	    // To get correct viewfinder resolution:
+//		TCamVideoResolution res = iController.GetCurrentVideoResolution();
+//		iVFRes = iController.VideoViewFinderResourceId( res );
+//		}
       // ---------------------------------------------------
       case ECamEventRecordComplete:    
         {
--- a/camerauis/cameraapp/generic/src/CamZoomPane.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/CamZoomPane.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -1009,6 +1009,7 @@
         
     // Only allow drag if the zoom is already active
     if ( type == TPointerEvent::EDrag &&
+            tchZoomArea.Contains( aPointerEvent.iPosition ) &&
          iTouchActive )
         { 
         TBool ret = StartTouchZoomL( aPointerEvent.iPosition.iY );
@@ -1017,7 +1018,9 @@
         }  
     
     // Clean up when the touch events are stopped
-    if ( type == TPointerEvent::EButton1Up )
+    if ( type == TPointerEvent::EButton1Up ||
+            (type == TPointerEvent::EDrag &&
+                    !tchZoomArea.Contains( aPointerEvent.iPosition )))
         {
         // don't do anything for stray touches
         if ( iTouchActive )
--- a/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -1534,7 +1534,7 @@
 #endif // CAMERAAPP_CAE_FOR_VIDEO
 
     PRINT1( _L("Camera <> OrientationOverride custom i/f pointer:%d"), iCustomInterfaceUIOrientationOverride );
-    iCustomInterfaceUIOrientationOverride->SetOrientationModeL( aOrientation );
+    TRAP_IGNORE(iCustomInterfaceUIOrientationOverride->SetOrientationModeL( aOrientation ));
     
   PRINT( _L("Camera <= CCamCameraController::SetOrientationModeL") );
   }
@@ -2416,6 +2416,13 @@
         orientation( MCameraOrientation::EOrientation0 );
       iSettingProvider.ProvideCameraSettingL( aSettingId, &orientation );
 
+      if ( iInfo.iCurrentCamera != KPrimaryCameraIndex && 
+           orientation == MCameraOrientation::EOrientation90 )
+        {
+        PRINT( _L("Camera <> Rotate portrait secondary camera image 270 degrees") );
+        orientation = MCameraOrientation::EOrientation270;
+        }
+
       PRINT1( _L("Camera <> setting camera orientation to [0x%02x]"), orientation );
       iCustomInterfaceOrientation->SetOrientationL( orientation );
       break;
@@ -2528,6 +2535,15 @@
 
     CAMERAAPP_PERF_CONTROLLER_START( ECamRequestReserve );
     iCamera->Reserve();
+    // If UIOrientationOverrideAPI is used, ui construction is completed while
+    // waiting for Reserve to complete, event sent here to continue ui construction
+    CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
+    if ( appUi->AppController().UiConfigManagerPtr()->IsUIOrientationOverrideSupported() )    
+      {
+      NotifyObservers( KErrNone, 
+                       ECamCameraEventReserveRequested,
+                       ECamCameraEventClassBasicControl );
+      }
     }
   // -------------------------------------------------------
   // Power on
@@ -2539,14 +2555,6 @@
     CAMERAAPP_PERF_CONTROLLER_START( ECamRequestPowerOn );
 
     iCamera->PowerOn(); 
-    CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
-    if ( appUi->AppController().UiConfigManagerPtr()->IsUIOrientationOverrideSupported() )    
-      {
-      NotifyObservers( KErrNone, 
-                       ECamCameraEventPowerOnRequested,
-                       ECamCameraEventClassBasicControl );
-      }
-    
     }
   // -------------------------------------------------------
   // Unknown
--- a/camerauis/cameraapp/generic/src/camlinevfgriddrawer.cpp	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/generic/src/camlinevfgriddrawer.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -289,7 +289,7 @@
   while( j < aVerticalLines )
     {
     // Max used to make sure no div-by-zero
-    TInt currentX = ((j+indexOffset)*width) / Max(1,aVerticalLines+countOffset) - KPenWidth/2;
+    TInt currentX = leftX + ((j+indexOffset)*width) / Max(1,aVerticalLines+countOffset) - KPenWidth/2;
     iLineArray.Append( TRect( currentX, topY, currentX, bottomY ) );
     j++;
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraapp/generic/src/camsnapshotrotator.cpp	Mon Jan 18 20:06:55 2010 +0200
@@ -0,0 +1,158 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Utility class to rotate bitmaps*
+*/
+
+
+
+// INCLUDE FILES
+#include "camsnapshotrotator.h"
+#include "CamSyncRotatorAo.h"
+#include "CamBurstCaptureArray.h"
+#include "camlogging.h"
+#include "CamAppController.h"
+          
+// CONSTANTS
+
+// MACROS
+
+// LOCAL CONSTANTS AND MACROS
+
+// MODULE DATA STRUCTURES
+
+// LOCAL FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CCamSnapShotRotator::CCamSnapShotRotator
+// C++ constructor
+// -----------------------------------------------------------------------------
+//
+CCamSnapShotRotator::CCamSnapShotRotator( CCamAppController& aController ) 
+    : iController(aController), iRotatedSnapshot(NULL), iRotatorAo(NULL)
+    {    
+    }
+
+// -----------------------------------------------------------------------------
+// CCamSnapShotRotator::ConstructL
+// Second phase constructor.
+// -----------------------------------------------------------------------------
+//
+void CCamSnapShotRotator::ConstructL()
+    {   
+
+    }
+
+// -----------------------------------------------------------------------------
+// CCamSnapShotRotator::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCamSnapShotRotator* CCamSnapShotRotator::NewL( CCamAppController& aController )
+    {
+    CCamSnapShotRotator* self = new( ELeave ) CCamSnapShotRotator( aController );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCamSnapShotRotator::~CCamSnapShotRotator()
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CCamSnapShotRotator::~CCamSnapShotRotator()
+    {
+    PRINT( _L("Camera => ~CCamSnapShotRotator") );
+    if ( iRotatorAo && iRotatorAo->IsActive() )
+        {
+        iRotatorAo->Cancel();
+        }
+    delete iRotatorAo;
+    delete iRotatedSnapshot;
+    PRINT( _L("Camera <= ~CCamSnapShotRotator") );
+    }
+
+// ---------------------------------------------------------------------------
+// CCamSnapShotRotator::RotationCompleteL
+// Notification of bitmap rotation complete events
+// ---------------------------------------------------------------------------
+//  
+void CCamSnapShotRotator::RotationCompleteL( TInt aErr )
+    {
+    PRINT1( _L( "Camera => CCamSnapShotRotator::RotationCompleteL aErr:%d" ), aErr );
+     // Use this snapshot, even if rotation fails. 
+    if ( iRotatedSnapshot )
+        {
+        PRINT( _L( "Camera => CCamSnapShotRotator::RotationCompleteL - ReplaceSnapshot" ) );
+        iController.BurstCaptureArray()->ReplaceSnapshot( iRotatedSnapshot, 0 );
+        PRINT( _L( "Camera => CCamSnapShotRotator::RotationCompleteL - delete iRotatedSnapshot" ) );
+        delete iRotatedSnapshot;
+        iRotatedSnapshot = NULL;
+        }
+            
+    PRINT( _L( "Camera <= CCamSnapShotRotator::RotationCompleteL" ) );         
+    }    
+
+// ---------------------------------------------------------------------------
+// CCamSnapShotRotator::Rotate
+// ---------------------------------------------------------------------------
+//  
+void CCamSnapShotRotator::RotateL( CFbsBitmap* aBitmap )
+    {
+    PRINT( _L( "Camera => CCamSnapShotRotator::Rotate" ) ); 
+    if ( !iRotatedSnapshot )
+        {
+        iRotatedSnapshot = new (ELeave)CFbsBitmap();
+        }
+    iRotatedSnapshot->Create( aBitmap->SizeInPixels(), aBitmap->DisplayMode() );
+    TRect tmpRect( TPoint( 0, 0 ), aBitmap->SizeInPixels() );
+    TInt tmpLen = tmpRect.Width() * tmpRect.Height() * 4;
+    //copy the snapshot data
+    iRotatedSnapshot->BeginDataAccess();
+    aBitmap->BeginDataAccess();
+    Mem::Copy( iRotatedSnapshot->DataAddress(), aBitmap->DataAddress(), tmpLen );
+    iRotatedSnapshot->EndDataAccess();
+    aBitmap->EndDataAccess();
+    if ( !iRotatorAo )
+        {
+        iRotatorAo = CCamSyncRotatorAo::NewL( *this );
+        }    
+    iRotatorAo->RotateL( iRotatedSnapshot, CBitmapRotator::ERotation180DegreesClockwise );
+        
+    PRINT( _L( "Camera <= CCamSnapShotRotator::Rotate" ) );  
+    }
+
+// ---------------------------------------------------------------------------
+// CCamSnapShotRotator::IsActive
+// ---------------------------------------------------------------------------
+//  
+TBool CCamSnapShotRotator::IsActive()
+    {
+    TBool ret(EFalse);
+    if ( iRotatorAo )
+        {
+        ret = iRotatorAo->IsActive();
+        }
+    return ret;
+    }
+
+//  End of File  
--- a/camerauis/cameraapp/traces/OstTraceDefinitions.h	Thu Jan 07 16:18:56 2010 +0200
+++ b/camerauis/cameraapp/traces/OstTraceDefinitions.h	Mon Jan 18 20:06:55 2010 +0200
@@ -1,19 +1,3 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
 #ifndef __OSTTRACEDEFINITIONS_H__
 #define __OSTTRACEDEFINITIONS_H__
 // OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler