javauis/mmapi_akn/baseline/inc.nga/cmmavideoplayer.h
branchRCL_3
changeset 21 4376525cdefb
parent 14 04becd199f91
child 24 6c158198356e
equal deleted inserted replaced
19:71c436fe3ce0 21:4376525cdefb
    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 
   116     // owned
   126     // owned
   117     CFbsBitmap* iEmptySnapshotImage;
   127     CFbsBitmap* iEmptySnapshotImage;
   118 
   128 
   119     // owned
   129     // owned
   120     CActiveSchedulerWait* iActiveSchedulerWait;
   130     CActiveSchedulerWait* iActiveSchedulerWait;
       
   131 
       
   132     /**
       
   133      * owned
       
   134      * used for listening to audio/video cable connection status.
       
   135      */
       
   136     CAccMonitor *iAccMonitor;
       
   137     RAccMonCapabilityArray iAccMonCapabilityArray;
   121 };
   138 };
   122 
   139 
   123 #endif // CMMAVIDEOPLAYER_H
   140 #endif // CMMAVIDEOPLAYER_H