1 /* |
|
2 * Copyright (c) 2008-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: Utility for creating bitmaps from video files |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 * @internal reviewed 30/07/2007 by Simon Brooks |
|
22 */ |
|
23 |
|
24 #ifndef GLXTNVIDEOUTILITY_H |
|
25 #define GLXTNVIDEOUTILITY_H |
|
26 |
|
27 #include <e32base.h> |
|
28 #ifdef ENABLE_VED |
|
29 #include <VedVideoClipInfo.h> |
|
30 #else |
|
31 #include <TNEVideoClipInfo.h> |
|
32 #endif |
|
33 |
|
34 class CFbsBitmap; |
|
35 |
|
36 /** |
|
37 * Utility for creating bitmaps from video files |
|
38 * |
|
39 * @author Dan Rhodes |
|
40 * @ingroup glx_thumbnail_creator |
|
41 */ |
|
42 NONSHARABLE_CLASS( CGlxtnVideoUtility ) : public CBase, |
|
43 #ifdef ENABLE_VED |
|
44 public MVedVideoClipInfoObserver, public MVedVideoClipFrameObserver |
|
45 #else |
|
46 public MTNEVideoClipInfoObserver, public MTNEVideoClipThumbObserver |
|
47 #endif |
|
48 { |
|
49 public: |
|
50 /** |
|
51 * Default constructor. |
|
52 */ |
|
53 CGlxtnVideoUtility(); |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CGlxtnVideoUtility(); |
|
58 |
|
59 /** |
|
60 * Start asynchronous frame decoding. |
|
61 * @param aRequestStatus Request status for the asynchronous operation. |
|
62 * @param aDestination Bitmap in which to store the frame. |
|
63 * @param aFileName Full name of video file. |
|
64 */ |
|
65 void GetVideoFrameL( TRequestStatus* aRequestStatus, |
|
66 CFbsBitmap*& aDestination, const TDesC& aFileName, |
|
67 RArray<TSize>& aTargetSizes, TDisplayMode aMode ); |
|
68 /** |
|
69 * Cancel asynchronous frame decoding. |
|
70 */ |
|
71 void Cancel(); |
|
72 |
|
73 #ifdef ENABLE_VED |
|
74 private: // From MVedVideoClipInfoObserver |
|
75 void NotifyVideoClipInfoReady( CVedVideoClipInfo& aInfo, TInt aError ); |
|
76 |
|
77 private: // From MVedVideoClipFrameObserver |
|
78 void NotifyVideoClipFrameCompleted( CVedVideoClipInfo& aInfo, |
|
79 TInt aError, CFbsBitmap* aFrame ); |
|
80 #else |
|
81 private: // From MTNEVideoClipInfoObserver |
|
82 void NotifyVideoClipInfoReady( CTNEVideoClipInfo& aInfo, TInt aError ); |
|
83 |
|
84 private: // From MTNEVideoClipThumbObserver |
|
85 void NotifyVideoClipThumbCompleted( CTNEVideoClipInfo& aInfo, |
|
86 TInt aError, CFbsBitmap* aFrame ); |
|
87 #endif |
|
88 |
|
89 private: |
|
90 #ifdef ENABLE_VED |
|
91 CVedVideoClipInfo* iVideoInfo; |
|
92 #else |
|
93 CTNEVideoClipInfo* iVideoInfo; |
|
94 #endif |
|
95 /** Client's request status */ |
|
96 TRequestStatus* iRequestStatus; |
|
97 /** Pointer to variable to hold returned frame */ |
|
98 CFbsBitmap** iDestination; |
|
99 TSize iSize; |
|
100 TDisplayMode iDisplayMode; |
|
101 }; |
|
102 |
|
103 #endif // GLXTNVIDEOUTILITY_H |
|