videoplayback/videoplaybackview/controlsrc/videoplaybackcontrolscontroller.cpp
changeset 63 4707a0db12f6
parent 58 d2b028fd1f7d
child 66 adb51f74b890
equal deleted inserted replaced
58:d2b028fd1f7d 63:4707a0db12f6
    13 *
    13 *
    14 * Description:  Implementation of VideoPlaybackControlsController
    14 * Description:  Implementation of VideoPlaybackControlsController
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: da1mmcf#51 %
    18 // Version : %version: da1mmcf#54 %
    19 
    19 
    20 
    20 
    21 
    21 
    22 // INCLUDE FILES
    22 // INCLUDE FILES
    23 #include <coecntrl.h>
    23 #include <coecntrl.h>
    25 #include <barsread.h>
    25 #include <barsread.h>
    26 #include <f32file.h>
    26 #include <f32file.h>
    27 
    27 
    28 #include <QTimer>
    28 #include <QTimer>
    29 #include <thumbnailmanager_qt.h>
    29 #include <thumbnailmanager_qt.h>
    30 #include <xqserviceutil.h>
       
    31 
    30 
    32 #include <hblabel.h>
    31 #include <hblabel.h>
    33 #include <hbvolumesliderpopup.h>
    32 #include <hbvolumesliderpopup.h>
    34 #include <hbtransparentwindow.h>
    33 #include <hbtransparentwindow.h>
    35 #include <hbiconanimationmanager.h>
    34 #include <hbiconanimationmanager.h>
    75     , mThumbnailManager( NULL )
    74     , mThumbnailManager( NULL )
    76     , mVideoServices( 0 )
    75     , mVideoServices( 0 )
    77     , mViewTransitionIsGoingOn( false )
    76     , mViewTransitionIsGoingOn( false )
    78     , mIsAttachOperation( false )
    77     , mIsAttachOperation( false )
    79     , mFileDetailsAdded( false )
    78     , mFileDetailsAdded( false )
       
    79     , mShowControlsWhenInHorizontal( false )
    80     , mThumbNailState( EThumbNailEmpty )
    80     , mThumbNailState( EThumbNailEmpty )
    81     , mState( EPbStateNotInitialised )
    81     , mState( EPbStateNotInitialised )
    82     , mViewMode( EFullScreenView )
    82     , mViewMode( EFullScreenView )
       
    83     , mShareUi( NULL )
    83 {
    84 {
    84     MPX_ENTER_EXIT(_L("VideoPlaybackControlsController::VideoPlaybackControlsController()"));
    85     MPX_ENTER_EXIT(_L("VideoPlaybackControlsController::VideoPlaybackControlsController()"));
    85 
    86 
    86     initializeController();
    87     initializeController();
    87 }
    88 }
   162     connect( mView, SIGNAL( tappedOnScreen() ), this, SLOT( handleTappedOnScreen() ) );
   163     connect( mView, SIGNAL( tappedOnScreen() ), this, SLOT( handleTappedOnScreen() ) );
   163 
   164 
   164     //
   165     //
   165     // if videoplayback is in service mode, create a videoservices instance
   166     // if videoplayback is in service mode, create a videoservices instance
   166     //
   167     //
   167     if ( XQServiceUtil::isService() && ! mVideoServices )
   168     if ( isService() && ! mVideoServices )
   168     {
   169     {
   169         //
   170         //
   170         // obtain VideoServices instance
   171         // obtain VideoServices instance
   171         //
   172         //
   172         mVideoServices = VideoServices::instance();
   173         mVideoServices = VideoServices::instance();
   280         // decrease videoservices instance count
   281         // decrease videoservices instance count
   281         //
   282         //
   282     	mVideoServices->decreaseReferenceCount();
   283     	mVideoServices->decreaseReferenceCount();
   283     	mVideoServices = 0;
   284     	mVideoServices = 0;
   284     }
   285     }
       
   286     
       
   287     if( mShareUi )
       
   288     {
       
   289         delete mShareUi;
       
   290         mShareUi = NULL;
       
   291     }
   285 }
   292 }
   286 
   293 
   287 // -------------------------------------------------------------------------------------------------
   294 // -------------------------------------------------------------------------------------------------
   288 // VideoPlaybackControlsController::addFileDetails()
   295 // VideoPlaybackControlsController::addFileDetails()
   289 // -------------------------------------------------------------------------------------------------
   296 // -------------------------------------------------------------------------------------------------
   299 
   306 
   300     mFileDetails->mRNFormat = realFormat( mFileDetails->mClipName );
   307     mFileDetails->mRNFormat = realFormat( mFileDetails->mClipName );
   301 
   308 
   302     mControlsConfig->updateControlsWithFileDetails();
   309     mControlsConfig->updateControlsWithFileDetails();
   303 
   310 
   304     //
   311     evaluateAndChangeViewMode();
   305     // for audio-only clips and tv-out, default view is flip view
       
   306     //
       
   307     if ( ! details->mVideoEnabled )
       
   308     {
       
   309         changeViewMode( EAudioOnlyView, false );
       
   310     }
       
   311 
       
   312     if ( details->mTvOutConnected )
       
   313     {
       
   314         handleEvent( EControlCmdTvOutConnected );
       
   315     }
       
   316 
   312 
   317     //
   313     //
   318     // Dimmed the volume control if it is video only
   314     // Dimmed the volume control if it is video only
   319     //
   315     //
   320     if ( ! mFileDetails->mAudioEnabled )
   316     if ( ! mFileDetails->mAudioEnabled )
   409         }
   405         }
   410         case EControlCmdTvOutConnected:
   406         case EControlCmdTvOutConnected:
   411         {
   407         {
   412             MPX_DEBUG(_L("    [EControlCmdTvOutConnected]"));
   408             MPX_DEBUG(_L("    [EControlCmdTvOutConnected]"));
   413 
   409 
   414             handleTvOutEvent( true, event );
   410             mFileDetails->mTvOutConnected = true;
       
   411             evaluateAndChangeViewMode();
       
   412 
   415             break;
   413             break;
   416         }
   414         }
   417         case EControlCmdTvOutDisconnected:
   415         case EControlCmdTvOutDisconnected:
   418         {
   416         {
   419             MPX_DEBUG(_L("    [EControlCmdTvOutDisConnected]"));
   417             MPX_DEBUG(_L("    [EControlCmdTvOutDisConnected]"));
   420 
   418 
   421             handleTvOutEvent( false, event );
   419             mFileDetails->mTvOutConnected = false;
       
   420             evaluateAndChangeViewMode();
       
   421 
   422             break;
   422             break;
   423         }
   423         }
   424         case EControlCmdHandleErrors:
   424         case EControlCmdHandleErrors:
   425         {
   425         {
   426             MPX_DEBUG(_L("    [EControlCmdHandleErrors]"));
   426             MPX_DEBUG(_L("    [EControlCmdHandleErrors]"));
   463         mState = newState;
   463         mState = newState;
   464 
   464 
   465         switch ( newState )
   465         switch ( newState )
   466         {
   466         {
   467             case EPbStatePlaying:
   467             case EPbStatePlaying:
       
   468             {
       
   469                 if ( mViewMode == EFullScreenView )
       
   470                 {
       
   471                     hideAllControls();
       
   472                 }
       
   473                 else
       
   474                 {
       
   475                     showControls();
       
   476                 }
       
   477 
       
   478                 updateState();
       
   479 
       
   480                 break;
       
   481             }
       
   482             case EPbStateBuffering:
       
   483             {
       
   484                 if ( mFileDetails->mPlaybackMode != EMPXVideoLocal )
       
   485                 {
       
   486                     showControls();
       
   487                 }
       
   488 
       
   489                 updateState();
       
   490 
       
   491                 break;
       
   492             }
       
   493             case EPbStatePaused:
   468             case EPbStateInitialising:
   494             case EPbStateInitialising:
   469             case EPbStateBuffering:
       
   470             case EPbStatePaused:
       
   471             case EPbStateNotInitialised:
   495             case EPbStateNotInitialised:
   472             case EPbStatePluginSeeking:
   496             case EPbStatePluginSeeking:
   473             {
   497             {
   474                 //
   498                 //
   475                 //  Show all the controls
   499                 //  Show all the controls
   592             MPX_DEBUG(_L("    EBufferingAnimation add animation definition ok = %d"), ok);
   616             MPX_DEBUG(_L("    EBufferingAnimation add animation definition ok = %d"), ok);
   593 
   617 
   594             //
   618             //
   595             // Buffering animation icon
   619             // Buffering animation icon
   596             //
   620             //
       
   621             mLoader->load( KPLAYBACKVIEW_DOCML, "BufferingAnimation", &ok );
       
   622             MPX_DEBUG(_L("    EBufferingAnimation load BufferingAnimation ok = %d"), ok);
       
   623 
   597             QGraphicsWidget *widget = mLoader->findWidget( QString( "bufferingIcon" ) );
   624             QGraphicsWidget *widget = mLoader->findWidget( QString( "bufferingIcon" ) );
       
   625 
   598             HbLabel *bufferingAnim = qobject_cast<HbLabel*>( widget );
   626             HbLabel *bufferingAnim = qobject_cast<HbLabel*>( widget );
   599 
   627 
   600             control = new VideoPlaybackFullScreenControl( this,
   628             control = new VideoPlaybackFullScreenControl( this,
   601                                                               controlIndex,
   629                                                           controlIndex,
   602                                                               bufferingAnim,
   630                                                           bufferingAnim,
   603                                                               properties );
   631                                                           properties );
   604             mControls.append( control );
   632             mControls.append( control );
   605 
   633 
   606             break;
   634             break;
   607         }
   635         }
   608         case EStatusPane:
   636         case EStatusPane:
   609         {
   637         {
   610             //
   638             //
   611             // Status key (signal + title + back key)
   639             // Status key (signal + title + back key)
   612             //
   640             //
   613             control = new VideoPlaybackStatusPaneControl( this,
   641             control = new VideoPlaybackStatusPaneControl( this,
   614                                                               controlIndex,
   642                                                           controlIndex,
   615                                                               NULL,
   643                                                           NULL,
   616                                                               properties );
   644                                                           properties );
   617             mControls.append( control );
   645             mControls.append( control );
   618 
   646 
   619             break;
   647             break;
   620         }
   648         }
   621         case EControlBar:
   649         case EControlBar:
   627             VideoPlaybackControlBar *controlBar =
   655             VideoPlaybackControlBar *controlBar =
   628                 qobject_cast<VideoPlaybackControlBar*>( widget );
   656                 qobject_cast<VideoPlaybackControlBar*>( widget );
   629             controlBar->initialize();
   657             controlBar->initialize();
   630 
   658 
   631             control = new VideoPlaybackFullScreenControl( this,
   659             control = new VideoPlaybackFullScreenControl( this,
   632                                                               controlIndex,
   660                                                           controlIndex,
   633                                                               controlBar,
   661                                                           controlBar,
   634                                                               properties );
   662                                                           properties );
   635             mControls.append( control );
   663             mControls.append( control );
   636 
   664 
   637             break;
   665             break;
   638         }
   666         }
   639         case EFileDetailsWidget:
   667         case EFileDetailsWidget:
   641             QGraphicsWidget *widget = mLoader->findWidget( QString( "fileDetailsLayout" ) );
   669             QGraphicsWidget *widget = mLoader->findWidget( QString( "fileDetailsLayout" ) );
   642             VideoPlaybackFileDetailsWidget *fileDetails =
   670             VideoPlaybackFileDetailsWidget *fileDetails =
   643                 qobject_cast<VideoPlaybackFileDetailsWidget*>( widget );
   671                 qobject_cast<VideoPlaybackFileDetailsWidget*>( widget );
   644 
   672 
   645             control = new VideoPlaybackFullScreenControl( this,
   673             control = new VideoPlaybackFullScreenControl( this,
   646                                                               controlIndex,
   674                                                           controlIndex,
   647                                                               fileDetails,
   675                                                           fileDetails,
   648                                                               properties );
   676                                                           properties );
   649 
   677 
   650             mControls.append( control );
   678             mControls.append( control );
   651             break;
   679             break;
   652         }
   680         }
   653         case EIndicatorBitmap:
   681         case EIndicatorBitmap:
   654         {
   682         {
       
   683             bool ok = true;
       
   684 
   655             QGraphicsWidget *widget = mLoader->findWidget( QString( "bitmapLayout" ) );
   685             QGraphicsWidget *widget = mLoader->findWidget( QString( "bitmapLayout" ) );
       
   686 
       
   687             if ( widget == NULL )
       
   688             {
       
   689                 mLoader->load( KPLAYBACKVIEW_DOCML, "IndicatorBitmaps", &ok );
       
   690                 widget = mLoader->findWidget( QString( "bitmapLayout" ) );
       
   691 
       
   692                 MPX_DEBUG(_L("    EIndicatorBitmap load IndicatorBitmaps ok = %d"), ok);
       
   693             }
       
   694 
       
   695             widget = mLoader->findWidget( QString( "bitmapLayout" ) );
       
   696 
   656             HbWidget *bitmapWidget = qobject_cast<HbWidget*>( widget );
   697             HbWidget *bitmapWidget = qobject_cast<HbWidget*>( widget );
   657 
   698 
   658             setDefaultBitmap();
   699             setDefaultBitmap();
       
   700 
   659             control = new VideoPlaybackFullScreenControl( this,
   701             control = new VideoPlaybackFullScreenControl( this,
   660                                                               controlIndex,
   702                                                           controlIndex,
   661                                                               bitmapWidget,
   703                                                           bitmapWidget,
   662                                                               properties );
   704                                                           properties );
   663             mControls.append( control );
   705             mControls.append( control );
   664 
   706 
   665             break;
   707             break;
   666         }
   708         }
   667         case ERealLogoBitmap:
   709         case ERealLogoBitmap:
   668         {
   710         {
       
   711             bool ok = false;
       
   712 
       
   713             mLoader->load( KPLAYBACKVIEW_DOCML, "RNBitmap", &ok );
       
   714             MPX_DEBUG(_L("    ERealLogoBitmap load RNBitmap ok = %d"), ok);
       
   715 
   669             QGraphicsWidget *widget = mLoader->findWidget( QString( "rnLogoBitmap" ) );
   716             QGraphicsWidget *widget = mLoader->findWidget( QString( "rnLogoBitmap" ) );
       
   717 
   670             HbWidget *bitmapWidget = qobject_cast<HbWidget*>( widget );
   718             HbWidget *bitmapWidget = qobject_cast<HbWidget*>( widget );
   671 
   719 
   672             control = new VideoPlaybackFullScreenControl( this,
   720             control = new VideoPlaybackFullScreenControl( this,
   673                                                               controlIndex,
   721                                                           controlIndex,
   674                                                               bitmapWidget,
   722                                                           bitmapWidget,
   675                                                               properties );
   723                                                           properties );
   676             mControls.append( control );
   724             mControls.append( control );
   677 
   725 
   678             connect( bitmapWidget, SIGNAL( visibleChanged() ),
   726             connect( bitmapWidget, SIGNAL( visibleChanged() ),
   679                      this, SLOT( handleRNLogoVisibleChanged() ) );
   727                      this, SLOT( handleRNLogoVisibleChanged() ) );
   680 
   728 
   686             VideoPlaybackDetailsPlaybackWindow *detailsPlaybackWindow =
   734             VideoPlaybackDetailsPlaybackWindow *detailsPlaybackWindow =
   687                     qobject_cast<VideoPlaybackDetailsPlaybackWindow*>( widget );
   735                     qobject_cast<VideoPlaybackDetailsPlaybackWindow*>( widget );
   688             detailsPlaybackWindow->initialize();
   736             detailsPlaybackWindow->initialize();
   689 
   737 
   690             control = new VideoPlaybackFullScreenControl( this,
   738             control = new VideoPlaybackFullScreenControl( this,
   691                                                               controlIndex,
   739                                                           controlIndex,
   692                                                               detailsPlaybackWindow,
   740                                                           detailsPlaybackWindow,
   693                                                               properties );
   741                                                           properties );
   694             mControls.append( control );
   742             mControls.append( control );
   695 
   743 
   696             break;
   744             break;
   697         }
   745         }
   698     }
   746     }
   803 {
   851 {
   804     MPX_DEBUG(_L("VideoPlaybackControlsController::showControls()"));
   852     MPX_DEBUG(_L("VideoPlaybackControlsController::showControls()"));
   805 
   853 
   806     resetDisappearingTimers( ETimerReset );
   854     resetDisappearingTimers( ETimerReset );
   807 
   855 
   808     if ( ! mViewTransitionIsGoingOn && mOrientation == Qt::Horizontal )
   856     if ( ! mViewTransitionIsGoingOn )
   809     {
   857     {
   810         for ( int i = 0 ; i < mControls.count() ; i++ )
   858         if ( mOrientation == Qt::Horizontal )
   811         {
   859         {
   812             mControls[i]->setVisibility( mState );
   860             for ( int i = 0 ; i < mControls.count() ; i++ )
       
   861             {
       
   862                 mControls[i]->setVisibility( mState );
       
   863             }
       
   864         }
       
   865         else
       
   866         {
       
   867             mShowControlsWhenInHorizontal = true;
   813         }
   868         }
   814     }
   869     }
   815 }
   870 }
   816 
   871 
   817 // -------------------------------------------------------------------------------------------------
   872 // -------------------------------------------------------------------------------------------------
  1159 
  1214 
  1160     return visible;
  1215     return visible;
  1161 }
  1216 }
  1162 
  1217 
  1163 // -------------------------------------------------------------------------------------------------
  1218 // -------------------------------------------------------------------------------------------------
  1164 //   VideoPlaybackControlsController::handleTvOutEvent
       
  1165 // -------------------------------------------------------------------------------------------------
       
  1166 //
       
  1167 void VideoPlaybackControlsController::handleTvOutEvent(
       
  1168         bool connected, TVideoPlaybackControlCommandIds event )
       
  1169 {
       
  1170     Q_UNUSED( event );
       
  1171 
       
  1172     MPX_DEBUG(_L("VideoPlaybackControlsController::handleTvOutEvent()"));
       
  1173 
       
  1174     mFileDetails->mTvOutConnected = connected;
       
  1175 
       
  1176     setDefaultBitmap();
       
  1177 
       
  1178     if ( mFileDetails->mTvOutConnected )
       
  1179     {
       
  1180         generateThumbNail();
       
  1181     }
       
  1182 
       
  1183     //
       
  1184     // Change the view.
       
  1185     // If Tv-out is connected, go to AudioOnlyView.
       
  1186     // If not, go back to default view.
       
  1187     //
       
  1188     TPlaybackViewMode viewMode = EFullScreenView;
       
  1189 
       
  1190     if ( mFileDetails->mTvOutConnected || ! mFileDetails->mVideoEnabled )
       
  1191     {
       
  1192         viewMode = EAudioOnlyView;
       
  1193     }
       
  1194 
       
  1195     changeViewMode( viewMode, false );
       
  1196 }
       
  1197 
       
  1198 // -------------------------------------------------------------------------------------------------
       
  1199 //   VideoPlaybackControlsController::changeViewMode
  1219 //   VideoPlaybackControlsController::changeViewMode
  1200 // -------------------------------------------------------------------------------------------------
  1220 // -------------------------------------------------------------------------------------------------
  1201 //
  1221 //
  1202 void VideoPlaybackControlsController::changeViewMode(
  1222 void VideoPlaybackControlsController::evaluateAndChangeViewMode(
  1203         TPlaybackViewMode viewMode, bool transitionEffect )
  1223         TPlaybackViewMode viewMode, bool transitionEffect )
  1204 {
  1224 {
  1205     MPX_DEBUG(_L("VideoPlaybackControlsController::changeViewMode( %d, %d )"),
  1225     MPX_DEBUG(_L("VideoPlaybackControlsController::changeViewMode( %d, %d )"),
  1206             viewMode, transitionEffect );
  1226             viewMode, transitionEffect );
  1207 
  1227 
  1208     if ( viewMode != mViewMode )
  1228     switch ( viewMode )
  1209     {
  1229     {
  1210         switch ( viewMode )
  1230         case EFullScreenView:
  1211         {
  1231         case EDetailsView:
  1212             case EFullScreenView:
  1232         {
  1213             case EDetailsView:
  1233             if ( mFileDetails->mVideoEnabled &&
  1214             {
  1234                  ! mFileDetails->mTvOutConnected )
  1215                 if ( mFileDetails->mVideoEnabled && ! mFileDetails->mTvOutConnected )
  1235             {
       
  1236                 if ( viewMode != mViewMode )
  1216                 {
  1237                 {
  1217                     mViewMode = viewMode;
  1238                     mViewMode = viewMode;
  1218 
  1239 
  1219                     //
       
  1220                     // Hack to clean up the screen before transition. We may not need it in NGA env
       
  1221                     //
       
  1222                     hideAllControls();
       
  1223 
       
  1224                     updateVideoRect( transitionEffect );
  1240                     updateVideoRect( transitionEffect );
  1225                 }
  1241                 }
  1226 
  1242 
  1227                 break;
  1243                 break;
  1228             }
  1244             }
  1229             case EAudioOnlyView:
  1245             //
  1230             {
  1246             // Internal fall-through
  1231                 if ( ! mFileDetails->mVideoEnabled || mFileDetails->mTvOutConnected )
  1247             // If it is not possible to change the mode to full screen/details
       
  1248             // coz of tvout or audio only clip
       
  1249             // then open audio only view instead
       
  1250             //
       
  1251         }
       
  1252         case EAudioOnlyView:
       
  1253         {
       
  1254             //
       
  1255             // If there is any event changed within audio only view,
       
  1256             // update bitmap to show current status
       
  1257             //
       
  1258             if ( ! mFileDetails->mVideoEnabled || mFileDetails->mTvOutConnected )
       
  1259             {
       
  1260                 if ( mViewMode == EAudioOnlyView )
  1232                 {
  1261                 {
  1233                     mViewMode = viewMode;
  1262                     setDefaultBitmap();
       
  1263                 }
       
  1264                 else
       
  1265                 {
       
  1266                     mViewMode = EAudioOnlyView;
  1234 
  1267 
  1235                     mControlsConfig->updateControlList( EControlCmdAudionOnlyViewOpened );
  1268                     mControlsConfig->updateControlList( EControlCmdAudionOnlyViewOpened );
       
  1269 
       
  1270                     if ( mFileDetails->mTvOutConnected )
       
  1271                     {
       
  1272                         generateThumbNail();
       
  1273                     }
  1236                 }
  1274                 }
  1237 
  1275             }
  1238                 break;
  1276             break;
  1239             }
  1277         }
  1240             default:
  1278         default:
  1241             {
  1279         {
  1242                 break;
  1280             break;
  1243             }
       
  1244         }
  1281         }
  1245     }
  1282     }
  1246 }
  1283 }
  1247 
  1284 
  1248 // -------------------------------------------------------------------------------------------------
  1285 // -------------------------------------------------------------------------------------------------
  1434     else
  1471     else
  1435     {
  1472     {
  1436         mThumbNailState = EThumbNailNotAvailable;
  1473         mThumbNailState = EThumbNailNotAvailable;
  1437     }
  1474     }
  1438 
  1475 
  1439     setDefaultBitmap();
       
  1440 
       
  1441     disconnect( mThumbnailManager, SIGNAL( thumbnailReady( QPixmap , void * , int , int ) ),
  1476     disconnect( mThumbnailManager, SIGNAL( thumbnailReady( QPixmap , void * , int , int ) ),
  1442                 this, SLOT( handleThumbnailReady( QPixmap , void * , int , int ) ) );
  1477                 this, SLOT( handleThumbnailReady( QPixmap , void * , int , int ) ) );
  1443 }
  1478 }
  1444 
  1479 
  1445 // -------------------------------------------------------------------------------------------------
  1480 // -------------------------------------------------------------------------------------------------
  1473                    _L("file = %s"), mFileDetails->mClipName.data() );
  1508                    _L("file = %s"), mFileDetails->mClipName.data() );
  1474 
  1509 
  1475     //
  1510     //
  1476     // send video to shareUI
  1511     // send video to shareUI
  1477     //
  1512     //
  1478     ShareUi dlg;
  1513     if( ! mShareUi )
       
  1514     {
       
  1515         mShareUi = new ShareUi();
       
  1516     }
       
  1517 
  1479     QStringList fileList;
  1518     QStringList fileList;
  1480     fileList.append( mFileDetails->mClipName );
  1519     fileList.append( mFileDetails->mClipName );
  1481     dlg.send( fileList, true );
  1520     mShareUi->send( fileList, true );
  1482 }
  1521 }
  1483 
  1522 
  1484 // -------------------------------------------------------------------------------------------------
  1523 // -------------------------------------------------------------------------------------------------
  1485 // VideoPlaybackControlsController::handleRNLogoVisibleChanged()
  1524 // VideoPlaybackControlsController::handleRNLogoVisibleChanged()
  1486 // -------------------------------------------------------------------------------------------------
  1525 // -------------------------------------------------------------------------------------------------
  1564                    _L("old orientation %d, new orientation = %d"), mOrientation, orientation );
  1603                    _L("old orientation %d, new orientation = %d"), mOrientation, orientation );
  1565 
  1604 
  1566     Qt::Orientation  oldOrientaiton = mOrientation;
  1605     Qt::Orientation  oldOrientaiton = mOrientation;
  1567     mOrientation = orientation;
  1606     mOrientation = orientation;
  1568 
  1607 
  1569     if ( oldOrientaiton == Qt::Vertical && orientation == Qt::Horizontal )
  1608     if ( oldOrientaiton == Qt::Vertical &&
       
  1609          orientation == Qt::Horizontal &&
       
  1610          mShowControlsWhenInHorizontal )
  1570     {
  1611     {
  1571         showControls();
  1612         showControls();
       
  1613         mShowControlsWhenInHorizontal = false;
  1572     }
  1614     }
  1573 }
  1615 }
  1574 
  1616 
  1575 // -------------------------------------------------------------------------------------------------
  1617 // -------------------------------------------------------------------------------------------------
  1576 // VideoPlaybackControlsController::shouldShowRNLogo()
  1618 // VideoPlaybackControlsController::shouldShowRNLogo()
  1581     MPX_ENTER_EXIT(_L("VideoPlaybackControlsController::shouldShowRNLogo()"));
  1623     MPX_ENTER_EXIT(_L("VideoPlaybackControlsController::shouldShowRNLogo()"));
  1582 
  1624 
  1583     bool showRNLogo = false;
  1625     bool showRNLogo = false;
  1584 
  1626 
  1585     if ( mFileDetails->mRNFormat &&
  1627     if ( mFileDetails->mRNFormat &&
  1586          !mViewWrapper->IsResumingPlaybackAfterTermination() )
  1628          ! mViewWrapper->IsResumingPlaybackAfterTermination() )
  1587     {
  1629     {
  1588         showRNLogo = true;
  1630         showRNLogo = true;
  1589     }
  1631     }
  1590 
  1632 
  1591     return showRNLogo;
  1633     return showRNLogo;