videoplayback/inc/mpxvideoplaybackdisplayhandler.h
branchRCL_3
changeset 54 315810614048
parent 16 7f2b2a65da29
equal deleted inserted replaced
53:2d690156cf8f 54:315810614048
    14 * Description:   Implementation of video playback display handler
    14 * Description:   Implementation of video playback display handler
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // Version : %version: 10 %
    19 // Version : %version: 12 %
    20 
    20 
    21 
    21 
    22 #ifndef __CMPXVIDEOPLAYBACKDISPLAYHANDLER_H__
    22 #ifndef __CMPXVIDEOPLAYBACKDISPLAYHANDLER_H__
    23 #define __CMPXVIDEOPLAYBACKDISPLAYHANDLER_H__
    23 #define __CMPXVIDEOPLAYBACKDISPLAYHANDLER_H__
    24 
    24 
    25 // INCLUDES
    25 // INCLUDES
    26 
    26 
    27 #include <mpxmessage2.h>
    27 #include <mpxmessage2.h>
    28 #include <MMFScalingCustomCommandConstants.h>
    28 #include <MMFScalingCustomCommandConstants.h>
    29 
       
    30 #ifdef SYMBIAN_BUILD_GCE
       
    31 #include <mediaclientvideodisplay.h>
    29 #include <mediaclientvideodisplay.h>
    32 #endif
       
    33 
       
    34 #include <mpxvideoplaybackdefs.h>
    30 #include <mpxvideoplaybackdefs.h>
    35 
    31 
    36 //
    32 //
    37 //  CLASS DECLARATION
    33 //  CLASS DECLARATION
    38 //
    34 //
    61         ~CMPXVideoPlaybackDisplayHandler();
    57         ~CMPXVideoPlaybackDisplayHandler();
    62 
    58 
    63         static CMPXVideoPlaybackDisplayHandler* NewL( MMPXPlaybackUtility* aPlayUtil,
    59         static CMPXVideoPlaybackDisplayHandler* NewL( MMPXPlaybackUtility* aPlayUtil,
    64                                                       CMPXVideoPlaybackContainer* aContainer );
    60                                                       CMPXVideoPlaybackContainer* aContainer );
    65 
    61 
    66         void CreateDisplayWindowL( CWsScreenDevice& aScreenDevice, RWindow& aWin );
    62         void CreateDisplayWindowL( CWsScreenDevice& aScreenDevice,
       
    63                                    RWindow& aWin,
       
    64                                    CMPXVideoPlaybackViewFileDetails* aFileDetails );
    67 
    65 
    68         void RemoveDisplayWindow();
    66         void RemoveDisplayWindow();
    69 
    67 
    70         void HandleVideoDisplayMessageL( CMPXMessage* aMessage );
    68         void HandleVideoDisplayMessageL( CMPXMessage* aMessage );
    71 
    69 
    72         TInt SetAspectRatioL( TMPXVideoPlaybackCommand aCmd );
    70         void SetAspectRatioL( TMPXVideoPlaybackCommand aCmd );
    73 
       
    74         TInt SetDefaultAspectRatioL( CMPXVideoPlaybackViewFileDetails* aFileDetails );
       
    75 
    71 
    76         void DoHandleRealOneBitmapTimeoutL();
    72         void DoHandleRealOneBitmapTimeoutL();
       
    73 
       
    74         TBool ShowAspectRatioIcon();
    77 
    75 
    78     private:
    76     private:
    79 
    77 
    80         CMPXVideoPlaybackDisplayHandler( MMPXPlaybackUtility* aPlayUtil,
    78         CMPXVideoPlaybackDisplayHandler( MMPXPlaybackUtility* aPlayUtil,
    81                                          CMPXVideoPlaybackContainer* aContainer );
    79                                          CMPXVideoPlaybackContainer* aContainer );
    84 
    82 
    85         void LoadAspectRatioL();
    83         void LoadAspectRatioL();
    86 
    84 
    87         void SaveAspectRatioL();
    85         void SaveAspectRatioL();
    88 
    86 
    89 
       
    90 #ifdef SYMBIAN_BUILD_GCE
       
    91 
       
    92     private:
       
    93         void AddDisplayWindowL( CWsScreenDevice& aScreenDevice,
    87         void AddDisplayWindowL( CWsScreenDevice& aScreenDevice,
    94                                 RWindowBase& aWindowBase,
    88                                 RWindowBase& aWindowBase,
    95                                 RWindow* aWin );
    89                                 RWindow* aWin );
    96 
    90 
    97         void SurfaceCreatedL( CMPXMessage* aMessage );
    91         void SurfaceCreatedL( CMPXMessage* aMessage );
    98         void SurfaceChangedL( CMPXMessage* aMessage );
    92         void SurfaceChangedL( CMPXMessage* aMessage );
    99         void SurfaceRemoved();
    93         void SurfaceRemoved();
   100         TInt SetNgaAspectRatioL( TMPXVideoPlaybackCommand aCmd );
       
   101 
    94 
   102         void SignalSurfaceRemovedL();
    95         void SignalSurfaceRemovedL();
   103 
    96 
   104 #endif
    97         void AttachNewSurfaceToWindowL();
       
    98 
       
    99         void CalculateAspectRatioL();
       
   100 
       
   101         TBool IsAspectRatioEqual( TReal aRatio1, TReal aRatio2 );
       
   102 
       
   103         TReal CalculateVideoAspectRatio();
       
   104 
       
   105         void RemoveSurfaceFromPlaybackPluginL();
   105 
   106 
   106     private:
   107     private:
   107         MMPXPlaybackUtility*                iPlaybackUtility;
   108         MMPXPlaybackUtility*                iPlaybackUtility;
   108         CMPXVideoPlaybackContainer*         iContainer;
   109         CMPXVideoPlaybackContainer*         iContainer;
   109 
   110 
   110         RArray<TMPXAspectRatio>             iAspectRatioArray;
   111         RArray<TMPXAspectRatio>             iAspectRatioArray;
   111         TInt                                iCurrentIndexForAspectRatio;
   112         TInt                                iCurrentIndexForAspectRatio;
   112         TReal                               iDisplayAspectRatio;
       
   113 
   113 
   114 #ifdef SYMBIAN_BUILD_GCE
       
   115         CMediaClientVideoDisplay*           iVideoDisplay;
   114         CMediaClientVideoDisplay*           iVideoDisplay;
   116 
   115 
   117         TBool                               iSurfaceCached;
   116         TBool                               iSurfaceCached;
   118         TSurfaceId                          iSurfaceId;
   117         TSurfaceId                          iSurfaceId;
   119         TRect                               iCropRect;
   118         TRect                               iCropRect;
   122         TReal32                             iScaleHeight;
   121         TReal32                             iScaleHeight;
   123         TInt                                iHorizontalPosition;
   122         TInt                                iHorizontalPosition;
   124         TInt                                iVerticalPosition;
   123         TInt                                iVerticalPosition;
   125         TVideoRotation                      iRotation;
   124         TVideoRotation                      iRotation;
   126         TAutoScaleType                      iAutoScale;
   125         TAutoScaleType                      iAutoScale;
   127 #endif
       
   128 
   126 
       
   127         TReal                               iDisplayAspectRatio;
       
   128         TInt                                iVideoHeight;
       
   129         TInt                                iVideoWidth;
   129 };
   130 };
   130 
   131 
   131 #endif // __CMPXVIDEOPLAYBACKDISPLAYHANDLER_H__
   132 #endif // __CMPXVIDEOPLAYBACKDISPLAYHANDLER_H__