--- a/camerauis/cameraxui/cxengine/src/cxecameradevice.cpp Thu Jul 15 01:53:45 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxecameradevice.cpp Fri Aug 06 10:03:37 2010 +0300
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (c) 2009-2010 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"
@@ -16,6 +16,7 @@
*/
#include <ECamOrientationCustomInterface2.h>
#include <ecamfacetrackingcustomapi.h>
+#include <ecamusecasehintcustomapi.h>
#include "cxecameradevice.h"
#include "cxeerrormappingsymbian.h"
@@ -72,6 +73,18 @@
CX_DEBUG_EXIT_FUNCTION();
}
+void CxeCameraDevice::reserveCamera()
+{
+ CX_DEBUG_ENTER_FUNCTION();
+
+ if (mCamera) {
+ emit aboutToReserve();
+ mCamera->Reserve();
+ }
+
+ CX_DEBUG_EXIT_FUNCTION();
+}
+
void CxeCameraDevice::setCamera( CCamera *camera )
{
CX_DEBUG_ENTER_FUNCTION();
@@ -124,6 +137,11 @@
return mFaceTracking;
}
+MCameraUseCaseHint *CxeCameraDevice::useCaseHintApi()
+{
+ return mUseCaseHintApi;
+}
+
CxeError::Id CxeCameraDevice::initResources()
{
CX_DEBUG_ENTER_FUNCTION();
@@ -131,6 +149,8 @@
TInt status = KErrNone;
if (mCamera) {
+ OstTrace0(camerax_performance, CXECAMERADEVICE_EXTENSIONS_1, "msg: e_CX_GET_CCAMERA_EXTENSIONS 1");
+
CX_DEBUG(("Get CCamera extensions.."));
mCameraOrientation = static_cast<MCameraOrientation*>(
@@ -141,6 +161,10 @@
mCamera->CustomInterface(KCameraFaceTrackingUid));
CX_DEBUG(("MCameraFaceTracking interface 0x%08x", mFaceTracking));
+ mUseCaseHintApi = static_cast<MCameraUseCaseHint*>(
+ mCamera->CustomInterface(KCameraUseCaseHintUid));
+ CX_DEBUG(("MCameraUseCaseHint interface 0x%08x", mUseCaseHintApi));
+
TRAPD(errorAdvSet, mAdvancedSettings =
CCamera::CCameraAdvancedSettings::NewL(*mCamera));
CX_DEBUG(("CCameraAdvancedSettings status: %d", errorAdvSet));
@@ -159,6 +183,8 @@
status = errorAdvSet != KErrNone
? errorAdvSet : errorSnap;
CX_DEBUG(("Total status: %d", status));
+
+ OstTrace0(camerax_performance, CXECAMERADEVICE_EXTENSIONS_2, "msg: e_CX_GET_CCAMERA_EXTENSIONS 0");
}
CX_DEBUG_EXIT_FUNCTION();
@@ -172,6 +198,7 @@
// not owned.
mCameraOrientation = NULL;
mFaceTracking = NULL;
+ mUseCaseHintApi = NULL;
delete mCameraSnapshot;
mCameraSnapshot = NULL;
@@ -191,7 +218,7 @@
CxeError::Id CxeCameraDevice::newCamera( Cxe::CameraIndex cameraIndex, MCameraObserver2 *observer )
{
CX_DEBUG_ENTER_FUNCTION();
- OstTrace0(camerax_performance, CXECAMERADEVICE_NEWCAMERA_IN, "msg: e_CX_CAMERADEVICE_CREATE_CCAMERA 1");
+ OstTrace0(camerax_performance, CXECAMERADEVICE_NEWCAMERA_IN, "msg: e_CX_CREATE_CCAMERA 1");
CX_DEBUG(("Cxe: using camera index %d", cameraIndex));
@@ -207,11 +234,12 @@
CX_DEBUG(("CxeCameraDevice::newCamera <> new CCamera"));
#endif
+ OstTrace0(camerax_performance, CXECAMERADEVICE_NEWCAMERA_OUT, "msg: e_CX_CREATE_CCAMERA 0");
+
if (!err) {
setCamera(camera);
}
- OstTrace0(camerax_performance, CXECAMERADEVICE_NEWCAMERA_OUT, "msg: e_CX_CAMERADEVICE_CREATE_CCAMERA 0");
CX_DEBUG_EXIT_FUNCTION();
return CxeErrorHandlingSymbian::map(err);
}