|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #include <AudioPreference.h> // For KAudioPriorityVideoRecording |
|
18 |
|
19 #include "cxeerrormappingsymbian.h" |
|
20 #include "cxevideocapturecontrolsymbian.h" |
|
21 #include "cxevideocapturecontrolsymbianunit.h" |
|
22 #include "cxefakeVideorecorderutility.h" |
|
23 #include "cxutils.h" |
|
24 |
|
25 CxeVideoCaptureControlSymbianUnit::CxeVideoCaptureControlSymbianUnit( |
|
26 CxeCameraDevice &cameraDevice, |
|
27 CxeViewfinderControl &viewfinderControl, |
|
28 CxeCameraDeviceControl &cameraDeviceControl, |
|
29 CxeFilenameGenerator &nameGenerator, |
|
30 CxeSettings &settings, |
|
31 CxeQualityPresets &qualityPresets) |
|
32 : CxeVideoCaptureControlSymbian(cameraDevice, viewfinderControl, |
|
33 cameraDeviceControl, nameGenerator, |
|
34 settings, qualityPresets) |
|
35 { |
|
36 CX_DEBUG_IN_FUNCTION(); |
|
37 } |
|
38 |
|
39 CxeVideoCaptureControlSymbianUnit::~CxeVideoCaptureControlSymbianUnit() |
|
40 { |
|
41 CX_DEBUG_IN_FUNCTION(); |
|
42 } |
|
43 |
|
44 void CxeVideoCaptureControlSymbianUnit::createVideoRecorder() |
|
45 { |
|
46 CX_DEBUG_ENTER_FUNCTION(); |
|
47 |
|
48 // init video recoder |
|
49 if (state() == CxeVideoCaptureControl::Idle) { |
|
50 if (mVideoRecorder == NULL) { |
|
51 TRAPD(initErr, mVideoRecorder = |
|
52 new CxeFakeVideoRecorderUtility( *this , |
|
53 KAudioPriorityVideoRecording, |
|
54 TMdaPriorityPreference( KAudioPrefVideoRecording ))); |
|
55 if (initErr) { |
|
56 CX_DEBUG(("WARNING - VideoRecorderUtility could not be reserved. Failed with err:%d", initErr)); |
|
57 mVideoRecorder = NULL; |
|
58 } |
|
59 } |
|
60 } |
|
61 |
|
62 CX_DEBUG_EXIT_FUNCTION(); |
|
63 } |
|
64 |
|
65 // end of file |