mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/src/musengvideoplayerbase.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "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 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 // USER
       
    19 #include "musenglocalvideoplayer.h"
       
    20 #include "musengcamerahandler.h"
       
    21 #include "musengdisplayhandler.h"
       
    22 
       
    23 // SYSTEM
       
    24 #include <e32base.h>
       
    25 
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 //
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 CMusEngVideoPlayerBase::CMusEngVideoPlayerBase( 
       
    32     MMusEngDisplayHandler& aDisplayHandler,
       
    33     MLcAudioControl& aLcAudioControl ) :
       
    34     iDisplayHandler( aDisplayHandler ),
       
    35     iLcAudioControl( aLcAudioControl )
       
    36     {
       
    37     }
       
    38 
       
    39 
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 CMusEngVideoPlayerBase::~CMusEngVideoPlayerBase()
       
    45     {
       
    46     }
       
    47 
       
    48 // -----------------------------------------------------------------------------
       
    49 // From MLcVideoPlayer
       
    50 // -----------------------------------------------------------------------------
       
    51 //
       
    52 void CMusEngVideoPlayerBase::LcPlayL(MLcVideoPlayer::TLcVideoPlayerSource /*aSource*/)
       
    53     {
       
    54     // NOP
       
    55     }
       
    56 
       
    57 // -----------------------------------------------------------------------------
       
    58 // From MLcVideoPlayer
       
    59 // -----------------------------------------------------------------------------
       
    60 //
       
    61 void CMusEngVideoPlayerBase::LcPauseL()
       
    62     {
       
    63     // NOP
       
    64     }
       
    65 
       
    66 // -----------------------------------------------------------------------------
       
    67 // From MLcVideoPlayer
       
    68 // -----------------------------------------------------------------------------
       
    69 //
       
    70 MLcWindow* CMusEngVideoPlayerBase::LcWindow()
       
    71     {
       
    72     return this;
       
    73     }
       
    74 
       
    75 // -----------------------------------------------------------------------------
       
    76 // From MLcVideoPlayer
       
    77 // -----------------------------------------------------------------------------
       
    78 //
       
    79 MLcCameraControl* CMusEngVideoPlayerBase::LcCameraControl()
       
    80     {
       
    81     return NULL;
       
    82     }
       
    83 
       
    84 // -----------------------------------------------------------------------------
       
    85 // From MLcVideoPlayer
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 MLcSourceFileControl* CMusEngVideoPlayerBase::LcSourceFileControl()
       
    89     {
       
    90     return NULL;
       
    91     }
       
    92 
       
    93 // -----------------------------------------------------------------------------
       
    94 // From MLcVideoPlayer
       
    95 // -----------------------------------------------------------------------------
       
    96 //
       
    97 MLcDestinationFileControl* CMusEngVideoPlayerBase::LcDestinationFileControl()
       
    98     {
       
    99     return NULL;
       
   100     }
       
   101 
       
   102 // -----------------------------------------------------------------------------
       
   103 // From MLcVideoPlayer
       
   104 // -----------------------------------------------------------------------------
       
   105 //
       
   106 MLcAudioControl* CMusEngVideoPlayerBase::LcAudioControl()
       
   107     {
       
   108     return &iLcAudioControl;
       
   109     }
       
   110 
       
   111 // -----------------------------------------------------------------------------
       
   112 // From MLcVideoPlayer
       
   113 // -----------------------------------------------------------------------------
       
   114 //
       
   115 MLcZoomControl* CMusEngVideoPlayerBase::LcZoomControl()
       
   116     {
       
   117     return NULL;
       
   118     }
       
   119 
       
   120 // -----------------------------------------------------------------------------
       
   121 // From MLcVideoPlayer
       
   122 // -----------------------------------------------------------------------------
       
   123 //
       
   124 MLcBrightnessControl* CMusEngVideoPlayerBase::LcBrightnessControl()
       
   125     {
       
   126     return NULL;
       
   127     }
       
   128 
       
   129 // -----------------------------------------------------------------------------
       
   130 // From MLcWindow
       
   131 // -----------------------------------------------------------------------------
       
   132 //
       
   133 void CMusEngVideoPlayerBase::EnableLcWindowL( TBool aEnable )
       
   134     {
       
   135     iDisplayHandler.EnableDisplayL( aEnable );
       
   136     }
       
   137 
       
   138 // -----------------------------------------------------------------------------
       
   139 // From MLcWindow
       
   140 // -----------------------------------------------------------------------------
       
   141 //
       
   142 TBool CMusEngVideoPlayerBase::IsLcWindowEnabled()
       
   143     {
       
   144     return iDisplayHandler.IsDisplayEnabled();
       
   145     }
       
   146 
       
   147 // -----------------------------------------------------------------------------
       
   148 // From MLcWindow
       
   149 // -----------------------------------------------------------------------------
       
   150 //
       
   151 void CMusEngVideoPlayerBase::SetLcWindowRectL( TRect aRect )
       
   152     {
       
   153     iDisplayHandler.SetRectL( aRect );
       
   154     }
       
   155 
       
   156 
       
   157 // -----------------------------------------------------------------------------
       
   158 // From MLcWindow
       
   159 // -----------------------------------------------------------------------------
       
   160 //
       
   161 TRect CMusEngVideoPlayerBase::LcWindowRect()
       
   162     {
       
   163     return iDisplayHandler.Rect();
       
   164     }
       
   165 
       
   166 // -----------------------------------------------------------------------------
       
   167 // From MLcWindow
       
   168 // -----------------------------------------------------------------------------
       
   169 //
       
   170 void CMusEngVideoPlayerBase::SetLcWindowOrientationL( 
       
   171     TLcWindowOrientation aOrientation )
       
   172     {
       
   173     if ( aOrientation == MLcWindow::ELandscape )
       
   174         {
       
   175         iDisplayHandler.SetOrientationL( MMusEngDisplayHandler::ELandscape );
       
   176         }
       
   177     else 
       
   178         {
       
   179         iDisplayHandler.SetOrientationL( MMusEngDisplayHandler::EPortrait );
       
   180         }
       
   181     }
       
   182 
       
   183 // -----------------------------------------------------------------------------
       
   184 // From MLcWindow
       
   185 // -----------------------------------------------------------------------------
       
   186 //
       
   187 MLcWindow::TLcWindowOrientation CMusEngVideoPlayerBase::LcWindowOrientationL()
       
   188     {
       
   189     MLcWindow::TLcWindowOrientation orientation;
       
   190     if ( iDisplayHandler.OrientationL() == MMusEngDisplayHandler::ELandscape )
       
   191         {
       
   192         orientation = MLcWindow::ELandscape;
       
   193         }
       
   194     else
       
   195         {
       
   196         orientation = MLcWindow::EPortrait;
       
   197         }
       
   198     return orientation;
       
   199     }