--- a/videoplayerapp/videoplayerengine/src/mpxvideoplayerappuiengine.cpp Thu Apr 01 23:22:15 2010 +0300
+++ b/videoplayerapp/videoplayerengine/src/mpxvideoplayerappuiengine.cpp Thu Apr 01 23:32:44 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-// Version : %version: 4 %
+// Version : %version: 5 %
@@ -88,28 +88,23 @@
// -------------------------------------------------------------------------------------------------
//
void CMpxVideoPlayerAppUiEngine::ConstructL()
-{
- iRecognizer = CMediaRecognizer::NewL();
+{
+ TUid collectionMode( KUidMpxVideoPlayerApplication );
- //
- // Create the Collection Utility
- //
+ iCollectionUtility = MMPXCollectionUtility::NewL( this, collectionMode );
+}
- //
- // Workaround. Embedded is not supported yet.
- //
- //if ( ! iAppUi->IsEmbedded() )
- if ( ETrue )
- {
- TUid collectionMode( KUidMpxVideoPlayerApplication );
-
- iCollectionUtility = MMPXCollectionUtility::NewL( this, collectionMode );
- }
-
- //
- // Create Active Object for exiting the application
- //
- iExitAo = CIdle::NewL( CActive::EPriorityStandard );
+// -------------------------------------------------------------------------------------------------
+// CMpxVideoPlayerAppUiEngine::PostInitL
+// -------------------------------------------------------------------------------------------------
+//
+void CMpxVideoPlayerAppUiEngine::LateInitL()
+{
+ CreatePlaybackUtilityMemberVariablesL();
+
+ iRecognizer = CMediaRecognizer::NewL();
+
+ iExitAo = CIdle::NewL( CActive::EPriorityStandard );
}
// -------------------------------------------------------------------------------------------------
@@ -161,14 +156,7 @@
{
MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::CreateEmbeddedPdlPlaybackUtilityMemberVariablesL()"));
- if ( ! iPlaybackUtility )
- {
- iPlaybackUtility = MMPXPlaybackUtility::UtilityL( EMPXCategoryVideo, KPbModeNewPlayer );
- MMPXPlayerManager& manager = iPlaybackUtility->PlayerManager();
- manager.SelectPlayerL( KVideoHelixPlaybackPluginUid );
- iPlaybackUtility->AddObserverL( *this );
- iPlaybackUtility->CommandL( EPbCmdSetAutoResume, EFalse );
- }
+ CreatePlaybackUtilityMemberVariablesL();
}
// -------------------------------------------------------------------------------------------------
@@ -354,11 +342,6 @@
if ( KErrNone == err && ! iPdlHandler )
{
- //
- // Create member variables for embedded use cases that are not PDL
- //
- CreatePlaybackUtilityMemberVariablesL();
-
TFileName filename;
aFile.FullName(filename);
@@ -393,11 +376,6 @@
MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::OpenFileL()"),
_L("aFileName = %S"), &aFileName);
- //
- // Create member variables for embedded use cases that are not PDL
- //
- CreatePlaybackUtilityMemberVariablesL();
-
CMediaRecognizer::TMediaType mediaType = iRecognizer->IdentifyMediaTypeL(aFileName);
if ( mediaType == CMediaRecognizer::ELocalVideoFile )
@@ -457,8 +435,6 @@
playList->SetSingleItemPlaylist();
playList->SetToFirst();
- CreatePlaybackUtilityMemberVariablesL();
-
iPlaybackUtility->InitL( *playList, ETrue );
CleanupStack::PopAndDestroy( playList );
@@ -512,29 +488,7 @@
{
MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::HandlePlaybackPlayerChangedL()"));
- MMPXPlayer* player = iPlaybackUtility->PlayerManager().CurrentPlayer();
-
- TUid pluginUid( KNullUid );
- RArray<TUid> array;
-
- CleanupClosePushL( array );
-
- if ( iPdlHandler )
- {
- array.AppendL( KVideoPdlPlaybackViewUid );
- }
- else
- {
- if ( player )
- {
- pluginUid = player->UidL();
- array.AppendL( pluginUid );
- }
- }
-
ActivateVideoPlaybackView();
-
- CleanupStack::PopAndDestroy( &array );
}
// -------------------------------------------------------------------------------------------------
@@ -712,9 +666,7 @@
if ( mediaType == CMediaRecognizer::ELocalRamFile ||
mediaType == CMediaRecognizer::ELocalAsxFile )
- {
- CreatePlaybackUtilityMemberVariablesL();
-
+ {
HandleMultiLinksFileL( mediaFile, mediaType );
}
else
@@ -905,21 +857,7 @@
TPckg<TVideoPlayerActivationMessage> paramsPckg( msgHandler );
paramsPckg.Copy( aMsg );
- /*if ( msgHandler.iMsgSender == TVideoPlayerActivationMessage::EMatrixMenu )
- {
- // Clear the view history, so app exits back to matrix.
- iViewUtility->PushDefaultHistoryL();
- }
-
- if ( msgHandler.iMsgType == TVideoPlayerActivationMessage::EOpenInternetVideos )
- {
- iViewUtility->ActivateViewL( TUid::Uid( KMpxVideoPlayerVodViewPluginTypeId ) );
- }
- else if ( msgHandler.iMsgType == TVideoPlayerActivationMessage::EOpenVideoStorage )
- {
- iViewUtility->ActivateViewL( TUid::Uid( KUidMyVideosViewTypeId ) );
- }
- else*/ if ( msgHandler.iMsgType == TVideoPlayerActivationMessage::ELaunchVideoToPlayer )
+ if ( msgHandler.iMsgType == TVideoPlayerActivationMessage::ELaunchVideoToPlayer )
{
// Launch video to player, it can be either local video or stream.
@@ -946,47 +884,6 @@
}
}
}
- /*else
- {
- TBool vodUiRunning = ( iViewUtility->ActiveViewType() ==
- TUid::Uid( KMpxVideoPlayerVodViewPluginTypeId ) );
-
- if ( vodUiRunning )
- {
- // VOD is active, must use the utility to pass the message.
- // Workaround for a test stopper, to be refactored.
- CVcxViewMessageUtility::InstanceL()->SendCustomViewMessageL( TUid::Uid(0), aMsg );
- }
- else
- {
- // VOD is not running, activate with custom message.
- HBufC* customMsg = HBufC::NewLC( paramsPckg.Length() );
- customMsg->Des().Copy( paramsPckg );
- iViewUtility->ActivateViewL( TUid::Uid( KMpxVideoPlayerVodViewPluginTypeId ), customMsg );
- CleanupStack::PopAndDestroy( customMsg );
-
- // Clear the view history, so playback returns where it was started
- iViewUtility->PushDefaultHistoryL();
- }
- }
- }
- else if ( msgHandler.iMsgType == TVideoPlayerActivationMessage::ELaunchServiceById )
- {
- if ( iViewUtility->ActiveViewType() == TUid::Uid( KMpxVideoPlayerVodViewPluginTypeId ) )
- {
- // VOD is active, must use the utility to pass the message.
- // Workaround for a test stopper, to be refactored.
- CVcxViewMessageUtility::InstanceL()->SendCustomViewMessageL( TUid::Uid(0), aMsg );
- }
- else
- {
- // VOD is not running, activate with custom message.
- HBufC* customMsg = HBufC::NewLC( paramsPckg.Length() );
- customMsg->Des().Copy( paramsPckg );
- iViewUtility->ActivateViewL( TUid::Uid( KMpxVideoPlayerVodViewPluginTypeId ), customMsg );
- CleanupStack::PopAndDestroy( customMsg );
- }
- }*/
}
// -------------------------------------------------------------------------------------------------