videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrol.cpp
branchRCL_3
changeset 57 befca0ec475f
child 70 375929f879c2
equal deleted inserted replaced
56:839377eedc2b 57:befca0ec475f
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Implementation of CMPXVideoPlaybackControl
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // Version : %version: 25 %
       
    20 
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <avkon.hrh>
       
    24 #include <e32std.h>
       
    25 #include <AknUtils.h>
       
    26 
       
    27 #include "mpxcommonvideoplaybackview.hrh"
       
    28 #include "mpxvideoplaybackcontrol.h"
       
    29 #include "mpxvideoplaybackvolumebar.h"
       
    30 #include "mpxvideoplaybackbuttonbar.h"
       
    31 #include "mpxvideoplaybackprogressbar.h"
       
    32 #include "mpxvideoplaybackcontrolscontroller.h"
       
    33 #include "mpxvideoplaybackviewfiledetails.h"
       
    34 #include "mpxvideoplaybackaspectratioicon.h"
       
    35 #include "mpxvideoplaybackbrandinganimation.h"
       
    36 #include "mpxvideoplaybackuserinputhandler.h"
       
    37 #include "mpxvideoplaybackcontainer.h"
       
    38 #include "mpxvideo_debug.h"
       
    39 
       
    40 #ifdef RD_TACTILE_FEEDBACK
       
    41 #include <touchfeedback.h>
       
    42 #endif //RD_TACTILE_FEEDBACK
       
    43 
       
    44 // ================= MEMBER FUNCTIONS ==============================================================
       
    45 
       
    46 // -------------------------------------------------------------------------------------------------
       
    47 // CMPXVideoPlaybackControl::CMPXVideoPlaybackControl()
       
    48 // C++ default constructor can NOT contain any code, that
       
    49 // might leave.
       
    50 // -------------------------------------------------------------------------------------------------
       
    51 //
       
    52 CMPXVideoPlaybackControl::CMPXVideoPlaybackControl(
       
    53         CMPXVideoPlaybackControlsController* aController,
       
    54         CCoeControl* aControl,
       
    55         TMPXVideoPlaybackControls aControlIndex,
       
    56         TUint aProperties )
       
    57     : iController( aController )
       
    58     , iControl( aControl )
       
    59     , iControlIndex( aControlIndex )
       
    60     , iProperties( aProperties )
       
    61 {
       
    62 }
       
    63 
       
    64 // -------------------------------------------------------------------------------------------------
       
    65 // CMPXVideoPlaybackControl::ConstructL()
       
    66 // Symbian 2nd phase constructor can leave.
       
    67 // -------------------------------------------------------------------------------------------------
       
    68 //
       
    69 void CMPXVideoPlaybackControl::ConstructL( TRect aRect )
       
    70 {
       
    71     MPX_DEBUG(_L("CMPXVideoPlaybackControl::ConstructL()"));
       
    72 
       
    73     CreateWindowL();
       
    74 
       
    75     Window().SetTransparencyAlphaChannel();
       
    76 
       
    77     EnableDragEvents();
       
    78 
       
    79     iEikonEnv->EikAppUi()->AddToStackL( this, ECoeStackPriorityDefault );
       
    80 
       
    81     SetRect( aRect );
       
    82 
       
    83     iControl->SetContainerWindowL( *this );
       
    84     iControl->SetRect( Rect() );
       
    85     SetComponentsToInheritVisibility( ETrue );
       
    86 
       
    87 #ifdef RD_TACTILE_FEEDBACK
       
    88     if ( iProperties & EMPXSoftkeyControl )
       
    89     {
       
    90         iFeedback = MTouchFeedback::Instance();
       
    91     }
       
    92 #endif //RD_TACTILE_FEEDBACK
       
    93 
       
    94     Window().SetNonFading( ETrue );
       
    95 
       
    96     ActivateL();
       
    97 }
       
    98 
       
    99 // -------------------------------------------------------------------------------------------------
       
   100 // CMPXVideoPlaybackControl::NewL()
       
   101 // Two-phased constructor.
       
   102 // -------------------------------------------------------------------------------------------------
       
   103 //
       
   104 CMPXVideoPlaybackControl* CMPXVideoPlaybackControl::NewL(
       
   105     CMPXVideoPlaybackControlsController* aController,
       
   106     CCoeControl* aControl,
       
   107     TRect aRect,
       
   108     TMPXVideoPlaybackControls aControlIndex,
       
   109     TUint aProperties )
       
   110 {
       
   111     MPX_DEBUG(_L("CMPXVideoPlaybackControl::NewL()"));
       
   112 
       
   113     CMPXVideoPlaybackControl* self =
       
   114         new (ELeave) CMPXVideoPlaybackControl( aController, aControl, aControlIndex, aProperties );
       
   115 
       
   116     CleanupStack::PushL(self);
       
   117     self->ConstructL( aRect );
       
   118     CleanupStack::Pop();
       
   119 
       
   120     return self;
       
   121 }
       
   122 
       
   123 // -------------------------------------------------------------------------------------------------
       
   124 // CMPXVideoPlaybackControl::~CMPXVideoPlaybackControlsController()
       
   125 // Destructor.
       
   126 // -------------------------------------------------------------------------------------------------
       
   127 //
       
   128 CMPXVideoPlaybackControl::~CMPXVideoPlaybackControl()
       
   129 {
       
   130     MPX_DEBUG(_L("CMPXVideoPlaybackControl::~CMPXVideoPlaybackControl()"));
       
   131 
       
   132     iEikonEnv->EikAppUi()->RemoveFromStack( this );
       
   133 
       
   134 #ifdef RD_TACTILE_FEEDBACK
       
   135     if ( iFeedback )
       
   136     {
       
   137        iFeedback->RemoveFeedbackForControl( this );
       
   138     }
       
   139 #endif //RD_TACTILE_FEEDBACK
       
   140 
       
   141     if ( iControl )
       
   142     {
       
   143         delete iControl;
       
   144         iControl = NULL;
       
   145     }
       
   146 
       
   147     CloseWindow();
       
   148 }
       
   149 
       
   150 // -------------------------------------------------------------------------------------------------
       
   151 // From CCoeControl
       
   152 // Gets the number of controls contained in a compound control.
       
   153 // -------------------------------------------------------------------------------------------------
       
   154 //
       
   155 TInt CMPXVideoPlaybackControl::CountComponentControls() const
       
   156 {
       
   157     return 1;
       
   158 }
       
   159 
       
   160 // -------------------------------------------------------------------------------------------------
       
   161 // From CCoeControl
       
   162 // Gets an indexed component of a compound control.
       
   163 // -------------------------------------------------------------------------------------------------
       
   164 //
       
   165 CCoeControl* CMPXVideoPlaybackControl::ComponentControl( TInt /*aIndex*/ ) const
       
   166 {
       
   167     return iControl;
       
   168 }
       
   169 
       
   170 // -------------------------------------------------------------------------------------------------
       
   171 // CMPXVideoPlaybackControl::Draw()
       
   172 // -------------------------------------------------------------------------------------------------
       
   173 //
       
   174 void CMPXVideoPlaybackControl::Draw( const TRect& aRect ) const
       
   175 {
       
   176     MPX_DEBUG(_L("CMPXVideoPlaybackControl::Draw()"));
       
   177 
       
   178     CWindowGc& gc = SystemGc();
       
   179     gc.SetClippingRect( aRect );
       
   180 
       
   181     if ( Window().DisplayMode() == EColor16MAP )
       
   182     {
       
   183         gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
       
   184         gc.SetBrushColor( TRgb::Color16MAP( 255 ) );
       
   185     }
       
   186     else if ( Window().DisplayMode() == EColor16MA )
       
   187     {
       
   188         gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
       
   189         gc.SetBrushColor( TRgb::Color16MA( 0 ) );
       
   190     }
       
   191 
       
   192     gc.Clear( aRect );
       
   193 }
       
   194 
       
   195 // -------------------------------------------------------------------------------------------------
       
   196 // CMPXVideoPlaybackControl::HandlePointerEventL()
       
   197 // -------------------------------------------------------------------------------------------------
       
   198 //
       
   199 void CMPXVideoPlaybackControl::HandlePointerEventL( const TPointerEvent& aPointerEvent )
       
   200 {
       
   201     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControl::HandlePointerEventL()"),
       
   202                    _L("iControlIndex = %d"), iControlIndex );
       
   203 
       
   204     iController->iContainer->UserInputHandler()->ProcessPointerEventL( this,
       
   205                                                                        aPointerEvent,
       
   206                                                                        EMpxVideoPlaybackControl );
       
   207 }
       
   208 
       
   209 // -------------------------------------------------------------------------------------------------
       
   210 // CMPXVideoPlaybackControl::DoHandlePointerEventL()
       
   211 // -------------------------------------------------------------------------------------------------
       
   212 //
       
   213 EXPORT_C void CMPXVideoPlaybackControl::DoHandlePointerEventL( const TPointerEvent& aPointerEvent)
       
   214 {
       
   215     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControl::DoHandlePointerEventL()"),
       
   216                    _L(" iControlIndex = %d, aPointerEvent.iType = %d"),
       
   217                    iControlIndex, aPointerEvent.iType );
       
   218 
       
   219     if ( AknLayoutUtils::PenEnabled() )
       
   220     {
       
   221         if ( aPointerEvent.iType == TPointerEvent::EButton1Down )
       
   222         {
       
   223             iController->ResetDisappearingTimers( EMPXTimerCancel );
       
   224 
       
   225             //
       
   226             //  Grab the pointer event for all controls so the events will not transfer to a
       
   227             //  different control as a dragging event occurs
       
   228             //
       
   229             SetPointerCapture( ETrue );
       
   230             ClaimPointerGrab( ETrue );
       
   231         }
       
   232         else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
       
   233         {
       
   234             iController->ResetDisappearingTimers( EMPXTimerReset );
       
   235 
       
   236             SetPointerCapture( EFalse );
       
   237             ClaimPointerGrab( EFalse );
       
   238         }
       
   239 
       
   240         switch( iControlIndex )
       
   241         {
       
   242             case EMPXProgressBar:
       
   243             case EMPXVolumeBar:
       
   244             case EMPXButtonBar:
       
   245             case EMPXAspectRatioIcon:
       
   246             case EMPXMediaDetailsViewer:
       
   247             {
       
   248                 //
       
   249                 // Pass an event to controller
       
   250                 //
       
   251                 iControl->HandlePointerEventL( aPointerEvent );
       
   252                 break;
       
   253             }
       
   254             case EMPXSoftkeyDetails:
       
   255             {
       
   256                 if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
       
   257                 {
       
   258 #ifdef RD_TACTILE_FEEDBACK
       
   259                     if ( iFeedback )
       
   260                     {
       
   261                         iFeedback->InstantFeedback( ETouchFeedbackBasic );
       
   262                     }
       
   263 #endif //RD_TACTILE_FEEDBACK
       
   264 
       
   265                     iController->HandleCommandL( EMPXPbvCmdShowFileDetails );
       
   266                 }
       
   267                 break;
       
   268             }
       
   269             case EMPXSoftkeyBack:
       
   270             {
       
   271                 if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
       
   272                 {
       
   273 #ifdef RD_TACTILE_FEEDBACK
       
   274                     if ( iFeedback )
       
   275                     {
       
   276                         iFeedback->InstantFeedback( ETouchFeedbackBasic );
       
   277                     }
       
   278 #endif //RD_TACTILE_FEEDBACK
       
   279 
       
   280                     iController->HandleCommandL( EAknSoftkeyBack );
       
   281                 }
       
   282                 break;
       
   283             }
       
   284             case EMPXNoVideoBitmap:
       
   285             case EMPXRealAudioBitmap:
       
   286             case EMPXSoundBitmap:
       
   287             case EMPXTitleLabel:
       
   288             case EMPXArtistLabel:
       
   289             case EMPXBrandingAnimation:
       
   290             default:
       
   291             {
       
   292                 //
       
   293                 //  Ignore pointer events for these controls
       
   294                 //
       
   295                 break;
       
   296             }
       
   297         }
       
   298     }
       
   299 }
       
   300 
       
   301 // -------------------------------------------------------------------------------------------------
       
   302 // CMPXVideoPlaybackControl::SetVisibility()
       
   303 // -------------------------------------------------------------------------------------------------
       
   304 //
       
   305 void CMPXVideoPlaybackControl::SetVisibility( TMPXPlaybackState aState )
       
   306 {
       
   307     TBool visible = EFalse;
       
   308 
       
   309     switch( aState )
       
   310     {
       
   311         case EPbStatePlaying:
       
   312         {
       
   313             if ( iProperties & EMPXShownWhenPlaying )
       
   314             {
       
   315                 visible = ETrue;
       
   316             }
       
   317             break;
       
   318         }
       
   319         case EPbStatePaused:
       
   320         {
       
   321             if ( iProperties & EMPXShownWhenPaused )
       
   322             {
       
   323                 visible = ETrue;
       
   324             }
       
   325             break;
       
   326         }
       
   327         case EPbStatePluginSeeking:
       
   328         {
       
   329             if ( iProperties & EMPXShownWhenSeeking )
       
   330             {
       
   331                 visible = ETrue;
       
   332             }
       
   333             break;
       
   334         }
       
   335         case EPbStateInitialised:
       
   336         case EPbStateBuffering:
       
   337         {
       
   338             if ( iProperties & EMPXBufferingControl )
       
   339             {
       
   340                 visible = ETrue;
       
   341             }
       
   342             break;
       
   343         }
       
   344         case EPbStateStopped:
       
   345         {
       
   346             if ( iProperties & EMPXShownWhenStopped )
       
   347             {
       
   348                 visible = ETrue;
       
   349             }
       
   350             break;
       
   351         }
       
   352         case EPbStateNotInitialised:
       
   353         case EPbStateInitialising:
       
   354         {
       
   355             if ( iProperties & EMPXShownWhenInitializing )
       
   356             {
       
   357                 visible = ETrue;
       
   358             }
       
   359             break;
       
   360         }
       
   361     }
       
   362 
       
   363     MPX_DEBUG(_L("CMPXVideoPlaybackControl::SetVisibility(%d)"), visible);
       
   364 
       
   365     MakeVisible( visible );
       
   366 }
       
   367 
       
   368 // -------------------------------------------------------------------------------------------------
       
   369 // CMPXVideoPlaybackControl::ControlIndex()
       
   370 // -------------------------------------------------------------------------------------------------
       
   371 //
       
   372 TMPXVideoPlaybackControls CMPXVideoPlaybackControl::ControlIndex()
       
   373 {
       
   374     return iControlIndex;
       
   375 }
       
   376 
       
   377 // -------------------------------------------------------------------------------------------------
       
   378 // CMPXVideoPlaybackControl::VolumeChanged()
       
   379 // -------------------------------------------------------------------------------------------------
       
   380 //
       
   381 TBool CMPXVideoPlaybackControl::VolumeChanged( TInt aVolume )
       
   382 {
       
   383     TBool changed = EFalse;
       
   384 
       
   385     if ( iControlIndex == EMPXVolumeBar )
       
   386     {
       
   387         MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::VolumeChanged() [%d]"), aVolume);
       
   388 
       
   389         static_cast<CMPXVideoPlaybackVolumeBar*>(iControl)->VolumeChanged( aVolume );
       
   390 
       
   391         changed = ETrue;
       
   392     }
       
   393 
       
   394     return changed;
       
   395 }
       
   396 
       
   397 // -------------------------------------------------------------------------------------------------
       
   398 // CMPXVideoPlaybackControl::DurationChangedL()
       
   399 // -------------------------------------------------------------------------------------------------
       
   400 //
       
   401 TBool CMPXVideoPlaybackControl::DurationChangedL( TInt aDuration )
       
   402 {
       
   403     TBool changed = EFalse;
       
   404 
       
   405     if ( iControlIndex == EMPXProgressBar )
       
   406     {
       
   407         MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::DurationChangedL() [%d]"), aDuration);
       
   408 
       
   409         static_cast<CMPXVideoPlaybackProgressBar*>(iControl)->DurationChangedL( aDuration );
       
   410 
       
   411         changed = ETrue;
       
   412     }
       
   413 
       
   414     return changed;
       
   415 }
       
   416 
       
   417 // -------------------------------------------------------------------------------------------------
       
   418 // CMPXVideoPlaybackControl::PositionChangedL()
       
   419 // -------------------------------------------------------------------------------------------------
       
   420 //
       
   421 TBool CMPXVideoPlaybackControl::PositionChangedL( TInt aPosition )
       
   422 {
       
   423     TBool changed = EFalse;
       
   424 
       
   425     if ( iControlIndex == EMPXProgressBar )
       
   426     {
       
   427         MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::PositionChangedL() [%d]"), aPosition);
       
   428 
       
   429         static_cast<CMPXVideoPlaybackProgressBar*>(iControl)->PositionChangedL( aPosition );
       
   430 
       
   431         changed = ETrue;
       
   432     }
       
   433 
       
   434     return changed;
       
   435 }
       
   436 
       
   437 // -------------------------------------------------------------------------------------------------
       
   438 // CMPXVideoPlaybackControl::AspectRatioChanged()
       
   439 // -------------------------------------------------------------------------------------------------
       
   440 //
       
   441 TBool CMPXVideoPlaybackControl::AspectRatioChanged( TInt aAspectRatio )
       
   442 {
       
   443     TBool changed = EFalse;
       
   444 
       
   445     if ( iControlIndex == EMPXAspectRatioIcon )
       
   446     {
       
   447         MPX_DEBUG(
       
   448             _L("CMPXVideoPlaybackControlsController::AspectRatioChanged() [%d]"), aAspectRatio);
       
   449 
       
   450         static_cast<CMPXVideoPlaybackAspectRatioIcon*>(iControl)->
       
   451             AspectRatioChanged( aAspectRatio );
       
   452 
       
   453         changed = ETrue;
       
   454     }
       
   455 
       
   456     return changed;
       
   457 }
       
   458 
       
   459 // -------------------------------------------------------------------------------------------------
       
   460 //   CMPXVideoPlaybackControl::SetDownloadSize()
       
   461 // -------------------------------------------------------------------------------------------------
       
   462 //
       
   463 TBool CMPXVideoPlaybackControl::SetDownloadSize( TInt aSize )
       
   464 {
       
   465     TBool changed = EFalse;
       
   466 
       
   467     if ( iControlIndex == EMPXProgressBar )
       
   468     {
       
   469         MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::SetDownloadSize() [%d]"), aSize);
       
   470 
       
   471         static_cast<CMPXVideoPlaybackProgressBar*>(iControl)->SetDownloadSize( aSize );
       
   472 
       
   473         changed = ETrue;
       
   474     }
       
   475 
       
   476     return changed;
       
   477 }
       
   478 
       
   479 // -------------------------------------------------------------------------------------------------
       
   480 //   CMPXVideoPlaybackControl::UpdateDownloadPosition()
       
   481 // -------------------------------------------------------------------------------------------------
       
   482 //
       
   483 TBool CMPXVideoPlaybackControl::UpdateDownloadPosition( TInt aSize )
       
   484 {
       
   485     TBool changed = EFalse;
       
   486 
       
   487     if ( iControlIndex == EMPXProgressBar )
       
   488     {
       
   489         MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::UpdateDownloadPosition() [%d]"), aSize);
       
   490 
       
   491         static_cast<CMPXVideoPlaybackProgressBar*>(iControl)->UpdateDownloadPosition( aSize );
       
   492 
       
   493         changed = ETrue;
       
   494     }
       
   495 
       
   496     return changed;
       
   497 }
       
   498 
       
   499 // -------------------------------------------------------------------------------------------------
       
   500 // CMPXVideoPlaybackControl::UpdateStateOnButtonBar()
       
   501 // -------------------------------------------------------------------------------------------------
       
   502 //
       
   503 TBool CMPXVideoPlaybackControl::UpdateStateOnButtonBar( TMPXPlaybackState aState )
       
   504 {
       
   505     TBool changed = EFalse;
       
   506 
       
   507     if ( iControlIndex == EMPXButtonBar )
       
   508     {
       
   509         MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::UpdateStateOnButtonBar() [%d]"), aState);
       
   510 
       
   511         static_cast<CMPXVideoPlaybackButtonBar*>(iControl)->UpdateStateOnButtonBar( aState );
       
   512 
       
   513         changed = ETrue;
       
   514     }
       
   515 
       
   516     return changed;
       
   517 }
       
   518 
       
   519 // -------------------------------------------------------------------------------------------------
       
   520 // CMPXVideoPlaybackControl::UpdateControlsWithFileDetailsL()
       
   521 // -------------------------------------------------------------------------------------------------
       
   522 //
       
   523 void CMPXVideoPlaybackControl::UpdateControlsWithFileDetailsL(
       
   524         CMPXVideoPlaybackViewFileDetails* aDetails )
       
   525 {
       
   526     iPlaybackMode = aDetails->iPlaybackMode;
       
   527 
       
   528     //
       
   529     //  Controls should be shown when if there is no video or the TV-Out is connected
       
   530     //
       
   531     if ( iControlIndex == EMPXButtonBar )
       
   532     {
       
   533         static_cast<CMPXVideoPlaybackButtonBar*>(iControl)->UpdateButtonBarState( aDetails );
       
   534     }
       
   535     else if ( iControlIndex == EMPXProgressBar )
       
   536     {
       
   537         static_cast<CMPXVideoPlaybackProgressBar*>(iControl)->UpdateProgressBarStateL( aDetails );
       
   538     }
       
   539 }
       
   540 
       
   541 // -------------------------------------------------------------------------------------------------
       
   542 // CMPXVideoPlaybackControl::StopBrandingAnimationTimer()
       
   543 // -------------------------------------------------------------------------------------------------
       
   544 //
       
   545 TBool CMPXVideoPlaybackControl::StopBrandingAnimationTimer()
       
   546 {
       
   547     TBool changed = EFalse;
       
   548 
       
   549     if ( iControlIndex == EMPXBrandingAnimation )
       
   550     {
       
   551         MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::StopBrandingAnimationTimer()"));
       
   552 
       
   553         static_cast<CMPXVideoPlaybackBrandingAnimation*>(iControl)->CancelBrandingTimer();
       
   554 
       
   555         changed = ETrue;
       
   556     }
       
   557 
       
   558     return changed;
       
   559 }
       
   560 
       
   561 // -------------------------------------------------------------------------------------------------
       
   562 // CMPXVideoPlaybackControl::UpdateTVOutStatusL()
       
   563 // -------------------------------------------------------------------------------------------------
       
   564 //
       
   565 TBool CMPXVideoPlaybackControl::UpdateTVOutStatusL( TBool aTvOutConnected)
       
   566 {
       
   567     TBool changed = EFalse;
       
   568 
       
   569     if ( iControlIndex == EMPXVolumeBar )
       
   570     {
       
   571         MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::UpdateTVOutStatus()"));
       
   572 
       
   573         static_cast<CMPXVideoPlaybackVolumeBar*>(iControl)->UpdateTVOutStatusL( aTvOutConnected );
       
   574 
       
   575         changed = ETrue;
       
   576     }
       
   577 
       
   578     return changed;
       
   579 }
       
   580 
       
   581 // -------------------------------------------------------------------------------------------------
       
   582 // CMPXVideoPlaybackControl::ResetControl()
       
   583 // -------------------------------------------------------------------------------------------------
       
   584 //
       
   585 void CMPXVideoPlaybackControl::ResetControl()
       
   586 {
       
   587     MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::ResetControl()"));
       
   588 
       
   589     SetPointerCapture( EFalse );
       
   590     ClaimPointerGrab( EFalse );
       
   591 
       
   592     switch( iControlIndex )
       
   593     {
       
   594         case EMPXButtonBar:
       
   595         {
       
   596             static_cast<CMPXVideoPlaybackButtonBar*>(iControl)->Reset();
       
   597             break;
       
   598         }
       
   599         case EMPXProgressBar:
       
   600         {
       
   601             static_cast<CMPXVideoPlaybackProgressBar*>(iControl)->Reset();
       
   602             break;
       
   603         }
       
   604         case EMPXVolumeBar:
       
   605         {
       
   606              static_cast<CMPXVideoPlaybackVolumeBar*>(iControl)->Reset();
       
   607              break;
       
   608         }
       
   609     }
       
   610 }
       
   611 
       
   612 // End of File