videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp
changeset 2 dec420019252
parent 1 6711b85517b7
child 6 7d91903f795f
equal deleted inserted replaced
1:6711b85517b7 2:dec420019252
    13 *
    13 *
    14 * Description:   Implementation of Video base playback view
    14 * Description:   Implementation of Video base playback view
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 57 %
    18 // Version : %version: e003sa33#58 %
    19 
    19 
    20 
    20 
    21 //  Include Files
    21 //  Include Files
    22 
    22 
    23 #include <aknViewAppUi.h>
    23 #include <aknViewAppUi.h>
   585 
   585 
   586     //
   586     //
   587     //  This view is active since we are receiving the callback.
   587     //  This view is active since we are receiving the callback.
   588     //  Some new view is being activated so stop playback and return to automatic orientation
   588     //  Some new view is being activated so stop playback and return to automatic orientation
   589     //
   589     //
   590     HandleCommandL( EMPXPbvCmdStop );
   590     TRAP_IGNORE(
   591     AppUi()->SetOrientationL( CAknAppUiBase::EAppUiOrientationAutomatic );
   591         HandleCommandL( EMPXPbvCmdStop );
       
   592         AppUi()->SetOrientationL( CAknAppUiBase::EAppUiOrientationAutomatic );
       
   593         );
   592 }
   594 }
   593 
   595 
   594 // -------------------------------------------------------------------------------------------------
   596 // -------------------------------------------------------------------------------------------------
   595 // From MMPXPlaybackObserver
   597 // From MMPXPlaybackObserver
   596 // Handle playback message.
   598 // Handle playback message.
  1622 {
  1624 {
  1623     TBool ret = EFalse;
  1625     TBool ret = EFalse;
  1624     RWsSession wsSession;
  1626     RWsSession wsSession;
  1625 
  1627 
  1626     User::LeaveIfError( wsSession.Connect() );
  1628     User::LeaveIfError( wsSession.Connect() );
       
  1629     CleanupClosePushL( wsSession );
  1627 
  1630 
  1628     if ( wsSession.Handle() )
  1631     if ( wsSession.Handle() )
  1629     {
  1632     {
  1630         CArrayFixFlat<TInt>* wgList =
  1633         CArrayFixFlat<TInt>* wgList =
  1631             new (ELeave) CArrayFixFlat<TInt>( wsSession.NumWindowGroups() );
  1634             new (ELeave) CArrayFixFlat<TInt>( wsSession.NumWindowGroups() );
  1641         }
  1644         }
  1642 
  1645 
  1643         delete wgList;
  1646         delete wgList;
  1644     }
  1647     }
  1645 
  1648 
  1646     wsSession.Close();
  1649     CleanupStack::PopAndDestroy(); //wsSession
  1647 
  1650 
  1648     MPX_DEBUG(_L("CMPXVideoBasePlaybackView::IsAppInFrontL (%d)" ), ret);
  1651     MPX_DEBUG(_L("CMPXVideoBasePlaybackView::IsAppInFrontL (%d)" ), ret);
  1649 
  1652 
  1650     return ret;
  1653     return ret;
  1651 }
  1654 }
  2012         DRM::CDrmUiHandling* drmUiHandling = DRM::CDrmUiHandling::NewL( iCoeEnv );
  2015         DRM::CDrmUiHandling* drmUiHandling = DRM::CDrmUiHandling::NewL( iCoeEnv );
  2013         CleanupStack::PushL( drmUiHandling );
  2016         CleanupStack::PushL( drmUiHandling );
  2014 
  2017 
  2015         if ( openError == KErrNone )
  2018         if ( openError == KErrNone )
  2016         {
  2019         {
  2017             TRAP_IGNORE( drmUiHandling->ShowDetailsViewL(fileHandle) );
  2020             MPX_TRAPD( err, drmUiHandling->ShowDetailsViewL( fileHandle ) );
       
  2021             if ( KLeaveExit == err )
       
  2022             {
       
  2023                 User::Leave( err );
       
  2024             }
  2018         }
  2025         }
  2019 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  2026 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  2020         else if ( openError == KErrTooBig )
  2027         else if ( openError == KErrTooBig )
  2021         {
  2028         {
  2022             RFile64 fileHandle64;
  2029             RFile64 fileHandle64;
  2023             CleanupClosePushL( fileHandle64 );
  2030             CleanupClosePushL( fileHandle64 );
  2024             MPX_TRAPD( err, openError = OpenDrmFileHandle64L( fileHandle64 ) );
  2031             MPX_TRAPD( err, openError = OpenDrmFileHandle64L( fileHandle64 ) );
  2025 
  2032 
  2026             if ( err == KErrNone && openError == KErrNone )
  2033             if ( err == KErrNone && openError == KErrNone )
  2027             {
  2034             {
  2028                 TRAP_IGNORE( drmUiHandling->ShowDetailsViewL(fileHandle64) );
  2035                 MPX_TRAPD( err, drmUiHandling->ShowDetailsViewL( fileHandle64 ) );
  2029             }
  2036                 if ( KLeaveExit == err )
  2030 
  2037                 {
       
  2038                     User::Leave( err );
       
  2039                 }
       
  2040             }
  2031             CleanupStack::PopAndDestroy(); // fileHandle64
  2041             CleanupStack::PopAndDestroy(); // fileHandle64
  2032         }
  2042         }
  2033 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  2043 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
  2034 
  2044 
  2035         CleanupStack::PopAndDestroy( drmUiHandling );
  2045         CleanupStack::PopAndDestroy( drmUiHandling );