|
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 "cxevideorecorderutilitysymbian.h" |
|
18 #include "cxenamespace.h" |
|
19 #include "cxutils.h" |
|
20 |
|
21 |
|
22 CxeVideoRecorderUtilitySymbian::~CxeVideoRecorderUtilitySymbian() |
|
23 { |
|
24 CX_DEBUG_ENTER_FUNCTION(); |
|
25 delete mVideoRecorder; |
|
26 mVideoRecorder = NULL; |
|
27 CX_DEBUG_EXIT_FUNCTION(); |
|
28 } |
|
29 |
|
30 CxeVideoRecorderUtilitySymbian::CxeVideoRecorderUtilitySymbian(MVideoRecorderUtilityObserver& aObserver, |
|
31 TInt aPriority, |
|
32 TMdaPriorityPreference aPref) |
|
33 { |
|
34 CX_DEBUG_ENTER_FUNCTION(); |
|
35 TRAPD(initErr, mVideoRecorder = CVideoRecorderUtility::NewL(aObserver, aPriority, aPref)); |
|
36 mStartuperror = initErr; |
|
37 CX_DEBUG_EXIT_FUNCTION(); |
|
38 } |
|
39 |
|
40 TInt CxeVideoRecorderUtilitySymbian::CustomCommandSync(const TMMFMessageDestinationPckg& aDestination, |
|
41 TInt aFunction, |
|
42 const TDesC8& aDataTo1, |
|
43 const TDesC8& aDataTo2) |
|
44 { |
|
45 CX_DEBUG_IN_FUNCTION(); |
|
46 return mVideoRecorder->CustomCommandSync(aDestination, aFunction, aDataTo1, aDataTo2); |
|
47 } |
|
48 |
|
49 void CxeVideoRecorderUtilitySymbian::OpenFileL(const TDesC& aFileName, |
|
50 TInt aCameraHandle, |
|
51 TUid aControllerUid, |
|
52 TUid aVideoFormat, |
|
53 const TDesC8& aVideoType, |
|
54 TFourCC aAudioType) |
|
55 { |
|
56 CX_DEBUG_ENTER_FUNCTION(); |
|
57 mVideoRecorder->OpenFileL(aFileName, aCameraHandle, aControllerUid, aVideoFormat, aVideoType, aAudioType); |
|
58 CX_DEBUG_EXIT_FUNCTION(); |
|
59 } |
|
60 |
|
61 void CxeVideoRecorderUtilitySymbian::SetVideoFrameSizeL(TSize aSize) |
|
62 { |
|
63 CX_DEBUG_ENTER_FUNCTION(); |
|
64 mVideoRecorder->SetVideoFrameSizeL(aSize); |
|
65 CX_DEBUG_EXIT_FUNCTION(); |
|
66 } |
|
67 |
|
68 void CxeVideoRecorderUtilitySymbian::SetVideoFrameRateL(TInt aRate) |
|
69 { |
|
70 CX_DEBUG_ENTER_FUNCTION(); |
|
71 mVideoRecorder->SetVideoFrameRateL(aRate); |
|
72 CX_DEBUG_EXIT_FUNCTION(); |
|
73 } |
|
74 |
|
75 void CxeVideoRecorderUtilitySymbian::SetVideoBitRateL(TInt aRate) |
|
76 { |
|
77 CX_DEBUG_ENTER_FUNCTION(); |
|
78 mVideoRecorder->SetVideoBitRateL(aRate); |
|
79 CX_DEBUG_EXIT_FUNCTION(); |
|
80 } |
|
81 |
|
82 void CxeVideoRecorderUtilitySymbian::SetAudioEnabledL(TBool aEnable) |
|
83 { |
|
84 CX_DEBUG_ENTER_FUNCTION(); |
|
85 mVideoRecorder->SetAudioEnabledL(aEnable); |
|
86 CX_DEBUG_EXIT_FUNCTION(); |
|
87 } |
|
88 |
|
89 void CxeVideoRecorderUtilitySymbian::SetMaxClipSizeL(TInt aClipSizeInBytes) |
|
90 { |
|
91 CX_DEBUG_ENTER_FUNCTION(); |
|
92 if (aClipSizeInBytes <= 0) { |
|
93 aClipSizeInBytes = KMMFNoMaxClipSize; |
|
94 } |
|
95 mVideoRecorder->SetMaxClipSizeL(aClipSizeInBytes); |
|
96 CX_DEBUG_EXIT_FUNCTION(); |
|
97 } |
|
98 |
|
99 void CxeVideoRecorderUtilitySymbian::Close() |
|
100 { |
|
101 CX_DEBUG_ENTER_FUNCTION(); |
|
102 mVideoRecorder->Close(); |
|
103 CX_DEBUG_EXIT_FUNCTION(); |
|
104 } |
|
105 |
|
106 void CxeVideoRecorderUtilitySymbian::Prepare() |
|
107 { |
|
108 CX_DEBUG_ENTER_FUNCTION(); |
|
109 mVideoRecorder->Prepare(); |
|
110 CX_DEBUG_EXIT_FUNCTION(); |
|
111 } |
|
112 |
|
113 void CxeVideoRecorderUtilitySymbian::Record() |
|
114 { |
|
115 CX_DEBUG_ENTER_FUNCTION(); |
|
116 mVideoRecorder->Record(); |
|
117 CX_DEBUG_EXIT_FUNCTION(); |
|
118 } |
|
119 |
|
120 int CxeVideoRecorderUtilitySymbian::Stop() |
|
121 { |
|
122 CX_DEBUG_IN_FUNCTION(); |
|
123 return mVideoRecorder->Stop(); |
|
124 } |
|
125 |
|
126 void CxeVideoRecorderUtilitySymbian::PauseL() |
|
127 { |
|
128 CX_DEBUG_ENTER_FUNCTION(); |
|
129 mVideoRecorder->PauseL(); |
|
130 CX_DEBUG_EXIT_FUNCTION(); |
|
131 } |
|
132 |
|
133 TTimeIntervalMicroSeconds CxeVideoRecorderUtilitySymbian::RecordTimeAvailable() |
|
134 { |
|
135 CX_DEBUG_IN_FUNCTION(); |
|
136 return mVideoRecorder->RecordTimeAvailable(); |
|
137 } |
|
138 |
|
139 TTimeIntervalMicroSeconds CxeVideoRecorderUtilitySymbian::DurationL() |
|
140 { |
|
141 CX_DEBUG_IN_FUNCTION(); |
|
142 return mVideoRecorder->DurationL(); |
|
143 } |
|
144 |
|
145 |
|
146 |
|
147 // end of file |