videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp
branchRCL_3
changeset 12 7f2b2a65da29
parent 11 8970fbd719ec
child 14 55fa1ec415c6
equal deleted inserted replaced
11:8970fbd719ec 12:7f2b2a65da29
    14 * Description:  This class plays local video file
    14 * Description:  This class plays local video file
    15  *
    15  *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // Version : %version: 52 %
    19 // Version : %version: 56 %
    20 
    20 
    21 
    21 
    22 //
    22 //
    23 //  INCLUDE FILES
    23 //  INCLUDE FILES
    24 //
    24 //
    84 _LIT( KAbstract, "Abstract" );
    84 _LIT( KAbstract, "Abstract" );
    85 _LIT( KLocation, "Location" );
    85 _LIT( KLocation, "Location" );
    86 _LIT( KRightCopy, "Copyright" );
    86 _LIT( KRightCopy, "Copyright" );
    87 _LIT( KLanguage, "Language" );
    87 _LIT( KLanguage, "Language" );
    88 _LIT( KKeywords, "Keywords" );
    88 _LIT( KKeywords, "Keywords" );
       
    89 _LIT( KCreated, "CreationTime" );
       
    90 _LIT( KLastModified, "ModificationTime" );
    89 
    91 
    90 
    92 
    91 // ============================ MEMBER FUNCTIONS ===================================================
    93 // ============================ MEMBER FUNCTIONS ===================================================
    92 
    94 
    93 //  ------------------------------------------------------------------------------------------------
    95 //  ------------------------------------------------------------------------------------------------
   542                 }
   544                 }
   543 
   545 
   544                 aCmd.SetTObjectValueL<TInt>( KMPXMediaVideoBufferingPercentage,
   546                 aCmd.SetTObjectValueL<TInt>( KMPXMediaVideoBufferingPercentage,
   545                                              bufferingPercentage );
   547                                              bufferingPercentage );
   546 
   548 
   547                 break;
       
   548             }
       
   549             case EPbCmdSurfaceRemoved:
       
   550             {
       
   551                 iPlayer->SurfaceRemovedFromView();
       
   552                 break;
       
   553             }
       
   554             default:
       
   555             {
       
   556                 break;
   549                 break;
   557             }
   550             }
   558         }
   551         }
   559     }
   552     }
   560 }
   553 }
  1448                 iFileDetails->iLanguage = metaData->Value().AllocL();
  1441                 iFileDetails->iLanguage = metaData->Value().AllocL();
  1449             }
  1442             }
  1450             else if ( !metaData->Name().CompareF( KKeywords ) )
  1443             else if ( !metaData->Name().CompareF( KKeywords ) )
  1451             {
  1444             {
  1452                 iFileDetails->iKeywords = metaData->Value().AllocL();
  1445                 iFileDetails->iKeywords = metaData->Value().AllocL();
       
  1446             }
       
  1447             else if ( !metaData->Name().CompareF( KCreated ) )
       
  1448             {
       
  1449                 TLex lex( metaData->Value() );
       
  1450                 lex.Val( iFileDetails->iCreationTime );
       
  1451             }
       
  1452             else if ( !metaData->Name().CompareF( KLastModified ) )
       
  1453             {
       
  1454                 TLex lex( metaData->Value() );
       
  1455                 lex.Val( iFileDetails->iModificationTime );
  1453             }
  1456             }
  1454 
  1457 
  1455             CleanupStack::PopAndDestroy( metaData );
  1458             CleanupStack::PopAndDestroy( metaData );
  1456         }
  1459         }
  1457 
  1460 
  1768 
  1771 
  1769 // -------------------------------------------------------------------------------------------------
  1772 // -------------------------------------------------------------------------------------------------
  1770 //   CMPXVideoPlaybackController::SendTvOutEventL
  1773 //   CMPXVideoPlaybackController::SendTvOutEventL
  1771 // -------------------------------------------------------------------------------------------------
  1774 // -------------------------------------------------------------------------------------------------
  1772 //
  1775 //
  1773 TBool CMPXVideoPlaybackController::SendTvOutEventL( TBool aConnected, TBool aPlaybackAllowed )
  1776 void CMPXVideoPlaybackController::SendTvOutEventL( TBool aConnected, TBool aPlaybackAllowed )
  1774 {
  1777 {
  1775     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::SendTvOutEventL()"));
  1778     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::SendTvOutEventL()"));
  1776 
  1779 
  1777     //
  1780     //
  1778     //  Send notice to the playback view with TV-Out connection status
  1781     //  Send notice to the playback view with TV-Out connection status
  1784     message->SetTObjectValueL<TMPXMessageId>( KMPXMessageGeneralId, KMPXMediaIdVideoPlayback );
  1787     message->SetTObjectValueL<TMPXMessageId>( KMPXMessageGeneralId, KMPXMediaIdVideoPlayback );
  1785     message->SetTObjectValueL<TMPXVideoPlaybackCommand>
  1788     message->SetTObjectValueL<TMPXVideoPlaybackCommand>
  1786         ( KMPXMediaVideoPlaybackCommand, EPbCmdTvOutEvent );
  1789         ( KMPXMediaVideoPlaybackCommand, EPbCmdTvOutEvent );
  1787     message->SetTObjectValueL<TInt>( KMPXMediaVideoTvOutConnected, aConnected );
  1790     message->SetTObjectValueL<TInt>( KMPXMediaVideoTvOutConnected, aConnected );
  1788     message->SetTObjectValueL<TInt>( KMPXMediaVideoTvOutPlayAllowed, aPlaybackAllowed );
  1791     message->SetTObjectValueL<TInt>( KMPXMediaVideoTvOutPlayAllowed, aPlaybackAllowed );
       
  1792 
       
  1793     iMPXPluginObs->HandlePlaybackMessage( message, KErrNone );
       
  1794 
       
  1795     CleanupStack::PopAndDestroy( message );
       
  1796 }
       
  1797 
       
  1798 // -------------------------------------------------------------------------------------------------
       
  1799 //   CMPXVideoPlaybackController::SendHideControlsEventL
       
  1800 // -------------------------------------------------------------------------------------------------
       
  1801 //
       
  1802 void CMPXVideoPlaybackController::SendHideControlsEventL()
       
  1803 {
       
  1804     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::SendHideControlsEventL()"));
       
  1805 
       
  1806     //
       
  1807     //  Send notice to the playback view to hide the controls
       
  1808     //  when key lock
       
  1809     //
       
  1810     CMPXMessage* message = CMPXMessage::NewL();
       
  1811     CleanupStack::PushL( message );
       
  1812 
       
  1813     message->SetTObjectValueL<TMPXMessageId>( KMPXMessageGeneralId, KMPXMediaIdVideoPlayback );
       
  1814 
       
  1815     message->SetTObjectValueL<TMPXVideoPlaybackCommand>
       
  1816         ( KMPXMediaVideoPlaybackCommand, EPbCmdHideControls );
  1789 
  1817 
  1790     iMPXPluginObs->HandlePlaybackMessage( message, KErrNone );
  1818     iMPXPluginObs->HandlePlaybackMessage( message, KErrNone );
  1791 
  1819 
  1792     CleanupStack::PopAndDestroy( message );
  1820     CleanupStack::PopAndDestroy( message );
  1793 }
  1821 }