1 /* |
1 /* |
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
4967 // Clear this to be sure it doesn't block recording |
4967 // Clear this to be sure it doesn't block recording |
4968 iVideoRequested = EFalse; |
4968 iVideoRequested = EFalse; |
4969 SetTargetMode ( ECamControllerVideo ); |
4969 SetTargetMode ( ECamControllerVideo ); |
4970 SetTargetImageMode( ECamImageCaptureNone ); |
4970 SetTargetImageMode( ECamImageCaptureNone ); |
4971 // shutdown the orientation channel when going to videomode |
4971 // shutdown the orientation channel when going to videomode |
4972 if ( iConfigManager && iConfigManager->IsOrientationSensorSupported() ) |
4972 if ( iConfigManager && iConfigManager->IsOrientationSensorSupported() ) |
4973 { |
4973 { |
4974 TRAP_IGNORE( UpdateSensorApiL( EFalse ) ); |
4974 TRAP_IGNORE( UpdateSensorApiL( EFalse ) ); |
4975 } |
4975 } |
4976 } |
4976 } |
4977 else if( ECamControllerImage == aMode ) |
4977 else if( ECamControllerImage == aMode ) |
4978 { |
4978 { |
4979 SetTargetMode ( ECamControllerImage ); |
4979 SetTargetMode ( ECamControllerImage ); |
4980 // SetTargetImageMode( ECamImageCaptureSingle ); |
4980 // SetTargetImageMode( ECamImageCaptureSingle ); |
6192 PRINT( _L("Camera <> CCamAppController: status in KErrNone..") ); |
6192 PRINT( _L("Camera <> CCamAppController: status in KErrNone..") ); |
6193 __ASSERT_ALWAYS( aBitmap, CamPanic( ECamPanicNullPointer ) ); |
6193 __ASSERT_ALWAYS( aBitmap, CamPanic( ECamPanicNullPointer ) ); |
6194 |
6194 |
6195 if( iInfo.iActiveCamera == ECamActiveCameraSecondary && |
6195 if( iInfo.iActiveCamera == ECamActiveCameraSecondary && |
6196 iCaptureOrientation == ECamOrientation90 && |
6196 iCaptureOrientation == ECamOrientation90 && |
6197 ECamSettOn == iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) && |
|
6198 ECamSettOn == IntegerSettingValue( ECamSettingItemShowCapturedPhoto ) ) |
6197 ECamSettOn == IntegerSettingValue( ECamSettingItemShowCapturedPhoto ) ) |
6199 { |
6198 { |
6200 PRINT( _L( "Camera <> Rotate portrait secondary camera snapshot image 180 degrees" ) ) |
6199 PRINT( _L( "Camera <> Rotate portrait secondary camera snapshot image 180 degrees" ) ) |
6201 TRAP_IGNORE( iSnapShotRotator->RotateL( aBitmap ) ); |
6200 TRAP_IGNORE( iSnapShotRotator->RotateL( aBitmap ) ); |
6202 } |
6201 } |
6340 { |
6339 { |
6341 NotifyControllerObservers( ECamEventImageData ); |
6340 NotifyControllerObservers( ECamEventImageData ); |
6342 } |
6341 } |
6343 PRINT1( _L("Camera <> CCamAppController::HandleImageCaptureEventL array count:%d"), BurstCaptureArray()->Count() ); |
6342 PRINT1( _L("Camera <> CCamAppController::HandleImageCaptureEventL array count:%d"), BurstCaptureArray()->Count() ); |
6344 // check if snapshot bitmap needs to be rotated before creating a thumbnail from it |
6343 // check if snapshot bitmap needs to be rotated before creating a thumbnail from it |
6345 TBool rotate( ECamSettOn == iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) && |
6344 TBool rotate( ( ECamSettOn == iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) || |
|
6345 iInfo.iActiveCamera == ECamActiveCameraSecondary ) && |
6346 ECamSettOn == IntegerSettingValue( ECamSettingItemShowCapturedPhoto ) && |
6346 ECamSettOn == IntegerSettingValue( ECamSettingItemShowCapturedPhoto ) && |
6347 iCaptureOrientation != ECamOrientation0 ); |
6347 iCaptureOrientation != ECamOrientation0 ); |
6348 |
6348 |
6349 if ( ECamImageCaptureBurst != iInfo.iImageMode ) |
6349 if ( ECamImageCaptureBurst != iInfo.iImageMode ) |
6350 { |
6350 { |
7413 PRINT3( _L("Camera => CCamAppController::DataReceived aChannel %d aCount %d aDataLost %d"), |
7413 PRINT3( _L("Camera => CCamAppController::DataReceived aChannel %d aCount %d aDataLost %d"), |
7414 aChannel.GetChannelInfo().iChannelType, aCount, aDataLost ); |
7414 aChannel.GetChannelInfo().iChannelType, aCount, aDataLost ); |
7415 |
7415 |
7416 if ( KSensrvChannelTypeIdOrientationData == aChannel.GetChannelInfo().iChannelType ) |
7416 if ( KSensrvChannelTypeIdOrientationData == aChannel.GetChannelInfo().iChannelType ) |
7417 { |
7417 { |
7418 TBool rotate( ECamSettOn == iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) ); |
7418 TBool rotate( ECamSettOn == iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) |
|
7419 || iInfo.iActiveCamera == ECamActiveCameraSecondary ); |
7419 |
7420 |
7420 if( rotate ) |
7421 if( rotate ) |
7421 { |
7422 { |
7422 TSensrvOrientationData orientationData; |
7423 TSensrvOrientationData orientationData; |
7423 TPckg<TSensrvOrientationData> orientationPackage( orientationData ); |
7424 TPckg<TSensrvOrientationData> orientationPackage( orientationData ); |
8477 CCamAppController::CopySnapshotIfNeeded( const CFbsBitmap& aSnapshot, TInt aError ) |
8478 CCamAppController::CopySnapshotIfNeeded( const CFbsBitmap& aSnapshot, TInt aError ) |
8478 { |
8479 { |
8479 if ( ECamImageCaptureTimeLapse == iInfo.iImageMode |
8480 if ( ECamImageCaptureTimeLapse == iInfo.iImageMode |
8480 || ECamControllerVideo == iInfo.iMode |
8481 || ECamControllerVideo == iInfo.iMode |
8481 || ( iConfigManager && iConfigManager->IsOrientationSensorSupported() && |
8482 || ( iConfigManager && iConfigManager->IsOrientationSensorSupported() && |
8482 iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) == ECamSettOn ) |
8483 ( iSettingsModel->IntegerSettingValue( ECamSettingItemImageRotation ) == ECamSettOn |
|
8484 || iInfo.iActiveCamera == ECamActiveCameraSecondary ) ) |
8483 ) |
8485 ) |
8484 { |
8486 { |
8485 StopIdleTimer(); |
8487 StopIdleTimer(); |
8486 delete iSnapShotCopy; |
8488 delete iSnapShotCopy; |
8487 iSnapShotCopy = NULL; |
8489 iSnapShotCopy = NULL; |
8932 // Autofocusing is done, do possible pending capture |
8934 // Autofocusing is done, do possible pending capture |
8933 SetAfNeeded( EFalse ); |
8935 SetAfNeeded( EFalse ); |
8934 if( iCaptureRequested && !EngineProcessingCapture() ) |
8936 if( iCaptureRequested && !EngineProcessingCapture() ) |
8935 { |
8937 { |
8936 iCaptureRequested = EFalse; |
8938 iCaptureRequested = EFalse; |
|
8939 OstTrace0( CAMERAAPP_PERFORMANCE, DUP7_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_APP_AF 0" ); |
|
8940 OstTrace0( CAMERAAPP_PERFORMANCE, DUP8_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_PRI_AF_LOCK 0" ); |
8937 OstTrace0( CAMERAAPP_PERFORMANCE, CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_APP_SHOT_TO_SNAPSHOT 1" ); |
8941 OstTrace0( CAMERAAPP_PERFORMANCE, CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_APP_SHOT_TO_SNAPSHOT 1" ); |
8938 OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_PRI_SHOT_TO_SNAPSHOT 1" ); |
8942 OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_PRI_SHOT_TO_SNAPSHOT 1" ); |
8939 OstTrace0( CAMERAAPP_PERFORMANCE, DUP2_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_PRI_SHOT_TO_SAVE 1" ); |
8943 OstTrace0( CAMERAAPP_PERFORMANCE, DUP2_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_PRI_SHOT_TO_SAVE 1" ); |
8940 OstTrace0( CAMERAAPP_PERFORMANCE, DUP3_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_PRI_SHOT_TO_SHOT 1" ); |
8944 OstTrace0( CAMERAAPP_PERFORMANCE, DUP3_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_PRI_SHOT_TO_SHOT 1" ); |
8941 OstTrace0( CAMERAAPP_PERFORMANCE, DUP4_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_APP_SHOT_TO_STILL 1" ); |
8945 OstTrace0( CAMERAAPP_PERFORMANCE, DUP4_CCAMAPPCONTROLLER_HANDLECAMERAEVENTL, "e_CAM_APP_SHOT_TO_STILL 1" ); |