17 |
17 |
18 #ifndef CMMAVIDEOPLAYER_H |
18 #ifndef CMMAVIDEOPLAYER_H |
19 #define CMMAVIDEOPLAYER_H |
19 #define CMMAVIDEOPLAYER_H |
20 |
20 |
21 // INCLUDES |
21 // INCLUDES |
|
22 #include <AccMonitor.h> |
|
23 #include <jutils.h> |
22 #include "cmmaaudioplayer.h" |
24 #include "cmmaaudioplayer.h" |
23 #include "mmmaguiplayer.h" |
25 #include "mmmaguiplayer.h" |
24 #include "mmmasnapshot.h" |
26 #include "mmmasnapshot.h" |
25 #include "cmmasurfacewindow.h" |
27 #include "cmmasurfacewindow.h" |
26 #include <jutils.h> |
|
27 |
28 |
28 // FORWARD DECLARATIONS |
29 // FORWARD DECLARATIONS |
29 class CMMAEventSource; |
30 class CMMAEventSource; |
|
31 class CAccMonitorInfo; |
30 |
32 |
31 // CONSTANTS |
33 // CONSTANTS |
32 // Error code from MMF meaning that video is missing sound, |
34 // Error code from MMF meaning that video is missing sound, |
33 // but still can be played. |
35 // but still can be played. |
34 const TInt KNotCompleteVideoError = -12017; |
36 const TInt KNotCompleteVideoError = -12017; |
|
37 // Error blitting video to display |
|
38 const TInt KMMVideoBlitError = -12015; |
35 _LIT(KMMAVideoPlayer, "VideoPlayer"); |
39 _LIT(KMMAVideoPlayer, "VideoPlayer"); |
36 |
40 |
37 // CLASS DECLARATION |
41 // CLASS DECLARATION |
38 /** |
42 /** |
39 * This class is used for playing video. |
43 * This class is used for playing video. |
40 * |
44 * |
41 */ |
45 */ |
42 NONSHARABLE_CLASS(CMMAVideoPlayer): public CMMAAudioPlayer, |
46 NONSHARABLE_CLASS(CMMAVideoPlayer): public CMMAAudioPlayer, |
43 public MMMAGuiPlayer, |
47 public MMMAGuiPlayer, |
44 public MMMASnapshot |
48 public MMMASnapshot, |
|
49 public MAccMonitorObserver |
45 { |
50 { |
46 public: // Construction |
51 public: // Construction |
47 static CMMAVideoPlayer* NewLC( |
52 static CMMAVideoPlayer* NewLC( |
48 CMMAMMFResolver* aResolver); |
53 CMMAMMFResolver* aResolver); |
49 |
54 |
81 const TSize& aSize, |
86 const TSize& aSize, |
82 const CMMAImageSettings& aSettings); |
87 const CMMAImageSettings& aSettings); |
83 IMPORT_C CFbsBitmap* SnapshotBitmap(); |
88 IMPORT_C CFbsBitmap* SnapshotBitmap(); |
84 IMPORT_C HBufC8* SnapshotEncoded(); |
89 IMPORT_C HBufC8* SnapshotEncoded(); |
85 |
90 |
|
91 public: // from MAccMonitorObserver |
|
92 void ConnectedL(CAccMonitorInfo* aAccessoryInfo ); |
|
93 void DisconnectedL(CAccMonitorInfo* aAccessoryInfo); |
|
94 void AccMonitorObserverError( TInt aError ); |
|
95 |
86 protected: // New methods |
96 protected: // New methods |
87 void CompletePrefetch(TInt aError); |
97 void CompletePrefetch(TInt aError); |
88 void PrepareDisplay(); |
98 void PrepareDisplay(); |
89 void SourceSizeChanged(); |
99 void SourceSizeChanged(); |
90 |
100 |