--- a/camera_plat/active_palette_2_api/tsrc/group/bld.inf Tue Apr 27 16:19:06 2010 +0300
+++ b/camera_plat/active_palette_2_api/tsrc/group/bld.inf Tue May 11 15:56:11 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -10,7 +10,7 @@
* Nokia Corporation - initial contribution.
*
* Contributors:
-*
+*
* Description: Active Palette 2 API tests
*
*/
@@ -22,7 +22,6 @@
../conf/ui_ActivePalette2ApiTest.cfg /epoc32/winscw/c/TestFramework/ui_ActivePalette2ApiTest.cfg
../init/ActivePalette2ApiTest.ini /epoc32/winscw/c/TestFramework/ActivePalette2ApiTest.ini
../init/ActivePalette2ApiTest.ini /epoc32/winscw/c/TestFramework/TestFramework.ini
-/*
../data/zeroth.svg /epoc32/s60/icons/zeroth.svg
../data/first.svg /epoc32/s60/icons/first.svg
../data/second.svg /epoc32/s60/icons/second.svg
@@ -33,20 +32,17 @@
../data/seventh.svg /epoc32/s60/icons/seventh.svg
../data/eighth.svg /epoc32/s60/icons/eighth.svg
../data/ninth.svg /epoc32/s60/icons/ninth.svg
-*/
PRJ_TESTMMPFILES
ActivePalette2ApiTest.mmp
-gnumakefile ActivePalette2ApiTestIcons.mk
+// gnumakefile ActivePalette2ApiTestIcons.mk
-/*
PRJ_TESTEXTENSIONS
START EXTENSION s60/mifconv
OPTION TARGETFILE ActivePalette2ApiTest.mif
OPTION HEADERFILE ActivePalette2ApiTest.mbg
OPTION SOURCEFILE ActivePalette2ApiTestIconList.txt
END
-*/
PRJ_MMPFILES
Binary file camerauis/cameraapp/conf/cameraapp.confml has changed
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/group/iconlist.txt Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/group/iconlist.txt Tue May 11 15:56:11 2010 +0300
@@ -3,5 +3,9 @@
-c8,8 qgn_lcam_gen_sett_camera_folder_video.svg
-1 qgn_lcam_gen_sett_camera_tab_image.svg
-1 qgn_lcam_gen_sett_camera_tab_video.svg
+-c8,8 qgn_prop_set_apps_cams.svg
+-c8,8 qgn_prop_set_cams_image_sub.svg
+-c8,8 qgn_prop_set_cams_video_sub.svg
+-1 qgn_prop_set_mp_video_tab2.svg
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsView.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamVideoSettingsView.cpp Tue May 11 15:56:11 2010 +0300
@@ -240,8 +240,8 @@
AknsUtils::SkinInstance(),
KAknsIIDDefault,
fileName,
- EMbmCamerasettingspluginQgn_lcam_gen_sett_camera_tab_video,
- EMbmCamerasettingspluginQgn_lcam_gen_sett_camera_tab_video );
+ EMbmCamerasettingspluginQgn_prop_set_mp_video_tab2,
+ EMbmCamerasettingspluginQgn_prop_set_mp_video_tab2 );
return icon;
}
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamcorderPlugin.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamcorderPlugin.cpp Tue May 11 15:56:11 2010 +0300
@@ -424,8 +424,8 @@
AknsUtils::SkinInstance(),
KAknsIIDQgnPropSetAppsCams,
fileName,
- EMbmCamerasettingspluginQgn_lcam_gen_sett_list,
- EMbmCamerasettingspluginQgn_lcam_gen_sett_list_mask );
+ EMbmCamerasettingspluginQgn_prop_set_apps_cams,
+ EMbmCamerasettingspluginQgn_prop_set_apps_cams_mask );
return icon;
}
--- a/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamcorderPluginContainer.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/GsCamcorderPlugin/src/GSCamcorderPluginContainer.cpp Tue May 11 15:56:11 2010 +0300
@@ -215,15 +215,15 @@
icons,
KAknsIIDQgnPropSetCamsImageSub,
fileName,
- EMbmCamerasettingspluginQgn_lcam_gen_sett_camera_folder_image,
- EMbmCamerasettingspluginQgn_lcam_gen_sett_camera_folder_image_mask );
+ EMbmCamerasettingspluginQgn_prop_set_cams_image_sub,
+ EMbmCamerasettingspluginQgn_prop_set_cams_image_sub_mask );
AppendIconToArrayL(
icons,
KAknsIIDQgnPropSetCamsVideoSub,
fileName,
- EMbmCamerasettingspluginQgn_lcam_gen_sett_camera_folder_video,
- EMbmCamerasettingspluginQgn_lcam_gen_sett_camera_folder_video_mask );
+ EMbmCamerasettingspluginQgn_prop_set_cams_video_sub,
+ EMbmCamerasettingspluginQgn_prop_set_cams_video_sub_mask );
CleanupStack::Pop( icons ); // icons
Binary file camerauis/cameraapp/generic/camerauiconfigmanager/conf/camerauiconfigmanager.confml has changed
Binary file camerauis/cameraapp/generic/data/cameraappCapture1.wav has changed
Binary file camerauis/cameraapp/generic/data/cameraappFocusSucc.wav has changed
Binary file camerauis/cameraapp/generic/data/cameraappSelfTimer.wav has changed
Binary file camerauis/cameraapp/generic/data/cameraappStart.wav has changed
Binary file camerauis/cameraapp/generic/data/cameraappStop.wav has changed
--- a/camerauis/cameraapp/generic/inc/CamAppController.h Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamAppController.h Tue May 11 15:56:11 2010 +0300
@@ -2211,6 +2211,11 @@
* Getter for iIssueModeChangeSequenceSucceeded
*/
TBool IssueModeChangeSequenceSucceeded();
+
+ /**
+ * Initiates startup sequence in embedded mode
+ */
+ void EmbeddedStartupSequence();
private:
--- a/camerauis/cameraapp/generic/inc/CamAppUi.h Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamAppUi.h Tue May 11 15:56:11 2010 +0300
@@ -86,6 +86,7 @@
public MCamFileCheckObserver,
public MCamCameraObserver
,public MCamAddToAlbumObserver
+ ,public MAknServerAppExitObserver
{
// =======================================================
// Data Types
@@ -1430,6 +1431,18 @@
void CheckAlbumIdOperationCompleteL(
TBool aAlbumExists, const TDesC& aAlbumTitle );
+ public: // MAknServerAppExitObserver
+ /**
+ * Handle the exit of a connected server app.
+ * This implementation provides Series 60 default behavior
+ * for handling of the EAknCmdExit exit code. Derived classes
+ * should base-call this implementation if they override this
+ * function.
+ * @param aReason The reason that the server application exited.
+ * This will either be an error code, or the command id that caused
+ * the server app to exit.
+ */
+ virtual void HandleServerAppExit(TInt aReason);
private:
@@ -1829,6 +1842,8 @@
TBool iMemoryAvailableForCapturing;
CCamStartupLogoController* iStartupLogoController;
+
+ TBool iVideoClipPlayInProgress;
};
// ===========================================================================
--- a/camerauis/cameraapp/generic/inc/CamCaptureSetupViewBase.h Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamCaptureSetupViewBase.h Tue May 11 15:56:11 2010 +0300
@@ -289,6 +289,9 @@
// A second container that the view uses when in capture setup mode
CCamCaptureSetupContainer* iCaptureSetupContainer;
+
+ // Stores the previous capture mode of camera before entering Infolistbox mode
+ TCamPreCaptureMode iPrevCaptureMode;
};
--- a/camerauis/cameraapp/generic/inc/CamDriveChangeNotifier.h Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamDriveChangeNotifier.h Tue May 11 15:56:11 2010 +0300
@@ -22,8 +22,9 @@
// INCLUDES
#include <f32file.h>
-#include "campropertywatcher.h"
-#include "campropertyobserver.h"
+#include "CamPropertyWatcher.h"
+#include "CamPropertyObserver.h"
+#include "CamTimer.h"
// FORWARD DECLARATIONS
class MCamDriveChangeNotifierObserver;
@@ -137,7 +138,12 @@
// New functions
void StartMonitoring();
+
void CancelMonitoring();
+
+ void USBTimerCallBackL();
+
+ static TInt USBTimerCallBack( TAny* aPtr );
public: // From MPropertyObserver
/**
@@ -170,6 +176,8 @@
CCamPropertyWatcher* iUsbMSWatcher;
TBool iMassStorageModeOn;
+
+ CCamTimer* iUSBTimer;
};
--- a/camerauis/cameraapp/generic/inc/CamViewBase.h Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamViewBase.h Tue May 11 15:56:11 2010 +0300
@@ -216,6 +216,18 @@
*/
void DoDeactivate();
+ /**
+ * Prepare deactivation of this view.
+ * Method stores current visible containers to temporary containers.
+ */
+ void PrepareDeactivate();
+
+ /**
+ * Completes deactivation of this view.
+ * Method method deletes stored temporary containers.
+ */
+ void PostDeactivate();
+
protected: // New functions
/**
@@ -360,6 +372,10 @@
// standby mode container
CCamStandbyContainer* iStandbyContainer;
+
+ //Used for viewswitching
+ CCamContainerBase* iTempContainer;
+ CCamStandbyContainer* iTempStandbyContainer;
private: // data
--- a/camerauis/cameraapp/generic/inc/cameracontroller/camcameracontroller.h Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/cameracontroller/camcameracontroller.h Tue May 11 15:56:11 2010 +0300
@@ -62,7 +62,9 @@
class MCameraOrientation;
class MCameraFaceTracking;
- class MCameraUIOrientationOverride;
+class MCameraUIOrientationOverride;
+class MCameraUseCaseHint;
+
#ifdef CAMERAAPP_PERFORMANCE_CONTROLLER
class CCamPerformanceLogger;
@@ -481,7 +483,13 @@
void SetFaceTrackingL();
-
+ /**
+ * Inform CAPI about the UseCase (still or video)
+ * before calling Reserve.
+ *
+ */
+ void HintUseCaseL();
+
// =======================================================
// Data
private:
@@ -557,6 +565,8 @@
MCameraFaceTracking* iCustomInterfaceFaceTracking; /** Not own. */
MCameraUIOrientationOverride* iCustomInterfaceUIOrientationOverride; /** Not own. */
+
+ MCameraUseCaseHint* iCustomInterfaceUseCaseHint; /** Not own. */
// -------------------------------------------------------
// CAE
--- a/camerauis/cameraapp/generic/src/CamAppController.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamAppController.cpp Tue May 11 15:56:11 2010 +0300
@@ -98,6 +98,7 @@
#include "camuidconstants.h"
#include "camconfiguration.h"
#include "CamPreCaptureViewBase.h"
+#include "CamPostCaptureViewBase.h"
#include <cfclient.h>
#include <cfcontextobject.h>
@@ -895,6 +896,7 @@
TCamCameraMode
CCamAppController::CurrentMode() const
{
+ PRINT1( _L("Camera <> CCamAppController::CurrentMode:%d"), iInfo.iMode );
return iInfo.iMode;
}
@@ -2983,11 +2985,6 @@
if( !aStartup )
{
- TBool usbPersonality = 0;
- User::LeaveIfError ( RProperty::Get (KPSUidUsbWatcher,
- KUsbWatcherSelectedPersonality, usbPersonality));
- TInt mmcInserted = 0;
- User::LeaveIfError( RProperty::Get( KPSUidUikon, KUikMMCInserted, mmcInserted ) );
CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
if(IntegerSettingValue(ECamSettingItemRemovePhoneMemoryUsage) &&
@@ -2996,6 +2993,14 @@
( appUi->PreCaptureMode() == ECamPreCapViewfinder ||
appUi->PreCaptureMode() == ECamPreCapGenericSetting ) )
{
+ TBool usbPersonality = 0;
+ #ifndef __WINSCW__
+ User::LeaveIfError ( RProperty::Get (KPSUidUsbWatcher,
+ KUsbWatcherSelectedPersonality, usbPersonality));
+ #endif // __WINSCW__
+ TInt mmcInserted = 0;
+ User::LeaveIfError( RProperty::Get( KPSUidUikon, KUikMMCInserted, mmcInserted ) );
+
if( KUsbPersonalityIdMS == usbPersonality )
{
SwitchToStandbyL( ECamErrMassStorageMode );
@@ -7880,7 +7885,7 @@
appUi->GetActiveViewId( activeView );
CCamPreCaptureViewBase* view = static_cast<CCamPreCaptureViewBase*>( appUi->View( activeView.iViewUid ) );
if ( iInfo.iOperation == ECamStandby ||
- ( view && view->IsInStandbyMode() ) )
+ ( view && view->IsInStandbyMode() ) && appUi->IsRecoverableStatus() )
{
PRINT( _L("Camera HandleSlideOpenedL => Exit Standby view") );
view->HandleCommandL( ECamCmdExitStandby );
@@ -8857,12 +8862,14 @@
TBool
CCamAppController::Busy() const
{
+ PRINT1(_L("Camera <> CCamAppController::Busy:%d"), iBusyFlags );
return (EBusyNone != iBusyFlags || CameraControllerBusy() );
}
TBool
CCamAppController::CameraControllerBusy() const
{
+ PRINT1(_L("Camera <> CCamAppController::CameraControllerBusy:%d"), iCameraController->ControllerInfo().iBusy );
return (iCameraController && ECamBusyOff != iCameraController->ControllerInfo().iBusy );
}
@@ -10462,7 +10469,8 @@
if ( (driveStatus & KMassStorageBits) == KMassStorageBits &&
!(driveStatus & DriveInfo::EDriveCorrupt) &&
- ((KErrNone == ret) && (KUsbPersonalityIdMS != usbPersonality) ) )
+ ( KErrNotFound == ret || // USB watcher is not loaded
+ ( (KErrNone == ret) && (KUsbPersonalityIdMS != usbPersonality) ) ) )
{
return ETrue;
}
@@ -10632,7 +10640,7 @@
{
PRINT( _L("Camera <> Phone memory is the preferred storage location. Nothing to be done here. Return KErrNone.") )
PRINT( _L("Camera <= CCamAppController::DriveChangeL" ) );
-
+ return KErrNone;
}
if ( ( !IsMemoryAvailable( ECamMediaStorageCard, EFalse ) ||
@@ -10687,7 +10695,7 @@
iDismountPending = ETrue;
// Mass memory may be the forced storage location. Then it's necessary
// to switch to (forced) phone memory
- ForceUsePhoneMemoryL( ETrue );
+ TRAP_IGNORE( ForceUsePhoneMemoryL( ETrue ) );
PRINT( _L("Camera <= CCamAppController::DriveChangeL dismount pending" ) );
}
@@ -10695,7 +10703,7 @@
{
// Mass memory may be the forced storage location. Then it's necessary
// to switch to (forced) phone memory
- ForceUsePhoneMemoryL( ETrue );
+ TRAP_IGNORE( ForceUsePhoneMemoryL( ETrue ) );
PRINT( _L("Camera <= CCamAppController::DriveChangeL dismount ok" ) );
}
@@ -10710,7 +10718,7 @@
if ( iForceUseOfPhoneMemory )
{
PRINT( _L("Camera <> Phone memory is forced, switch back to user selected storage location.") )
- ForceUsePhoneMemoryL( EFalse );
+ TRAP_IGNORE( ForceUsePhoneMemoryL( EFalse ) );
}
else
{
@@ -10729,19 +10737,21 @@
appUi->IsRecoverableStatus() )
{
TInt mmcInserted = 0;
+ TInt usbPersonality = 0;
User::LeaveIfError( RProperty::Get( KPSUidUikon, KUikMMCInserted, mmcInserted ) );
+ User::LeaveIfError(RProperty::Get(KPSUidUsbWatcher,
+ KUsbWatcherSelectedPersonality,
+ usbPersonality) );
if( !IsMemoryAvailable(ECamMediaStorageMassStorage) &&
!IsMemoryAvailable(ECamMediaStorageCard) )
{
- if( mmcInserted )
+ if( KUsbPersonalityIdMS == usbPersonality )
{
SwitchToStandbyL( ECamErrMassStorageMode );
-
}
- else
+ else if ( !mmcInserted )
{
SwitchToStandbyL( ECamErrMemoryCardNotInserted );
-
}
}
}
@@ -10756,6 +10766,26 @@
}
}
+ if( appUi->CurrentViewState() == ECamViewStatePostCapture )
+ {
+ if( aType == EDriveDismount && !IsMemoryAvailable( currentStorage, EFalse ))
+ {
+ TVwsViewId activeView;
+ if ( appUi->GetActiveViewId( activeView ) == KErrNone )
+ {
+ if( ECamViewIdStillPostCapture == activeView.iViewUid.iUid ||
+ ECamViewIdVideoPostCapture == activeView.iViewUid.iUid )
+ {
+ CCamPostCaptureViewBase* view =
+ static_cast<CCamPostCaptureViewBase*>( appUi->View( activeView.iViewUid ) );
+ if( view )
+ {
+ view->HandleCommandL( EAknSoftkeyBack );
+ }
+ }
+ }
+ }
+ }
PRINT( _L("Camera <= CCamAppController::DriveChangeL" ) );
return KErrNone;
@@ -10955,8 +10985,12 @@
{
PRINT( _L( "Camera => CCamAppController::CompleteCameraConstructionL" ) );
iCameraController->CompleteSwitchCameraL();
- // start reserve and poweron already here
- IssueModeChangeSequenceL( ETrue );
+ // start reserve and poweron already here unless embedded mode used
+ CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
+ if( appUi && !appUi->IsEmbedded() )
+ {
+ IssueModeChangeSequenceL( ETrue );
+ }
PRINT( _L( "Camera <= CCamAppController::CompleteCameraConstructionL" ) );
}
@@ -11013,6 +11047,8 @@
{
iRotationArray->Reset();
}
+ if( BurstCaptureArray()->Snapshot( iCurrentImageIndex ) )
+ {
// copy snapshot to preserve the original snapshot bitmap
// first get the handle for the original snapshot bitmap
CFbsBitmap* snapshot = new (ELeave)CFbsBitmap();
@@ -11039,6 +11075,7 @@
iRotatorAo->RotateL( iRotatedSnapshot, MapCamOrientation2RotationAngle( iCaptureOrientation ) );
CleanupStack::PopAndDestroy(snapshot);
+ }
PRINT( _L( "Camera <= CCamAppController::RotateSnapshotL" ) );
}
@@ -11287,5 +11324,17 @@
{
return iIssueModeChangeSequenceSucceeded;
}
+
+// ---------------------------------------------------------------------------
+// CCamAppController::EmbeddedStartupSequence
+//
+// ---------------------------------------------------------------------------
+//
+void CCamAppController::EmbeddedStartupSequence()
+ {
+ // If startup sequence fails at this point, it will be tried again later
+ TRAP_IGNORE( IssueModeChangeSequenceL( ETrue ) );
+ }
+
// End of File
--- a/camerauis/cameraapp/generic/src/CamAppui.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamAppui.cpp Tue May 11 15:56:11 2010 +0300
@@ -95,7 +95,7 @@
#include "CameraVariant.hrh"
#include "OstTraceDefinitions.h"
#ifdef OST_TRACE_COMPILER_IN_USE
-#include "CamAppUiTraces.h"
+#include "CamAppuiTraces.h"
#endif
#include "camactivepalettehandler.h"
#include "CamContainerBase.h"
@@ -593,6 +593,7 @@
{
PRINT( _L("Camera => CCamAppUi::ConstructL create doc handler") );
iDocHandler = CDocumentHandler::NewL( CEikonEnv::Static()->Process() );
+ iDocHandler->SetExitObserver(this);
iController.CheckMemoryToUseL();
// create navi-pane and navi-porgress bar for use in camcorder mode
@@ -1234,6 +1235,16 @@
case EEikCmdExit: // fallthrough
case EAknSoftkeyExit:
{
+ CAknToolbar* fixedToolbar = CurrentFixedToolbar();
+ if ( fixedToolbar )
+ {
+ CAknToolbarExtension* extension = fixedToolbar->ToolbarExtension();
+ if ( extension )
+ {
+ extension->SetShown( EFalse );
+ }
+ fixedToolbar->SetToolbarVisibility( EFalse );
+ }
OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP3_CCAMAPPUI_HANDLECOMMANDL, "e_ExternalExit 1" );
PRINT( _L("Camera CCamAppUi external exit call") );
if ( iEikonEnv->StartedAsServerApp() )
@@ -1684,10 +1695,24 @@
// -----------------------------------------------------
case ECamCmdPlay:
{
- TDataType dataType;
- SetEmbedding( ETrue );
- iDocHandler->OpenFileEmbeddedL( iController.CurrentFullFileName(),
- dataType );
+ PRINT1(_L("Camera <=> CCamAppUi::HandleCommandL. case ECamCmdPlay, iVideoClipPlayInProgress:%d"), iVideoClipPlayInProgress);
+
+ if ( !iVideoClipPlayInProgress)
+ {
+ TDataType dataType;
+ TInt err;
+
+ SetEmbedding( ETrue );
+
+ err = iDocHandler->OpenFileEmbeddedL( iController.CurrentFullFileName(), dataType );
+ PRINT1(_L("Camera <=> CCamAppUi::HandleCommandL. iDocHandler ->OpenFileEmbeddedL err:%d"), err);
+
+ if ( KErrNone == err)
+ {
+ iVideoClipPlayInProgress = ETrue;
+ }
+ }
+
}
break;
// -----------------------------------------------------
@@ -1973,13 +1998,17 @@
if( iFirstBoot )
{
PRINT( _L( "Camera <> CCamAppUi::HandleCameraEventL ECamCameraEventReserveRequested/ECamCameraEventPowerOnRequested" ) )
- if ( iWaitTimer->IsActive() )
+ // in embedded mode appui construct timer started already
+ if ( !IsEmbedded() )
{
- PRINT( _L( "Camera <> timer already active" ) )
- iWaitTimer->Cancel();
+ if ( iWaitTimer->IsActive() )
+ {
+ PRINT( _L( "Camera <> timer already active" ) )
+ iWaitTimer->Cancel();
+ }
+ PRINT( _L( "Camera <> start the appui construct timer" ) )
+ iWaitTimer->Start( 0, 0, TCallBack( AppUIConstructCallbackL, this ) );
}
- PRINT( _L( "Camera <> start the appui construct timer" ) )
- iWaitTimer->Start( 0, 0, TCallBack( AppUIConstructCallbackL, this ) );
}
else
{
@@ -3207,11 +3236,26 @@
}
// Free the needed ram memory if not enough available
- iMemoryMonitor->CheckAndRequestMemoryL(
+ TInt memError = iMemoryMonitor->CheckAndRequestMemoryL(
iController.UiConfigManagerPtr()->CriticalLevelRamMemoryFocusGained(),
iController.UiConfigManagerPtr()->RequiredRamMemoryFocusGained(),
EFalse );
+ TInt freeMemory = 0;
+ TInt halerror=HAL::Get( HALData::EMemoryRAMFree, freeMemory );
+ if( halerror != KErrNone )
+ {
+ User::Leave( halerror );
+ }
+
+ if ( memError && freeMemory < iController.UiConfigManagerPtr()->CriticalLevelRamMemoryFocusGained() )
+ {
+ PRINT( _L("Camera <> CCamAppUi::HandleWsEvent ECamEventFocusGained memory too low. Exiting") );
+ CloseAppL();
+ PRINT( _L("Camera <= CCamAppUi::HandleWsEvent ECamEventFocusGained memory too low. Exiting") );
+ return;
+ }
+
iController.SetEndKeyExitWaiting( EFalse );
//Don't update task state in case of embedded camera
@@ -3329,6 +3373,14 @@
RaisePreCaptureCourtesyUI( ETrue );
}
+ //We hiden toolbar when keylock was set to on in pre-capture view and camera lost focus,
+ //so we need to display toolbar when keylock is set to off and camera gain focus again.
+ if ( ECamViewStatePreCapture == iViewState &&
+ ECamPreCapViewfinder == iPreCaptureMode )
+ {
+ SetToolbarVisibility();
+ }
+
// If keylock is set on when recording is starting up but not yet
// started, display toolbar when keylock is set off since we are
// returning to precapture view, unless capturing is still going on.
@@ -3371,6 +3423,15 @@
{
SubmergeToolbar();
}
+
+ //We need hiding the toolbar if keylock is set to on in pre-catpure view,
+ //otherwise the toolbar will be displayed when press volume key in keylock on status.
+ if ( iController.IsKeyLockOn() &&
+ ECamViewStatePreCapture == iViewState &&
+ ECamPreCapViewfinder == iPreCaptureMode )
+ {
+ SubmergeToolbar();
+ }
// focus lost event while videocall active and camera in standby,
// no notification to views
@@ -6134,11 +6195,23 @@
CCamAppUi::StartAsServerAppL( MCamEmbeddedObserver* aEmbeddedObserver,
TInt aMode )
{
- PRINT( _L("Camera => CCamAppUi::StartAsServerAppL") );
+ PRINT1( _L("Camera => CCamAppUi::StartAsServerAppL mode:%d"), aMode );
__ASSERT_ALWAYS( aMode == ECamControllerVideo || aMode == ECamControllerImage,
CamPanic( ECamPanicNotSupported ) );
+ // start the ui construct timer to speed up the starting in embedded mode
+ if ( iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported() )
+ {
+ if ( iWaitTimer->IsActive() )
+ {
+ PRINT( _L( "Camera <> timer already active" ) )
+ iWaitTimer->Cancel();
+ }
+ PRINT( _L( "Camera <> start the appui construct timer" ) )
+ iWaitTimer->Start( 0, 0, TCallBack( AppUIConstructCallbackL, this ) );
+ }
+
// Load Embedded Settings
iController.LoadStaticSettingsL( ETrue );
iEmbeddedViewSet = ETrue;
@@ -6149,10 +6222,12 @@
if ( aMode == ECamControllerVideo )
{
iTargetMode = ECamControllerVideo;
+ iMode = ECamControllerVideo;
}
else if ( aMode == ECamControllerImage )
{
iTargetMode = ECamControllerImage;
+ iMode = ECamControllerImage;
}
// Find the parent app's name:
@@ -6244,7 +6319,9 @@
iViewState = ECamViewStatePreCapture;
iTargetViewState = ECamViewStatePreCapture;
TrySwitchViewL();
-
+
+ // Start reserve-poweron sequence
+ iController.EmbeddedStartupSequence();
PRINT( _L("Camera <= CCamAppUi::StartAsServerAppL") );
}
@@ -7523,6 +7600,7 @@
if ( iController.IsTouchScreenSupported() )
{
precapView->CreateAndSetToolbarL( R_CAM_EMPTY_FIXED_TOOLBAR );
+ SetToolbarVisibility();
}
EikSoftkeyPostingTransparency::MakeTransparent(
*precapView->ViewCba(), EFalse );
@@ -8441,9 +8519,19 @@
ConstructNaviPaneL();
- //always start in stillmode
- SetDefaultViewL( *iStillCaptureView );
-
+
+ //embedded camera may start straight in videomode
+ if( IsEmbedded() && iTargetMode == ECamControllerVideo )
+ {
+ SetDefaultViewL( *iVideoCaptureView );
+ PRINT( _L("Camera <> CCamAppUi::CompleteAppUIConstructionL SetDefaultView Video") );
+ }
+ else
+ {
+ SetDefaultViewL( *iStillCaptureView );
+ PRINT( _L("Camera <> CCamAppUi::CompleteAppUIConstructionL SetDefaultView Still") );
+ }
+
// pre-construct side-pane & zoom pane
// get whether we overlay sidepane over view-finder
TBool overlayViewFinder;
@@ -8458,6 +8546,7 @@
PRINT( _L("Camera <> CCamAppUi::CompleteAppUIConstructionL create doc handler") );
iDocHandler = CDocumentHandler::NewL( CEikonEnv::Static()->Process() );
+ iDocHandler->SetExitObserver(this);
// Check to see if we are set to use mmc storage but the card has
// been removed.
@@ -8495,8 +8584,15 @@
iCollectionManager = new (ELeave) CCamCollectionManagerAO( *this );
//iStillCaptureView->Container()->MakeVisible( ETrue );
- ActivateLocalViewL( iStillCaptureView->Id() );
-
+
+ if( IsEmbedded() && iTargetMode == ECamControllerVideo )
+ {
+ ActivateLocalViewL( iVideoCaptureView->Id() );
+ }
+ else
+ {
+ ActivateLocalViewL( iStillCaptureView->Id() );
+ }
StartCheckingDefaultAlbumIdL();
PRINT( _L("Camera <= CCamAppUi::CompleteAppUIConstructionL") )
}
@@ -8675,4 +8771,17 @@
return iPreCaptureMode;
}
+void CCamAppUi::HandleServerAppExit(TInt aReason)
+ {
+ PRINT1(_L("Camera => CCamAppUi::HandleServerAppExit. aReason:%d"), aReason);
+
+ MAknServerAppExitObserver::HandleServerAppExit(aReason);
+
+ iVideoClipPlayInProgress = EFalse;
+
+ PRINT(_L("Camera <= CCamAppUi::HandleServerAppExit."));
+ }
+
+
+
// End of File
--- a/camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp Tue May 11 15:56:11 2010 +0300
@@ -341,8 +341,8 @@
// ---------------------------------------------------------------------------
//
CCamCaptureSetupViewBase::CCamCaptureSetupViewBase( CCamAppController& aController )
- : CCamViewBase( aController ),iForceAvkonCBA(EFalse),
- iCaptureSetupModeActive( EFalse )
+ : CCamViewBase( aController ),
+ iForceAvkonCBA(EFalse)
{
}
@@ -1096,17 +1096,18 @@
// We need to inform the AppUi
iInfoListBoxActive = aActive;
- CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );
+ CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
if ( appUi)
{
if ( aActive )
{
+ iPrevCaptureMode = appUi->PreCaptureMode();
appUi->SetPreCaptureMode(ECamPreCapGenericSetting);
}
else
{
- appUi->SetPreCaptureMode(ECamPreCapViewfinder);
+ appUi->SetPreCaptureMode( iPrevCaptureMode );
}
}
}
--- a/camerauis/cameraapp/generic/src/CamDriveChangeNotifier.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamDriveChangeNotifier.cpp Tue May 11 15:56:11 2010 +0300
@@ -20,7 +20,7 @@
// INCLUDE FILES
#include <pathinfo.h>
#include <driveinfo.h>
-#include <usbwatcherinternalpskeys.h>
+#include <UsbWatcherInternalPSKeys.h>
#include <usbpersonalityids.h>
#include "CamDriveChangeNotifier.h"
@@ -31,6 +31,8 @@
_LIT(KDriveE, "E:\\");
_LIT(KDriveF, "F:\\");
+const TInt KUSBTimeout = 1000000; //1 sec
+
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
@@ -225,6 +227,15 @@
delete iUsbMSWatcher;
iUsbMSWatcher = NULL;
}
+ if ( iUSBTimer )
+ {
+ if( iUSBTimer->IsActive() )
+ {
+ iUSBTimer->Cancel();
+ }
+ delete iUSBTimer;
+ iUSBTimer = NULL;
+ }
PRINT( _L( "Camera <= CCamDriveChangeNotifier::~CCamDriveChangeNotifier" ) );
}
@@ -304,20 +315,22 @@
void CCamDriveChangeNotifier::HandlePropertyChangedL( const TUid& aCategory, const TUint aKey )
{
PRINT( _L( "Camera => CCamDriveChangeNotifier::HandlePropertyChangedL" ) );
- TInt value = 0;
if(KPSUidUsbWatcher == aCategory &&
KUsbWatcherSelectedPersonality == aKey)
{
+ TInt value = 0;
iUsbMSWatcher->Get( value );
if( KUsbPersonalityIdMS == value )
{
- iMassStorageModeOn = ETrue;
- iObserver.DriveChangeL( MCamDriveChangeNotifierObserver::EDriveUSBMassStorageModeOn );
+ PRINT( _L( "Camera => CCamDriveChangeNotifier::HandlePropertyChangedL StartTimer" ) );
+ iUSBTimer->Cancel();
+ iUSBTimer->StartTimer();
}
else
{
if( iMassStorageModeOn )
{
+ PRINT( _L("CCamDriveChangeNotifier::HandlePropertyChangedL KUsbPersonalityIdMS Off") );
iMassStorageModeOn = EFalse;
iObserver.DriveChangeL( MCamDriveChangeNotifierObserver::EDriveUSBMassStorageModeOff );
}
@@ -343,10 +356,51 @@
iUsbMSWatcher = CCamPropertyWatcher::NewL(*this, KPSUidUsbWatcher,
KUsbWatcherSelectedPersonality );
+ iUSBTimer = CCamTimer::NewL( KUSBTimeout, TCallBack(USBTimerCallBack, this));
CleanupStack::Pop(); // listener
CleanupStack::Pop(); // listener 2
StartMonitoring();
}
+
+// -----------------------------------------------------------------------------
+// CCamDriveChangeNotifier::USBTimerCallBackL
+// -----------------------------------------------------------------------------
+//
+void CCamDriveChangeNotifier::USBTimerCallBackL()
+ {
+ TInt value = 0;
+ iUsbMSWatcher->Get( value );
+ if( KUsbPersonalityIdMS == value )
+ {
+ PRINT( _L("CCamDriveChangeNotifier::USBTimerCallBackL KUsbPersonalityIdMS On") );
+ iMassStorageModeOn = ETrue;
+ iObserver.DriveChangeL( MCamDriveChangeNotifierObserver::EDriveUSBMassStorageModeOn );
+ }
+ else
+ {
+ if( iMassStorageModeOn )
+ {
+ PRINT( _L("CCamDriveChangeNotifier::USBTimerCallBackL KUsbPersonalityIdMS Off") );
+ iMassStorageModeOn = EFalse;
+ iObserver.DriveChangeL( MCamDriveChangeNotifierObserver::EDriveUSBMassStorageModeOff );
+ }
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CCamDriveChangeNotifier::USBTimerCallBack
+// -----------------------------------------------------------------------------
+//
+TInt CCamDriveChangeNotifier::USBTimerCallBack( TAny* aPtr )
+ {
+ CCamDriveChangeNotifier* self = static_cast<CCamDriveChangeNotifier*>(aPtr);
+ if( self )
+ {
+ TRAP_IGNORE( self->USBTimerCallBackL() );
+ }
+ return KErrNone;
+ }
+
// End of File
--- a/camerauis/cameraapp/generic/src/CamInfoListBoxContainer.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamInfoListBoxContainer.cpp Tue May 11 15:56:11 2010 +0300
@@ -599,12 +599,17 @@
}
break;
+ case EEventPenDownOnItem:
+ {
+ ShowTooltipL();
+ }
+ break;
+
case EEventItemClicked:
case EEventItemSingleClicked:
{
TInt settingValue = CurrentSettingItemValue();
iController.PreviewSettingChangeL( ECamSettingItemDynamicPhotoLightSensitivity, settingValue );
- ShowTooltipL();
}
break;
default:
--- a/camerauis/cameraapp/generic/src/CamPostCaptureContainer.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamPostCaptureContainer.cpp Tue May 11 15:56:11 2010 +0300
@@ -305,8 +305,12 @@
lateOperation ) )
{
gc.SetFaded( EFalse );
- gc.SetBrushColor( KRgbBlack );
- gc.Clear( iProcessingTextLayout.TextRect() );
+ gc.SetPenStyle( CGraphicsContext::ENullPen );
+ gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+ gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+ gc.SetBrushColor( TRgb::Color16MA( 0 ) );
+ gc.Clear( iProcessingTextLayout.TextRect() );
+ gc.SetBrushStyle( CGraphicsContext::ENullBrush );
}
// If snapshot contains a bitmap
@@ -611,10 +615,12 @@
// Mirrored layout is not supported.
TRect blackRect = outdatedArea;
blackRect.iTl.iX += snapshotSize.iWidth - outdatedArea.iTl.iX;
- gc.SetBrushColor( KRgbBlack );
- gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
- gc.SetPenStyle( CGraphicsContext::ESolidPen );
+ gc.SetPenStyle( CGraphicsContext::ENullPen );
+ gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
+ gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+ gc.SetBrushColor( TRgb::Color16MA( 0 ) );
gc.DrawRect( blackRect );
+ gc.SetBrushStyle( CGraphicsContext::ENullBrush );
}
if ( ssRect.Contains( outdatedArea.iTl ) || !iController.IsTouchScreenSupported() )
--- a/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp Tue May 11 15:56:11 2010 +0300
@@ -274,8 +274,9 @@
{
// Ignore foregrounding if view switch to postcapture anyway in progress.
if( appUi->TargetViewState() == ECamViewStatePostCapture
- || appUi->TargetViewState() == ECamViewStateBurstThumbnail ) {
- PRINT( _L( "Camera <= CCamPreCaptureViewBase::HandleForegroundEventL, ignored as going to postcapture") );
+ || appUi->TargetViewState() == ECamViewStateBurstThumbnail
+ || ( iStandbyModeActive && !appUi->IsRecoverableStatus() ) ) {
+ PRINT( _L( "Camera <= CCamPreCaptureViewBase::HandleForegroundEventL, ignored states") );
return;
}
@@ -677,8 +678,13 @@
fixedToolbar->SetDimmed( EFalse );
}
fixedToolbar->SetToolbarObserver( this );
- appUi->SetToolbarVisibility( );
-
+ // avoid toolbar flicker when returning from user scene setup
+ // after adjusting a setting
+ if ( !iSceneSettingModeActive )
+ {
+ appUi->SetToolbarVisibility( );
+ }
+
// Make sure toolbar extension button has no background
CAknToolbarExtension* extension = fixedToolbar->ToolbarExtension();
if ( extension )
@@ -1494,6 +1500,12 @@
void CCamPreCaptureViewBase::ReleaseResources()
{
PRINT( _L("Camera => CCamPreCaptureViewBase::ReleaseResources") );
+ CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
+ if( iStandbyModeActive && !appUi->IsRecoverableStatus() )
+ {
+ PRINT( _L("Camera <= CCamPreCaptureViewBase::ReleaseResources Standbymode") );
+ return;
+ }
iContinueInBackground = EFalse;
StopViewFinder();
@@ -1509,7 +1521,6 @@
if( iController.IsAppUiAvailable() )
{
// Ensure AppUi has had self-timer mode disabled
- CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );
if ( appUi )
{
TRAP_IGNORE( appUi->SelfTimerEnableL( ECamSelfTimerDisabled ) );
@@ -1810,7 +1821,8 @@
}
MAknTouchGestureFwPinchEvent *pinch = AknTouchGestureFwEventPinch( aEvent );
- if ( pinch && (ECamNoOperation == iController.CurrentOperation()) )
+ CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
+ if ( pinch && (ECamNoOperation == iController.CurrentOperation()) && appUi && !appUi->ZoomPane()->IsVisible() )
{
// Determine the direction of pinch: +ve -> pinch outward / zoom / widen VF
TInt currMove = pinch->Movement();
@@ -1826,8 +1838,8 @@
container->BlinkResolutionIndicatorOnChange( ETrue );
// Hide the zoom pane in case of pinch
- CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
- appUi->ZoomPane()->MakeVisible( EFalse, ETrue );
+ // CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
+ // appUi->ZoomPane()->MakeVisible( EFalse, ETrue );
if ( iController.ToggleWideScreenQuality( wide ) )
{
--- a/camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp Tue May 11 15:56:11 2010 +0300
@@ -1130,7 +1130,7 @@
}
break;
- case EEventItemClicked:
+ case EEventPenDownOnItem:
{
ShowTooltipL();
}
--- a/camerauis/cameraapp/generic/src/CamStillPreCaptureContainer.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamStillPreCaptureContainer.cpp Tue May 11 15:56:11 2010 +0300
@@ -744,7 +744,8 @@
}
CAknToolbar* fixedToolbar = appui->CurrentFixedToolbar();
- if ( appui->SelfTimerEnabled() && fixedToolbar )
+
+ if ( fixedToolbar )
{
CAknToolbarExtension* extension = fixedToolbar->ToolbarExtension();
if ( extension )
@@ -752,6 +753,7 @@
extension->SetShown( EFalse );
}
}
+ iZoomPane->MakeVisible( EFalse, ETrue );
return EKeyWasConsumed;
}
--- a/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp Tue May 11 15:56:11 2010 +0300
@@ -698,7 +698,7 @@
// if the view is in capture setup mode
else if ( iCaptureSetupModeActive )
{
- SetSoftKeysL( R_CAM_SOFTKEYS_SELECT_CANCEL );
+ SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE_TRANSPARENT );
}
// if the view is in scene settings mode
else if ( iSceneSettingModeActive )
@@ -2104,7 +2104,7 @@
TFileName iconFileName;
CamUtility::ResourceFileName( iconFileName );
- if ( grid == ECamViewfinderGridOn )
+ if ( grid == ECamViewfinderGridOff )
{
SetIconL(
button,
@@ -2211,7 +2211,7 @@
MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
TFileName iconFileName;
CamUtility::ResourceFileName( iconFileName );
- if ( face == ECamSettOn )
+ if ( face == ECamSettOff )
{
PRINT( _L( "Camera => UpdateFaceTrackingIconL on" ) );
SetIconL (
--- a/camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamUserSceneSetupViewBase.cpp Tue May 11 15:56:11 2010 +0300
@@ -267,8 +267,10 @@
// start viewfinder unless the is activating to standby or scene settings
+ // SwitchToInfoListBoxL( EInfoListBoxModeISO, EFalse ) where FullySkinned is EFalse, it
+ // indicate VF need to start in case of iInfoListBoxActive
if ( !iStandbyModeActive && !iSceneSettingModeActive &&
- !iInfoListBoxActive && !iUserSceneSetupModeActive )
+ !iUserSceneSetupModeActive )
{
iVFRequested=ETrue;
StartViewFinder();
@@ -286,7 +288,7 @@
}
}
// To background
- else if( !aForeground && appUi->AppInBackground( EFalse ) )
+ else if( !aForeground )
{
PRINT( _L("Camera <> CCamUserSceneSetupViewBase::HandleForegroundEventL dec engine count") );
// Register that we nolonger need the engine
--- a/camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamVideoPreCaptureView.cpp Tue May 11 15:56:11 2010 +0300
@@ -657,19 +657,18 @@
// if the view is in capture setup mode
else if ( iCaptureSetupModeActive )
{
- SetSoftKeysL( R_CAM_SOFTKEYS_SELECT_CANCEL );
+ SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE_TRANSPARENT );
}
// if the view is in scene settings mode
else if ( iSceneSettingModeActive )
{
- // R_AVKON_SOFTKEYS_OPTIONS_BACK
if( !iForceAvkonCBA )
{
SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE_TRANSPARENT );
}
else
{
- SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE ); //R_CAM_SOFTKEYS_OPTIONS_BACK__CHANGE );
+ SetSoftKeysL( R_CAM_SOFTKEYS_SELECT_CANCEL );
}
}
else if ( iStandbyModeActive )
--- a/camerauis/cameraapp/generic/src/CamViewBase.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamViewBase.cpp Tue May 11 15:56:11 2010 +0300
@@ -197,7 +197,7 @@
PRINT( _L("CCamViewBase::DoActivateL call deactivate"));
TBool wasCameraUser = IsCameraUser();
- DoDeactivate();
+ PrepareDeactivate();
// since we still use it
if( wasCameraUser )
{
@@ -212,9 +212,15 @@
if ( !iContainer )
{
CreateContainerL();
+
+ if( iTempContainer )
+ {
+ AppUi()->RemoveFromStack( iTempContainer );
+ }
AppUi()->AddToStackL( *this, iContainer );
iContainer->ActivateL();
}
+ PostDeactivate();
SetTitlePaneTextL();
@@ -278,6 +284,57 @@
}
// ---------------------------------------------------------------------------
+// CCamViewBase::PrepareDeactivate
+// Prepare deactivation of this view
+// ---------------------------------------------------------------------------
+//
+void CCamViewBase::PrepareDeactivate()
+ {
+ PRINT( _L("Camera => CCamViewBase::PrepareDeactivate" ));
+ // Both standard container and standby container should be deactivated
+ // Store them for temporal variables until new containers have been
+ // created.
+ if ( iStandbyContainer ) // implies IsInStandbyMode
+ {
+ AppUi()->RemoveFromStack( iStandbyContainer );
+ iTempStandbyContainer=iStandbyContainer;
+ iStandbyContainer = NULL;
+ SetStandbyModeActive( EFalse );
+ }
+
+ if ( iContainer )
+ {
+ iTempContainer=iContainer;
+ iContainer = NULL;
+ }
+ PRINT( _L("Camera <= CCamViewBase::PrepareDeactivate" ));
+ }
+
+
+// ---------------------------------------------------------------------------
+// CCamViewBase::PostDeactivate
+// Completed prepared deactivation of this view
+// ---------------------------------------------------------------------------
+//
+void CCamViewBase::PostDeactivate()
+ {
+ PRINT( _L("Camera => CCamViewBase::PostDeactivate" ));
+ // Both standard container and standby container should be deactivated
+ if ( iTempStandbyContainer ) // implies IsInStandbyMode
+ {
+ delete iTempStandbyContainer;
+ iTempStandbyContainer = NULL;
+ }
+
+ if ( iTempContainer )
+ {
+ delete iTempContainer;
+ iTempContainer = NULL;
+ }
+ PRINT( _L("Camera <= CCamViewBase::PostDeactivate" ));
+ }
+
+// ---------------------------------------------------------------------------
// CCamViewBase::CCamViewBase
// C++ constructor
// ---------------------------------------------------------------------------
--- a/camerauis/cameraapp/generic/src/camactivepalettehandler.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/camactivepalettehandler.cpp Tue May 11 15:56:11 2010 +0300
@@ -53,7 +53,7 @@
#include "CameraUiConfigManager.h"
#include "OstTraceDefinitions.h"
#ifdef OST_TRACE_COMPILER_IN_USE
-#include "CamActivePaletteHandlerTraces.h"
+#include "camactivepalettehandlerTraces.h"
#endif
--- a/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/generic/src/cameracontroller/camcameracontroller.cpp Tue May 11 15:56:11 2010 +0300
@@ -53,7 +53,7 @@
// Custom interfaces
#include <ECamOrientationCustomInterface2.h>
#include <ECamUIOrientationOverrideCustomAPI.h>
-
+#include <ecamusecasehintcustomapi.h>
#include <ecamfacetrackingcustomapi.h>
#include <akntoolbar.h>
// -------------------------------------
@@ -103,6 +103,15 @@
typedef CCamera::CCameraAdvancedSettings CAS;
typedef CCamera::CCameraImageProcessing CIP;
+//for camusecasehintcustomapi
+_LIT8(KCMRMimeTypeH263, "video/H263-2000");
+_LIT8(KCMRMimeTypeMPEG4VSPL2, "video/mp4v-es; profile-level-id=2");
+_LIT8(KCMRMimeTypeMPEG4VSPL3, "video/mp4v-es; profile-level-id=3");
+_LIT8(KCMRMimeTypeMPEG4VSPL4A, "video/mp4v-es; profile-level-id=4");
+_LIT8(KCMRMimeTypeH264AVCBPL30, "video/H264; profile-level-id=42801E");
+_LIT8(KCMRMimeTypeH264AVCBPL31, "video/H264; profile-level-id=42801F");
+
+
namespace NCamCameraController
{
static const TInt KPrimaryCameraIndex = 0;
@@ -1515,6 +1524,14 @@
static_cast <MCameraOrientation*>(
iCamera->CustomInterface( KCameraOrientationUid ) );
PRINT1( _L("Camera <> Orientation custom i/f pointer:%d"), iCustomInterfaceOrientation );
+
+ iCustomInterfaceUseCaseHint =
+ static_cast <MCameraUseCaseHint*>(
+ iCamera->CustomInterface( KCameraUseCaseHintUid ) );
+ PRINT1( _L("Camera <> UseCaseHint custom i/f pointer:%d"), iCustomInterfaceUseCaseHint );
+
+
+
#endif // CAMERAAPP_CAPI_V2_ADV
@@ -2550,6 +2567,14 @@
{
CheckFlagOffL( iInfo.iState, ECamReserved, KErrInUse );
+ // tell CAPI the usecase (still or video), not fatal if fails
+ TRAPD( err, HintUseCaseL() );
+
+ if( err )
+ {
+ PRINT1( _L("Camera <> CCamCameraController::ProcessControlStartupRequestL HintUseCaseL failed:%d"), err)
+ }
+
CAMERAAPP_PERF_CONTROLLER_START( ECamRequestReserve );
iCamera->Reserve();
// If UIOrientationOverrideAPI is used, ui construction is completed while
@@ -3723,7 +3748,7 @@
}
else if( ECamRequestCancelAutofocus == aRequestId )
{
- if( iAfInProgress )
+ if( iAfInProgress && iInfo.iCurrentCamera == KPrimaryCameraIndex )
{
// Autofocus in progress, need to cancel it before setting range to hyperfocal
PRINT( _L("Camera <> Cancel ongoing autofocus request") );
@@ -4117,6 +4142,12 @@
CCamCameraController::HandleReserveGainEvent( TInt aStatus )
{
PRINT1( _L("Camera => CCamCameraController::HandleReserveGainEvent, status:%d"), aStatus );
+ CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
+ if( appUi->StandbyStatus() && !appUi->IsRecoverableStatus() )
+ {
+ PRINT( _L("Camera <= CCamCameraController::HandleReserveGainEvent - return, in non recoverable standby state"));
+ return;
+ }
if( iIdle && iIdle->IsActive() )
{
PRINT( _L("Camera => CCamCameraController::HandleReserveGainEvent - return, recovery in progress"));
@@ -4771,6 +4802,18 @@
CCamCameraController::HandleAutoFocusEvent( TInt aStatus, const TUid& aEventUid )
{
PRINT1( _L("Camera => CCamCameraController::HandleAutoFocusEvent, status: %d"), aStatus );
+
+ if( IsFlagOn( iInfo.iState, ECamVideoOn ) && ECamCaptureOn == iInfo.iCaptureState )
+ {
+ CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
+ if ( appUi && !appUi->AppController().UiConfigManagerPtr()->IsContinuosAutofocusSupported() )
+ {
+ // Autofocus events are not need anymore, if video recording is started already.
+ PRINT( _L("Camera <= CCamCameraController::HandleAutoFocusEvent - ignore") );
+ return;
+ }
+ }
+
TBool proceed = EFalse;
// -------------------------------------------------------
@@ -6707,6 +6750,9 @@
if( iCustomInterfaceFaceTracking &&
KPrimaryCameraIndex == iInfo.iCurrentCamera )
{
+ // always enable FaceIndicators regardless of FT setting
+ // to get reticule visible
+ iCustomInterfaceFaceTracking->EnableFaceIndicatorsL( ETrue );
TBool ftOn( EFalse );
iSettingProvider.ProvideCameraSettingL( ECameraSettingFacetracking, &ftOn );
PRINT1( _L("Camera <> Set facetracking: %d"), ftOn )
@@ -6714,10 +6760,89 @@
( !ftOn && iCustomInterfaceFaceTracking->FaceTrackingOn() ) )
{
iCustomInterfaceFaceTracking->SetFaceTrackingL( ftOn );
- iCustomInterfaceFaceTracking->EnableFaceIndicatorsL( ETrue );
DirectRequestL( ECamRequestSetAfRange );
}
}
}
+// ---------------------------------------------------------------------------
+// CCamCameraController::HintUseCase
+// ---------------------------------------------------------------------------
+//
+void CCamCameraController::HintUseCaseL()
+ {
+ PRINT( _L("Camera => CCamCameraController::HintUseCaseL"))
+ CCamAppUi* appUi = static_cast<CCamAppUi*>( CEikonEnv::Static()->AppUi() );
+ //videomode
+ if ( iCustomInterfaceUseCaseHint && appUi &&
+ ( ( appUi->IsEmbedded() && appUi->TargetMode() == ECamControllerVideo ) ||
+ ( !appUi->IsEmbedded() && iAppController.TargetMode() == ECamControllerVideo ) ) )
+ {
+ PRINT( _L("Camera <> HintUseCaseL VideoMode") );
+ MCameraUseCaseHint::TVideoCodec codec = MCameraUseCaseHint::ECodecUnknown;
+ MCameraUseCaseHint::TVideoProfile profile = MCameraUseCaseHint::EProfileUnknown;
+ TPckgBuf<TCamParamsVideoCae> params;
+ iSettingProvider.ProvideCameraParamL( ECameraParamVideoCae, ¶ms );
+ if( params().iVideoType == KCMRMimeTypeH264AVCBPL31 )
+ {
+ PRINT( _L("Camera <> HintUseCaseL VideoMode KCMRMimeTypeH264AVCBPL31") );
+ codec = MCameraUseCaseHint::ECodecH264;
+ profile = MCameraUseCaseHint::EProfileH264BpL3_1;
+ }
+ else if( params().iVideoType == KCMRMimeTypeH263 )
+ {
+ PRINT( _L("Camera <> HintUseCaseL VideoMode KCMRMimeTypeH263") );
+ codec = MCameraUseCaseHint::ECodecH263;
+ profile = MCameraUseCaseHint::EProfileH263P0L10;
+ }
+ else if( params().iVideoType == KCMRMimeTypeH264AVCBPL30 )
+ {
+ PRINT( _L("Camera <> HintUseCaseL VideoMode KCMRMimeTypeH264AVCBPL30") );
+ codec = MCameraUseCaseHint::ECodecH264;
+ profile = MCameraUseCaseHint::EProfileH264BpL3;
+ }
+ else if( params().iVideoType == KCMRMimeTypeMPEG4VSPL4A )
+ {
+ PRINT( _L("Camera <> HintUseCaseL VideoMode KCMRMimeTypeMPEG4VSPL4A") );
+ codec = MCameraUseCaseHint::ECodecMpeg4;
+ profile = MCameraUseCaseHint::EProfileMPEG4SpL4a;
+ }
+ else if( params().iVideoType == KCMRMimeTypeMPEG4VSPL3 )
+ {
+ PRINT( _L("Camera <> HintUseCaseL VideoMode KCMRMimeTypeMPEG4VSPL3") );
+ codec = MCameraUseCaseHint::ECodecMpeg4;
+ profile = MCameraUseCaseHint::EProfileMPEG4SpL3;
+ }
+ else if( params().iVideoType == KCMRMimeTypeMPEG4VSPL2 )
+ {
+ PRINT( _L("Camera <> HintUseCaseL VideoMode KCMRMimeTypeMPEG4VSPL2") );
+ codec = MCameraUseCaseHint::ECodecMpeg4;
+ profile = MCameraUseCaseHint::EProfileMPEG4SpL2;
+ }
+ else
+ {
+ PRINT( _L("Camera <> HintUseCaseL VideoMode not supported") );
+ //leave if type not supported
+ User::Leave( KErrNotSupported );
+ }
+ iCustomInterfaceUseCaseHint->HintDirectVideoCaptureL( codec,
+ profile,
+ params().iFrameSize );
+
+ }
+ //stillmode
+ else if ( iCustomInterfaceUseCaseHint && appUi &&
+ ( ( appUi->IsEmbedded() && appUi->TargetMode() == ECamControllerImage ) ||
+ ( !appUi->IsEmbedded() && iAppController.TargetMode() == ECamControllerImage ) ) )
+ {
+ PRINT( _L("Camera <> HintUseCaseL ImageMode") );
+ TPckgBuf<TCamParamsImage> params;
+ iSettingProvider.ProvideCameraParamL( ECameraParamImage, ¶ms );
+ CCamera::TFormat format( params().iFormat );
+ TInt index ( GetResolutionIndexL( format, params().iSize ) );
+ iCustomInterfaceUseCaseHint->HintStillCaptureL( format, index );
+ }
+
+ PRINT( _L("Camera <= CCamCameraController::HintUseCaseL"))
+ }
// End of file
--- a/camerauis/cameraapp/loc/cam.loc Tue Apr 27 16:19:06 2010 +0300
+++ b/camerauis/cameraapp/loc/cam.loc Tue May 11 15:56:11 2010 +0300
@@ -1134,19 +1134,19 @@
//d:Visible in image quality slider control.
//l:main_cam5_pane_t4/opt1
//
-#define qtn_lcam_descr_quality_print9m "Capture images with 16:9 aspect ratio"
+#define qtn_lcam_descr_quality_print9m "Use for large sized prints up to 20x12 in (50x30 cm)"
//d:Image quality setting description
//d:Visible in image quality slider control.
//l:main_cam5_pane_t4/opt1
//
-#define qtn_lcam_descr_quality_print8m "Use for large sized prints up to 16 x 12 in (41x31 cm)"
+#define qtn_lcam_descr_quality_print8m "Use for large sized prints up to 16x12 in (40x30 cm)"
//d:Image quality setting description
//d:Visible in image quality slider control.
//l:main_cam5_pane_t4/opt1
//
-#define qtn_lcam_descr_quality_print6m "Capture images with 16:9 aspect ratio"
+#define qtn_lcam_descr_quality_print6m "Use for large sized prints up to 16x 9 in (40x23 cm)"
//d:Image quality setting description
//d:Visible in image quality slider control.
@@ -3330,19 +3330,20 @@
//d:Visible in image quality slider control.
//l:main_cset_text_pane
//
-#define qtn_lcam_descr_quality_print9m_v2 "Capture images with 16:9 aspect ratio"
+#define qtn_lcam_descr_quality_print9m_v2 "Use for large sized prints up to 20x12 in (50x30 cm)"
//d:Image quality setting description
//d:Visible in image quality slider control.
//l:main_cset_text_pane
//
-#define qtn_lcam_descr_quality_print8m_v2 "Use for large sized prints up to 16 x 12 in (41x31 cm)"
+#define qtn_lcam_descr_quality_print8m_v2 "Use for large sized prints up to 16x12 in (40x30 cm)"
+
//d:Image quality setting description
//d:Visible in image quality slider control.
//l:main_cset_text_pane
//
-#define qtn_lcam_descr_quality_print6m_v2 "Capture images with 16:9 aspect ratio"
+#define qtn_lcam_descr_quality_print6m_v2 "Use for large sized prints up to 16x9 in (40x23 cm)"
//d:Image quality setting description
//d:Visible in image quality slider control.
@@ -4171,13 +4172,13 @@
//d:Visible in image quality slider control.
//l:main_cam5_pane_t4/opt1
//
-#define qtn_lcam_descr_quality_print12m "Use for large sized prints up to 20x15 in (50x38 cm)"
+#define qtn_lcam_descr_quality_print12m "Use for large sized prints up to 20x16 in (50x40 cm)"
//d:Image quality setting description
//d:Visible in image quality slider control.
//l:main_cset_text_pane
//
-#define qtn_lcam_descr_quality_print12m_v2 "Use for large sized prints up to 20x15 in (50x38 cm)"
+#define qtn_lcam_descr_quality_print12m_v2 "Use for large sized prints up to 20x16 in (50x40 cm)"
//d: Tooltip text for mark mode button
//d: in touch toolbar in sequence post capture view