diff -r 8b2d6d0384b0 -r d9aefe59d544 camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/cxevideocapturecontrolsymbianunit.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/cxevideocapturecontrolsymbianunit.cpp Fri Apr 16 14:51:30 2010 +0300 @@ -0,0 +1,65 @@ +/* +* 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: +* +*/ +#include // For KAudioPriorityVideoRecording + +#include "cxeerrormappingsymbian.h" +#include "cxevideocapturecontrolsymbian.h" +#include "cxevideocapturecontrolsymbianunit.h" +#include "cxefakeVideorecorderutility.h" +#include "cxutils.h" + +CxeVideoCaptureControlSymbianUnit::CxeVideoCaptureControlSymbianUnit( + CxeCameraDevice &cameraDevice, + CxeViewfinderControl &viewfinderControl, + CxeCameraDeviceControl &cameraDeviceControl, + CxeFilenameGenerator &nameGenerator, + CxeSettings &settings, + CxeQualityPresets &qualityPresets) + : CxeVideoCaptureControlSymbian(cameraDevice, viewfinderControl, + cameraDeviceControl, nameGenerator, + settings, qualityPresets) +{ + CX_DEBUG_IN_FUNCTION(); +} + +CxeVideoCaptureControlSymbianUnit::~CxeVideoCaptureControlSymbianUnit() +{ + CX_DEBUG_IN_FUNCTION(); +} + +void CxeVideoCaptureControlSymbianUnit::createVideoRecorder() +{ + CX_DEBUG_ENTER_FUNCTION(); + + // init video recoder + if (state() == CxeVideoCaptureControl::Idle) { + if (mVideoRecorder == NULL) { + TRAPD(initErr, mVideoRecorder = + new CxeFakeVideoRecorderUtility( *this , + KAudioPriorityVideoRecording, + TMdaPriorityPreference( KAudioPrefVideoRecording ))); + if (initErr) { + CX_DEBUG(("WARNING - VideoRecorderUtility could not be reserved. Failed with err:%d", initErr)); + mVideoRecorder = NULL; + } + } + } + + CX_DEBUG_EXIT_FUNCTION(); +} + +// end of file