|
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 * Video player status monitor definitions, class CStatusMonitor. |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef __STATUSMONITOR_H__ |
|
21 #define __STATUSMONITOR_H__ |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #ifndef __E32BASE_H__ |
|
27 #include <e32base.h> |
|
28 #endif |
|
29 |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 |
|
33 class MVedMovieProcessingObserver; |
|
34 class CMovieProcessorImpl; |
|
35 class CVedMovie; |
|
36 |
|
37 |
|
38 // CLASS DEFINITIONS |
|
39 |
|
40 class CStatusMonitor : public CActive |
|
41 { |
|
42 public: // constants |
|
43 enum TErrorCode |
|
44 { |
|
45 EInternalAssertionFailure = -2000, |
|
46 EInvalidStateTransition = -2001 |
|
47 }; |
|
48 |
|
49 public: // new functions |
|
50 // Constructors |
|
51 CStatusMonitor(MVedMovieProcessingObserver *anObserver, |
|
52 CMovieProcessorImpl *aProcessor, CVedMovie *aMovie, |
|
53 TInt aPriority=EPriorityHigh); |
|
54 |
|
55 void ConstructL(); |
|
56 |
|
57 // An error has occurred |
|
58 void Error(TInt anErrorCode); |
|
59 |
|
60 // Initialisation for processing has started |
|
61 void StartPreparing(); |
|
62 |
|
63 // The processor has been initialized and is ready for processing |
|
64 void PrepareComplete(); |
|
65 |
|
66 // The processor has been closed |
|
67 void Closed(); |
|
68 |
|
69 // Processing has been started |
|
70 void ProcessingStarted(TBool aNotifyObserver); |
|
71 |
|
72 // Processing progress indication |
|
73 void Progress(TInt aPercentage); |
|
74 |
|
75 // Processing has been stopped |
|
76 void ProcessingStopped(); |
|
77 |
|
78 // The clip end has been reached |
|
79 void ClipProcessed(); |
|
80 |
|
81 // The movie end has been reached |
|
82 void ProcessingComplete(); |
|
83 |
|
84 // processing has been cancelled |
|
85 void ProcessingCancelled(); |
|
86 |
|
87 // A fatal non-recovereable error has occurred |
|
88 void FatalError(TInt anError); |
|
89 |
|
90 // dummy |
|
91 void StreamEndReached(); |
|
92 |
|
93 |
|
94 public: // CActive methods |
|
95 ~CStatusMonitor(); |
|
96 void RunL(); |
|
97 void DoCancel(); |
|
98 |
|
99 |
|
100 private: // Data |
|
101 MVedMovieProcessingObserver *iObserver; |
|
102 CMovieProcessorImpl *iProcessor; |
|
103 |
|
104 CVedMovie *iMovie; |
|
105 |
|
106 TInt iError; // the error that has been encountered |
|
107 TInt iOutError; // for returning the error to observer |
|
108 |
|
109 TBool iProcessingStarted; // has processing been started ? |
|
110 TBool iProcessing; // are we currently processing ? |
|
111 TBool iCancelled; // has processing been cancelled ? |
|
112 |
|
113 TBool iClipProcessed; // a video clip has been processed |
|
114 TBool iComplete; // processing complete => inform observer |
|
115 |
|
116 TBool iPrepared; // is the processor open & ready to process ? |
|
117 TBool iPreparing; // is the processor being initialized ? |
|
118 |
|
119 |
|
120 }; |
|
121 |
|
122 |
|
123 |
|
124 #endif // __STATUSMONITOR_H__ |
|
125 |
|
126 // End of File |