videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideoaccessoryobserver_stub.cpp
branchRCL_3
changeset 12 7f2b2a65da29
parent 8 ce5ada96ab30
equal deleted inserted replaced
11:8970fbd719ec 12:7f2b2a65da29
    13 *
    13 *
    14 * Description:  This class is the stub for the accessory observer.
    14 * Description:  This class is the stub for the accessory observer.
    15  *
    15  *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 4 %
    18 // Version : %version: 5 %
    19 
    19 
    20 //
    20 //
    21 //  INCLUDE FILES
    21 //  INCLUDE FILES
    22 //
    22 //
    23 #include "stifutilities.h"
    23 #include "stifutilities.h"
    63 //
    63 //
    64 CMPXVideoAccessoryObserver::CMPXVideoAccessoryObserver( CMPXVideoPlaybackController* aController )
    64 CMPXVideoAccessoryObserver::CMPXVideoAccessoryObserver( CMPXVideoPlaybackController* aController )
    65     : iController( aController )
    65     : iController( aController )
    66     , iTvOutConnected( EFalse )
    66     , iTvOutConnected( EFalse )
    67     , iTvOutPlaybackAllowed( ETrue )
    67     , iTvOutPlaybackAllowed( ETrue )
    68     , iTvOutHDMI( EFalse )
       
    69 {
    68 {
    70 }
    69 }
    71 
    70 
    72 CMPXVideoAccessoryObserver::~CMPXVideoAccessoryObserver()
    71 CMPXVideoAccessoryObserver::~CMPXVideoAccessoryObserver()
    73 {
    72 {
   103     //  Check if the TV-Out status has changed
   102     //  Check if the TV-Out status has changed
   104     //
   103     //
   105     if ( iTvOutConnected != aTvOutConnected )
   104     if ( iTvOutConnected != aTvOutConnected )
   106     {
   105     {
   107         iTvOutConnected = aTvOutConnected;
   106         iTvOutConnected = aTvOutConnected;
   108  
       
   109         if ( iTvOutConnected && iTvOutHDMI)
       
   110         {
       
   111             //  if HDMI playback is always allowed
       
   112             iTvOutPlaybackAllowed = ETrue;
       
   113         }
       
   114 
   107 
   115         iController->HandleTvOutEventL( iTvOutConnected );
   108         iController->HandleTvOutEventL( iTvOutConnected );
   116     }
   109     }
   117 
   110 
   118     MPX_DEBUG(_L("    iTvOutConnected = %d"), iTvOutConnected);
   111     MPX_DEBUG(_L("    iTvOutConnected = %d"), iTvOutConnected);
   139     MPX_DEBUG(_L("CMPXVideoAccessoryObserver::IsTvOutPlaybackAllowed(%d)"), playAllowed);
   132     MPX_DEBUG(_L("CMPXVideoAccessoryObserver::IsTvOutPlaybackAllowed(%d)"), playAllowed);
   140 
   133 
   141     return playAllowed;
   134     return playAllowed;
   142 }
   135 }
   143 
   136 
   144 void CMPXVideoAccessoryObserver::SetTvOutHDMI( TBool aTvOutHDMI )
       
   145 {
       
   146     MPX_ENTER_EXIT(_L("CMPXVideoAccessoryObserver::SetTvOutHDMI()"),
       
   147                    _L("aTvOutHDMI = %d"), aTvOutHDMI);
       
   148 
       
   149     iTvOutHDMI = aTvOutHDMI;
       
   150 }
       
   151 
       
   152 //  End of File
   137 //  End of File