videoplayback/videoplaybackview/tsrc/testmpxvideoviewwrapper/stub/src/videoplaybackdisplayhandler.cpp
changeset 66 adb51f74b890
parent 55 4bfa887905cf
equal deleted inserted replaced
63:4707a0db12f6 66:adb51f74b890
    13 *
    13 *
    14 * Description:   Implementation of video playback display handler
    14 * Description:   Implementation of video playback display handler
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version:  9 %
    18 // Version : %version:  11 %
    19 
    19 
    20 #include <sysutil.h>
    20 #include <sysutil.h>
    21 #include <s32file.h>
    21 #include <s32file.h>
    22 #include <mpxcommand.h>
    22 #include <mpxcommand.h>
    23 #include <mpxcommandgeneraldefs.h>
    23 #include <mpxcommandgeneraldefs.h>
    24 #include <mpxplaybackutility.h>
       
    25 #include <mpxvideoplaybackdefs.h>
    24 #include <mpxvideoplaybackdefs.h>
    26 
    25 
    27 #include "mpxvideoviewwrapper.h"
    26 #include "mpxvideoviewwrapper.h"
    28 #include "videoplaybackdisplayhandler.h"
    27 #include "videoplaybackdisplayhandler.h"
    29 #include "mpxvideoregion.h"
    28 #include "mpxvideoregion.h"
    30 #include "videoplaybackviewfiledetails.h"
    29 #include "videoplaybackviewfiledetails.h"
    31 
    30 
    32 
    31 
    33 CVideoPlaybackDisplayHandler::CVideoPlaybackDisplayHandler( MMPXPlaybackUtility* aPlayUtil,
    32 CVideoPlaybackDisplayHandler::CVideoPlaybackDisplayHandler( CMPXVideoViewWrapper* aViewWrapper )
    34                                                             CMPXVideoViewWrapper* aViewWrapper )
    33     : iViewWrapper( aViewWrapper )
    35     : iPlaybackUtility( aPlayUtil )
       
    36     , iViewWrapper( aViewWrapper )
       
    37 {
    34 {
    38 }
    35 }
    39 
    36 
    40 CVideoPlaybackDisplayHandler::~CVideoPlaybackDisplayHandler()
    37 CVideoPlaybackDisplayHandler::~CVideoPlaybackDisplayHandler()
    41 {
    38 {
    42 }
    39 }
    43 
    40 
    44 CVideoPlaybackDisplayHandler*
    41 CVideoPlaybackDisplayHandler*
    45 CVideoPlaybackDisplayHandler::NewL( MMPXPlaybackUtility* aPlayUtil,
    42 CVideoPlaybackDisplayHandler::NewL( CMPXVideoViewWrapper* aViewWrapper )
    46                                     CMPXVideoViewWrapper* aViewWrapper )
       
    47 {
    43 {
    48     MPX_ENTER_EXIT(_L("CVideoPlaybackDisplayHandler::NewL()"));
    44     MPX_ENTER_EXIT(_L("CVideoPlaybackDisplayHandler::NewL()"));
    49 
    45 
    50     CVideoPlaybackDisplayHandler* self =
    46     CVideoPlaybackDisplayHandler* self =
    51         new(ELeave) CVideoPlaybackDisplayHandler( aPlayUtil, aViewWrapper );
    47         new(ELeave) CVideoPlaybackDisplayHandler( aViewWrapper );
    52 
    48 
    53     CleanupStack::PushL( self );
    49     CleanupStack::PushL( self );
    54     self->ConstructL();
    50     self->ConstructL();
    55     CleanupStack::Pop();
    51     CleanupStack::Pop();
    56     return self;
    52     return self;
    70 //
    66 //
    71 void CVideoPlaybackDisplayHandler::CreateDisplayWindowL(
    67 void CVideoPlaybackDisplayHandler::CreateDisplayWindowL(
    72                                           RWsSession& aWs,
    68                                           RWsSession& aWs,
    73                                           CWsScreenDevice& aScreenDevice,
    69                                           CWsScreenDevice& aScreenDevice,
    74                                           RWindow& aWin,
    70                                           RWindow& aWin,
    75                                           TRect aDisplayRect )
    71                                           TRect aDisplayRect,
       
    72                                           VideoPlaybackViewFileDetails* fileDetails )
    76 {
    73 {
    77     Q_UNUSED( aWs );
    74     Q_UNUSED( aWs );
    78     Q_UNUSED( aScreenDevice );
    75     Q_UNUSED( aScreenDevice );
    79     Q_UNUSED( aWin );
    76     Q_UNUSED( aWin );
    80     Q_UNUSED( aDisplayRect );
    77     Q_UNUSED( aDisplayRect );
       
    78     Q_UNUSED( fileDetails );
    81 }
    79 }
    82 
    80 
    83 // -------------------------------------------------------------------------------------------------
    81 // -------------------------------------------------------------------------------------------------
    84 //   CVideoPlaybackDisplayHandler::RemoveDisplayWindow()
    82 //   CVideoPlaybackDisplayHandler::RemoveDisplayWindow()
    85 // -------------------------------------------------------------------------------------------------
    83 // -------------------------------------------------------------------------------------------------
   106 // -------------------------------------------------------------------------------------------------
   104 // -------------------------------------------------------------------------------------------------
   107 //
   105 //
   108 TInt CVideoPlaybackDisplayHandler::SetAspectRatioL( TMPXVideoPlaybackCommand aCmd )
   106 TInt CVideoPlaybackDisplayHandler::SetAspectRatioL( TMPXVideoPlaybackCommand aCmd )
   109 {
   107 {
   110     iCommand = aCmd;
   108     iCommand = aCmd;
   111     
   109 
   112     switch ( aCmd )
   110     switch ( aCmd )
   113     {
   111     {
   114         case EPbCmdNaturalAspectRatio:
   112         case EPbCmdNaturalAspectRatio:
   115         {
   113         {
   116             iAspectRatio = EMMFNatural;
   114             iAspectRatio = EMMFNatural;
   130 
   128 
   131     return iAspectRatio;
   129     return iAspectRatio;
   132 }
   130 }
   133 
   131 
   134 // -------------------------------------------------------------------------------------------------
   132 // -------------------------------------------------------------------------------------------------
   135 //   CVideoPlaybackDisplayHandler::SetDefaultAspectRatioL
       
   136 // -------------------------------------------------------------------------------------------------
       
   137 //
       
   138 TInt CVideoPlaybackDisplayHandler::SetDefaultAspectRatioL(
       
   139                                           VideoPlaybackViewFileDetails* aFileDetails,
       
   140                                           TReal32 aDisplayAspectRatio )
       
   141 {
       
   142     Q_UNUSED( aFileDetails );
       
   143     Q_UNUSED( aDisplayAspectRatio );
       
   144 
       
   145     return iAspectRatio;
       
   146 }
       
   147 
       
   148 // -------------------------------------------------------------------------------------------------
       
   149 //   CVideoPlaybackDisplayHandler::UpdateVideoRectL()
   133 //   CVideoPlaybackDisplayHandler::UpdateVideoRectL()
   150 // -------------------------------------------------------------------------------------------------
   134 // -------------------------------------------------------------------------------------------------
   151 //
   135 //
   152 void CVideoPlaybackDisplayHandler::UpdateVideoRectL( TRect aClipRect, TBool transitionEffect  )
   136 void CVideoPlaybackDisplayHandler::UpdateVideoRectL( TRect aClipRect, TBool transitionEffect  )
   153 {
   137 {