1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef VEITRIMFORMMSVIEW_H |
|
22 #define VEITRIMFORMMSVIEW_H |
|
23 |
|
24 // INCLUDES |
|
25 // System includes |
|
26 #include <aknview.h> // CAknView |
|
27 #include <CAknMemorySelectionDialog.h> |
|
28 #include <VedMovie.h> // CVedmovie |
|
29 // User includes |
|
30 #include "VeiSettings.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CAknNavigationDecorator; |
|
34 class CAknProgressDialog; |
|
35 class CVeiErrorUI; |
|
36 class CSendUi; |
|
37 class CVeiTrimForMmsContainer; |
|
38 class CVedMovie; |
|
39 class CMessageData; |
|
40 class CEikProgressInfo; |
|
41 class CVeiTempMaker; |
|
42 |
|
43 |
|
44 |
|
45 // CLASS DECLARATION |
|
46 |
|
47 /** |
|
48 * |
|
49 */ |
|
50 class CVeiTrimForMmsView: public CAknView, |
|
51 public MVedMovieObserver, |
|
52 public MVedMovieProcessingObserver |
|
53 |
|
54 { |
|
55 public: // Constructors and destructor |
|
56 |
|
57 static CVeiTrimForMmsView* NewL( CSendUi& aSendAppUi ); |
|
58 |
|
59 static CVeiTrimForMmsView* NewLC( CSendUi& aSendAppUi ); |
|
60 |
|
61 virtual ~CVeiTrimForMmsView(); |
|
62 |
|
63 enum TPreviewState |
|
64 { |
|
65 EIdle = 0, |
|
66 ELoading, |
|
67 EPreview, |
|
68 EPlaying, |
|
69 EStop, |
|
70 EStopAndExit, |
|
71 EOpeningFile, |
|
72 EPause |
|
73 }; |
|
74 |
|
75 public: |
|
76 void UpdateNaviPaneL( const TInt& aSizeInBytes, |
|
77 const TTimeIntervalMicroSeconds& aTime ); |
|
78 |
|
79 void UpdateNaviPaneSize(); |
|
80 |
|
81 enum TTrimState |
|
82 { |
|
83 ESeek = 0, |
|
84 EFullPreview |
|
85 }; |
|
86 |
|
87 void SetTrimStateL( TTrimState aState ); |
|
88 |
|
89 /** |
|
90 * From <code>MProgressDialogCallback</code>, callback method gets |
|
91 * called when a dialog is dismissed. |
|
92 * |
|
93 * @param aButtonId Button id. |
|
94 */ |
|
95 virtual void DialogDismissedL( TInt aButtonId ); |
|
96 void ProcessNeeded( TBool aProcessNeed ); |
|
97 |
|
98 /** |
|
99 * Shows global error note for given error. |
|
100 * |
|
101 * @param aError No description. |
|
102 */ |
|
103 void ShowGlobalErrorNoteL( TInt aError = 0 ) const; |
|
104 |
|
105 /** |
|
106 * Handles a change to the control's resources. |
|
107 */ |
|
108 void HandleResourceChange( TInt aType ); |
|
109 |
|
110 private: // From CAknView |
|
111 |
|
112 TUid Id() const; |
|
113 |
|
114 void HandleCommandL(TInt aCommand); |
|
115 |
|
116 void DoActivateL( |
|
117 const TVwsViewId& aPrevViewId, |
|
118 TUid aCustomMessageId, |
|
119 const TDesC8& aCustomMessage ); |
|
120 |
|
121 void DoDeactivate(); |
|
122 |
|
123 void HandleStatusPaneSizeChange(); |
|
124 |
|
125 void ReadSettingsL( TVeiSettings& aSettings ) const; |
|
126 |
|
127 protected: // From MVedMovieObserver |
|
128 |
|
129 virtual void NotifyVideoClipAdded(CVedMovie& aMovie, TInt aIndex); |
|
130 |
|
131 virtual void NotifyVideoClipAddingFailed(CVedMovie& aMovie, TInt aError); |
|
132 |
|
133 virtual void NotifyVideoClipRemoved(CVedMovie& aMovie, TInt aIndex); |
|
134 |
|
135 virtual void NotifyVideoClipIndicesChanged(CVedMovie& aMovie, TInt aOldIndex, |
|
136 TInt aNewIndex); |
|
137 |
|
138 virtual void NotifyVideoClipTimingsChanged(CVedMovie& aMovie, |
|
139 TInt aIndex); |
|
140 |
|
141 virtual void NotifyVideoClipColorEffectChanged(CVedMovie& aMovie, |
|
142 TInt aIndex); |
|
143 |
|
144 virtual void NotifyVideoClipAudioSettingsChanged(CVedMovie& aMovie, |
|
145 TInt aIndex); |
|
146 |
|
147 virtual void NotifyVideoClipGeneratorSettingsChanged(CVedMovie& aMovie, |
|
148 TInt aIndex); |
|
149 |
|
150 virtual void NotifyVideoClipDescriptiveNameChanged(CVedMovie& aMovie, |
|
151 TInt aIndex); |
|
152 |
|
153 virtual void NotifyStartTransitionEffectChanged(CVedMovie& aMovie); |
|
154 |
|
155 virtual void NotifyMiddleTransitionEffectChanged(CVedMovie& aMovie, |
|
156 TInt aIndex); |
|
157 |
|
158 virtual void NotifyEndTransitionEffectChanged(CVedMovie& aMovie); |
|
159 |
|
160 virtual void NotifyAudioClipAdded(CVedMovie& aMovie, TInt aIndex); |
|
161 |
|
162 virtual void NotifyAudioClipAddingFailed(CVedMovie& aMovie, TInt aError); |
|
163 |
|
164 virtual void NotifyAudioClipRemoved(CVedMovie& aMovie, TInt aIndex); |
|
165 |
|
166 virtual void NotifyAudioClipIndicesChanged(CVedMovie& aMovie, TInt aOldIndex, |
|
167 TInt aNewIndex); |
|
168 |
|
169 virtual void NotifyAudioClipTimingsChanged(CVedMovie& aMovie, |
|
170 TInt aIndex); |
|
171 |
|
172 virtual void NotifyMovieQualityChanged(CVedMovie& aMovie); |
|
173 |
|
174 virtual void NotifyMovieReseted(CVedMovie& aMovie); |
|
175 |
|
176 virtual void NotifyMovieOutputParametersChanged(CVedMovie& aMovie); |
|
177 |
|
178 virtual void NotifyAudioClipDynamicLevelMarkInserted(CVedMovie& aMovie, |
|
179 TInt aClipIndex, |
|
180 TInt aMarkIndex); |
|
181 |
|
182 virtual void NotifyAudioClipDynamicLevelMarkRemoved(CVedMovie& aMovie, |
|
183 TInt aClipIndex, |
|
184 TInt aMarkIndex); |
|
185 |
|
186 virtual void NotifyVideoClipDynamicLevelMarkInserted(CVedMovie& aMovie, |
|
187 TInt aClipIndex, |
|
188 TInt aMarkIndex); |
|
189 |
|
190 virtual void NotifyVideoClipDynamicLevelMarkRemoved(CVedMovie& aMovie, |
|
191 TInt aClipIndex, |
|
192 TInt aMarkIndex); |
|
193 |
|
194 protected: // From MVedMovieProcessingObserver |
|
195 |
|
196 /** |
|
197 * Called to notify that a new movie processing operation has been started. |
|
198 * |
|
199 * @param aMovie movie |
|
200 */ |
|
201 void NotifyMovieProcessingStartedL( CVedMovie& aMovie ); |
|
202 |
|
203 /** |
|
204 * Called to inform about the current progress of the movie processing operation. |
|
205 * |
|
206 * @param aMovie movie |
|
207 * @param aPercentage percentage of the operation completed, must be |
|
208 * in range 0..100 |
|
209 */ |
|
210 void NotifyMovieProcessingProgressed( CVedMovie& aMovie, TInt aPercentage ); |
|
211 |
|
212 /** |
|
213 * Called to notify that the movie processing operation has been completed. |
|
214 * |
|
215 * @param aMovie movie |
|
216 * @param aError error code why the operation was completed. |
|
217 * <code>KErrNone</code> if the operation was completed |
|
218 * successfully. |
|
219 */ |
|
220 void NotifyMovieProcessingCompleted( CVedMovie& aMovie, TInt aError ); |
|
221 |
|
222 private: // New functions |
|
223 |
|
224 void CmdSoftkeyCancelL(); |
|
225 |
|
226 /** |
|
227 * |
|
228 */ |
|
229 void CmdSoftkeyOkL(); |
|
230 |
|
231 |
|
232 /** |
|
233 * Send via multimedia command handling. |
|
234 */ |
|
235 void CmdSendViaMultimediaL(); |
|
236 |
|
237 void CmdSoftkeyBackL(); |
|
238 |
|
239 void PushKeySoundL( const TInt aResourceId ) const; |
|
240 |
|
241 void PopKeySound() const; |
|
242 |
|
243 /** |
|
244 * Sets the text for title pane. |
|
245 */ |
|
246 void SetTitlePaneTextL() const; |
|
247 |
|
248 void CreateNaviPaneL(); |
|
249 |
|
250 void SetNaviPaneDurationLabelL( const TTimeIntervalMicroSeconds& aTime ); |
|
251 |
|
252 void SetNaviPaneSizeLabelL( const TInt& aSizeInBytes ); |
|
253 |
|
254 /** |
|
255 * Start full screen preview. |
|
256 */ |
|
257 void PlayPreviewL(); |
|
258 |
|
259 private: // Constructors |
|
260 |
|
261 CVeiTrimForMmsView( CSendUi& aSendAppUi ); |
|
262 |
|
263 void ConstructL(); |
|
264 |
|
265 private: // Data |
|
266 |
|
267 /** |
|
268 * Cut in time in microseconds (clip timebase) for trimmed video. |
|
269 */ |
|
270 TTimeIntervalMicroSeconds iCutInTime; |
|
271 |
|
272 /** |
|
273 * Cut out time in microseconds (clip timebase) for trimmed video. |
|
274 */ |
|
275 TTimeIntervalMicroSeconds iCutOutTime; |
|
276 |
|
277 /** |
|
278 * Progress note for saving the trimmed video |
|
279 */ |
|
280 CAknProgressDialog* iProgressNote; |
|
281 |
|
282 /** |
|
283 * Progress info for the progress dialog. |
|
284 */ |
|
285 CEikProgressInfo* iProgressInfo; |
|
286 |
|
287 /** |
|
288 * Container |
|
289 */ |
|
290 CVeiTrimForMmsContainer* iContainer; |
|
291 |
|
292 /** |
|
293 * Navigation pane decorator |
|
294 */ |
|
295 CAknNavigationDecorator* iNaviDecorator; |
|
296 |
|
297 /** |
|
298 * |
|
299 */ |
|
300 CSendUi& iSendAppUi; |
|
301 |
|
302 /** |
|
303 * |
|
304 */ |
|
305 CVedMovie* iVedMovie; |
|
306 |
|
307 /** |
|
308 * Previous view which activated this view. |
|
309 */ |
|
310 TVwsViewId iPreviousViewId; |
|
311 |
|
312 /** |
|
313 * Utility class to display error notes by applications. |
|
314 */ |
|
315 CVeiErrorUI* iErrorUi; |
|
316 |
|
317 /** |
|
318 * No description. |
|
319 */ |
|
320 CVeiTempMaker* iTempMaker; |
|
321 |
|
322 /** |
|
323 * Temporary file name for storing preview/send clip. |
|
324 */ |
|
325 HBufC* iTempFile; |
|
326 |
|
327 |
|
328 TTrimState iTrimState; |
|
329 |
|
330 TVeiSettings iMovieSaveSettings; |
|
331 |
|
332 /* |
|
333 * Indecates if process needed. |
|
334 */ |
|
335 TBool iProcessNeeded; |
|
336 |
|
337 |
|
338 |
|
339 }; |
|
340 |
|
341 #endif |
|