Revision: 201013 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 14 Apr 2010 15:59:50 +0300
branchRCL_3
changeset 11 8970fbd719ec
parent 10 112a725ff2c2
child 12 7f2b2a65da29
Revision: 201013 Kit: 201015
mediasettings/mediasettingsapp/src/MPSettingsAppUi.cpp
mediasettings/mediasettingsengine/group/bld.inf
videocollection/hgmyvideos/conf/hgmyvideos.confml
videocollection/hgmyvideos/conf/hgmyvideos_20021191.crml
videocollection/hgmyvideos/data/vcxhgmyvideos.rss
videocollection/hgmyvideos/inc/vcxhgmyvideos.hrh
videocollection/hgmyvideos/inc/vcxhgmyvideoscategorymodelhandler.h
videocollection/hgmyvideos/inc/vcxhgmyvideoscenrepkeys.h
videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistimpl.h
videocollection/hgmyvideos/src/vcxhgmyvideoscategorylistimpl.cpp
videocollection/hgmyvideos/src/vcxhgmyvideoscategorymodelhandler.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosmainview.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp
videoplayback/inc/mpxvideobaseplaybackview.h
videoplayback/inc/mpxvideoplaybackmediadetailsviewer.h
videoplayback/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h
videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp
videoplayback/videohelix/src/mpxvideoplaybackmode.cpp
videoplayback/videohelix/src/mpxvideoplaybackstate.cpp
videoplayback/videohelix/src/mpxvideoseeker.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrol.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackmediadetailsviewer.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp
videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/bwins/ui_videoplaybackcontrolstestu.def
videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/conf/ui_videoplaybackcontrolstest.cfg
videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/eabi/ui_videoplaybackcontrolstestu.def
videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/group/videoplaybackcontrolstest.mmp
videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/inc/mpxvpbc_stub.h
videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/inc/videoplaybackcontrolstest.h
videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/mpxvpbc_stub.cpp
videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/mpxvpbvfd_stub.cpp
videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/videoplaybackcontrolstestblocks.cpp
videoplayback/videoplaybackviews/bwins/mpxvideoplaybackviewsu.def
videoplayback/videoplaybackviews/eabi/mpxvideoplaybackviewsu.def
videoplayback/videoplaybackviews/group/mpxvideoplaybackviews.mmp
videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp
videoplayback/videoplaybackviews/src/mpxvideoplaybackuserinputhandler.cpp
videoplayback/videoplaybackviews/src/mpxvideoplaybackviewfiledetails.cpp
--- a/mediasettings/mediasettingsapp/src/MPSettingsAppUi.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/mediasettings/mediasettingsapp/src/MPSettingsAppUi.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 */
 
 
-// Version : %version: 11 %
+// Version : %version: 12 %
 
 
 
@@ -301,7 +301,7 @@
     {
     MPX_DEBUG1(_L("#MS# CMPSettingsAppUi::HandleKeyEventL()"));
     // Check if the event should be handled by iTabGroup
-    if (aType != EEventKey ||  iNaviPane->Top() != iDecoratedTabGroup)
+    if ( !iTabGroup || aType != EEventKey ||  iNaviPane->Top() != iDecoratedTabGroup)
         {
         return EKeyWasNotConsumed;
         }
--- a/mediasettings/mediasettingsengine/group/bld.inf	Wed Mar 31 21:34:36 2010 +0300
+++ b/mediasettings/mediasettingsengine/group/bld.inf	Wed Apr 14 15:59:50 2010 +0300
@@ -16,7 +16,7 @@
 
 
 
-// Version : %version: 6 %
+// Version : %version: 7 %
 
 #include <platform_paths.hrh>
 
@@ -28,7 +28,7 @@
 //  Export the loc, stub sis iby files for S60 5.0
 //
 ../rom/mpsettropmodel.iby      	CORE_APP_LAYER_IBY_EXPORT_PATH(mpsettropmodel.iby)
-../rom/mpsettropmodelrsc.iby    LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(mpsettropmodelrsc.iby)
+../rom/mpsettropmodelrsc.iby    CORE_APP_LAYER_IBY_EXPORT_PATH(mpsettropmodelrsc.iby)
 
 PRJ_MMPFILES
 ../group/MPSettROPModel.mmp
Binary file videocollection/hgmyvideos/conf/hgmyvideos.confml has changed
Binary file videocollection/hgmyvideos/conf/hgmyvideos_20021191.crml has changed
--- a/videocollection/hgmyvideos/data/vcxhgmyvideos.rss	Wed Mar 31 21:34:36 2010 +0300
+++ b/videocollection/hgmyvideos/data/vcxhgmyvideos.rss	Wed Apr 14 15:59:50 2010 +0300
@@ -103,6 +103,11 @@
             },
         MENU_ITEM 
             {
+            command = EVcxHgMyVideosCmdDeleteMarked;
+            txt = qtn_iptv_delete_video_clip;
+            },
+        MENU_ITEM
+            {
             command = EVcxHgMyVideosCmdResumeDownload; 
             txt = qtn_iptv_resume_download;
             flags = EEikMenuItemSpecific;
@@ -127,10 +132,20 @@
             },
         MENU_ITEM 
             { 
+            command = EVcxHgMyVideosCmdCopyMarked;
+            txt = qtn_iptv_copy_submenu;
+            },
+        MENU_ITEM
+            {
             command = EVcxHgMyVideosCmdMove; 
             txt = qtn_iptv_move_submenu;
             flags = EEikMenuItemSpecific;
             },    
+        MENU_ITEM
+            {
+            command = EVcxHgMyVideosCmdMoveMarked;
+            txt = qtn_iptv_move_submenu;
+            },
         MENU_ITEM 
             { 
             command = EVcxHgMyVideosCmdShowViaHomenet;
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideos.hrh	Wed Mar 31 21:34:36 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideos.hrh	Wed Apr 14 15:59:50 2010 +0300
@@ -25,6 +25,7 @@
     EVcxHgMyVideosCmdPlay = 700,             // Play video
     EVcxHgMyVideosCmdOpen,                   // Open video view
     EVcxHgMyVideosCmdDelete,                 // Delete video (only for complete files)
+    EVcxHgMyVideosCmdDeleteMarked,           // Delete video (only for complete files)
     EVcxHgMyVideosCmdResumeDownload,         // Resume download (only for downloads)
     EVcxHgMyVideosCmdCancelDownload,         // Cancel download (only for downloads)
     EVcxHgMyVideosCmdVideoDetails,           // Video details
@@ -36,7 +37,9 @@
     EVcxHgMyVideosCmdSortByName,             // Sort submenu: Sort by name
     EVcxHgMyVideosCmdSortBySize,             // Sort submenu: Sort by size
     EVcxHgMyVideosCmdCopy,                   // Copy video(s)
+    EVcxHgMyVideosCmdCopyMarked,             // Copy video(s)
     EVcxHgMyVideosCmdMove,                   // Move video(s)
+    EVcxHgMyVideosCmdMoveMarked,             // Move video(s)
     EVcxHgMyVideosCmdMarkUnmarkSubMenu,      // Mark or unmark videos sub-menu
     EVcxHgMyVideosCmdMark,                   // Mark/Unmark submenu: Mark video
     EVcxHgMyVideosCmdUnmark,                 // Mark/Unmark submenu: Unmark video 
@@ -49,6 +52,7 @@
     EVcxHgMyVideosCmdExit,                   // Exit Video Storage
     EVcxHgMyVideosCmdToggleMultipleMarking,  // Toggle marking mode state
     EVcxHgMyVideosCmdSend,                   // Send video
+    EVcxHgMyVideosCmdSendMarked,             // Send video
     EVcxHgMyVideosCmdNothing,                // Non-functional command
     EVcxHgMyVideosCmdStartMarking,           // Sets marking mode on
     EVcxHgMyVideosCmdStopMarking,             // Sets marking mode off
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideoscategorymodelhandler.h	Wed Mar 31 21:34:36 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideoscategorymodelhandler.h	Wed Apr 14 15:59:50 2010 +0300
@@ -340,6 +340,22 @@
                 const TFileName& aFileName,
                 TInt aBitmapId,
                 TInt aMaskId );
+        
+        /**
+         * Check, if the last watched cenrep key is set
+         * 
+         * @return ETrue if the key has been set, otherwise EFalse
+         */
+        TBool LastWatchedSetL();
+        
+        /**
+         * Check, if the preloaded video exists
+         * If the key exists, but the file is missing, it is considered, 
+         * as it does not exist.
+         *  
+         * @return ETrue if the preloaded does exist, otherwise EFalse
+         */
+        TBool PreloadedExistsL();
 
     private:
     
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideoscenrepkeys.h	Wed Mar 31 21:34:36 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideoscenrepkeys.h	Wed Apr 14 15:59:50 2010 +0300
@@ -48,6 +48,9 @@
 
 const TInt KCRVideoPlayerCapturedVideosIconPath   = 0x0A;
 const TInt KCRVideoPlayerOtherVideosIconPath      = 0x0B;
+const TInt KCRVideoPlayerPreloadedVideoPath       = 0x0C;
+const TInt KCRVideoPlayerPreloadedVideoName       = 0x0D;
+const TInt KCRVideoPlayerPreloadedVideoDescription= 0x0E;
 
 const TInt KCRVideoPlayerExtraItem1IconPath       = 0x10;
 const TInt KCRVideoPlayerExtraItem1Title          = 0x11;
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistimpl.h	Wed Mar 31 21:34:36 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistimpl.h	Wed Apr 14 15:59:50 2010 +0300
@@ -188,17 +188,6 @@
         void HandleMarkCommandL( TInt aMarkCommand );
         
         /**
-         * Checks the UI and list status, and returns information to show correct
-         * move and copy -menu items.
-         * 
-         * @param aShowMoveAndCopySubmenu On return, ETrue if move/copy sub-menu cab be shown.
-         * @param aShowCopy On return, ETrue if copy menu item can be shown.
-         * @param aShowMove On return, ETrue if move menu item can be shown.
-         */
-        void ShowMoveAndCopyMenuItemsL( 
-                 TBool& aShowMoveAndCopySubmenu, TBool& aShowCopy, TBool& aShowMove );
-        
-        /**
          * Handles move and copy commands to list.
          * 
          * @param aCopy ETrue if copy command was given. EFalse if move.
@@ -223,7 +212,7 @@
          * @param aResourceId Resource ID of menu to be activated.
          * @param aMenuPane Pointer to menu pane.
          */
-        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );        
+        void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
         
         /**
          * Returns correct MSK resource Id based on current state of video list.
@@ -408,6 +397,26 @@
         void OperationTargetsToMpxIdsL( RArray<TInt>& operationTargetIndexes,  
                                         RArray<TInt>& operationTargetIds );
 
+        /**
+         * Add "Send" menu item to menus
+         *
+         * @param aMenuPane Add the menu item to this menu pane
+         * @param aAddToOptions If true, also add to Options menu. If false, only add to context menu.
+         */
+        void AddSendItemToMenuPaneL(
+                CEikMenuPane* aMenuPane,
+                TBool aAddToOptions );
+
+        /**
+         * Handles dynamic initialisation of Move, Copy and Delete menu items
+         *
+         * @param aMenuPane Pointer to menu pane.
+         * @param aItemsMarked If true, also add to Options menu. If false, only add to context menu.
+         */
+        void DynInitMenuPaneFileOperationsL(
+                CEikMenuPane* aMenuPane,
+                TBool aItemsMarked );
+
     protected:
     
         /**
--- a/videocollection/hgmyvideos/src/vcxhgmyvideoscategorylistimpl.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideoscategorylistimpl.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -156,6 +156,9 @@
 // 
 void CVcxHgMyVideosCategoryListImpl::HandleOpenL( TInt /*aIndex*/ )
     {
+    // Reset the visible selection of the list.
+    iScroller->DrawDeferred();
+
     TInt highlight = Highlight();
     TInt categoryId = iCategoryModel->ResolveCategoryId( highlight );
     
--- a/videocollection/hgmyvideos/src/vcxhgmyvideoscategorymodelhandler.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideoscategorymodelhandler.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -38,6 +38,7 @@
 #include <aknlayoutscalable_avkon.cdl.h>
 #include <coemain.h>
 #include <aknappui.h>
+#include <bautils.h>
 
 #include <vcxhgmyvideosicons.mbg>
 #include <myvideosindicator.h>
@@ -185,7 +186,24 @@
             name = StringLoader::LoadLC( R_VCXHGMYVIDEOS_STORAGE_OTHER_LIST );
             break;            
         case KCategoryIdLastWatched:
-            name = StringLoader::LoadLC( R_VCXHGMYVIDEOS_LAST_WATCHED );
+            if ( LastWatchedSetL() )
+                {
+                name = StringLoader::LoadLC( R_VCXHGMYVIDEOS_LAST_WATCHED );
+                }
+            else 
+                {
+                if ( PreloadedExistsL() )
+                    {
+                    TBuf<KMyVideosTitleStringMaxLength> string;
+                    TInt error = iModel.GetMyVideosCustomizationString( 
+					                 KCRVideoPlayerPreloadedVideoName, string );
+                    name = error ? KNullDesC().AllocLC() : string.AllocLC();                
+                    }
+                else
+                    {
+                    name = StringLoader::LoadLC( R_VCXHGMYVIDEOS_LAST_WATCHED );
+                    }
+                }
             break;            
         case KCategoryIdExtraItem1:
             // ExtraItem1 is always interpreted as Ovi Store
@@ -261,7 +279,10 @@
             maskId = EMbmVcxhgmyvideosiconsQgn_prop_captured_thumbnail_video_mask;
             break;
         case KCategoryIdLastWatched:
-            // Dont set default lw icon here, it'd just blink.
+			 if ( !LastWatchedSetL() )
+			    {
+				LoadLastWatchedIconL();
+				}
             break;
         case KCategoryIdExtraItem1:
             // ExtraItem1 is always interpreted as Ovi Store
@@ -411,7 +432,6 @@
         case KVcxMvcCategoryIdTvRecordings:
         case KVcxMvcCategoryIdCaptured:
         case KVcxMvcCategoryIdOther:
-        case KCategoryIdLastWatched:
             {
             CMPXMedia* media = GetCategoryDataL( aCategoryId );
             if ( media )
@@ -424,6 +444,37 @@
 				}
             }
             break;
+        case KCategoryIdLastWatched:
+            {
+            if ( LastWatchedSetL() )
+                {
+                CMPXMedia* media = GetCategoryDataL( aCategoryId );
+                if ( media )
+                    {
+                    secondRow = FormatCategorySecondRowLC( *media );
+                    }
+                else
+                    {
+                    secondRow = KNullDesC().AllocLC();
+                    }
+                }
+            else    
+                {
+                if ( PreloadedExistsL() )
+                    {
+                    TBuf<KMyVideosTitleStringMaxLength> string;
+                    TInt error = iModel.GetMyVideosCustomizationString( 
+					                        KCRVideoPlayerPreloadedVideoDescription, string );
+                    secondRow = error ? KNullDesC().AllocLC() : string.AllocLC();
+                    }
+                else
+                    {
+                    secondRow = KNullDesC().AllocLC();
+                    }
+                }
+            }
+            break;
+
         case KCategoryIdExtraItem1:
             // ExtraItem1 is always interpreted as Ovi Store
             secondRow = StringLoader::LoadLC( R_VCXHGMYVIDEOS_OVI_STORE_VIDEOS ); 
@@ -936,17 +987,31 @@
 // 
 void CVcxHgMyVideosCategoryModelHandler::PlayLastWatchedVidedoL()
     {
-    if (  iLastWatched && iLastWatched->IsSupported( KMPXMediaGeneralId ) )
+    if ( LastWatchedSetL() )
         {
-        iModel.CollectionClient().PlayVideoL(
-                    *iLastWatched->Value<TMPXItemId>( KMPXMediaGeneralId ) );
-
-        iModel.SetAppState( CVcxHgMyVideosModel::EVcxMyVideosAppStatePlayer );
+        if (  iLastWatched && iLastWatched->IsSupported( KMPXMediaGeneralId ) )
+            {
+            iModel.CollectionClient().PlayVideoL(
+                        *iLastWatched->Value<TMPXItemId>( KMPXMediaGeneralId ) );
+    
+            iModel.SetAppState( CVcxHgMyVideosModel::EVcxMyVideosAppStatePlayer );
+            }
         }
     else
         {
-        // Refresh the list to remove the highlight.
-        iScroller.DrawDeferred();
+        if ( PreloadedExistsL() )
+            {
+            CAknAppUi* appui = static_cast<CAknAppUi*>( CCoeEnv::Static()->AppUi() );
+            
+            if ( appui )
+                {
+                TBuf<KMaxPath> path;
+                TInt error = iModel.GetMyVideosCustomizationString( 
+				                         KCRVideoPlayerPreloadedVideoPath, path );
+                appui->OpenFileL( path );
+                iModel.SetAppState( CVcxHgMyVideosModel::EVcxMyVideosAppStatePlayer );
+                }
+            }
         }
     }
 
@@ -957,12 +1022,33 @@
 // 
 void CVcxHgMyVideosCategoryModelHandler::LoadLastWatchedIconL()
     {
-    CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC( 
-                    iLastWatched->ValueText( KMPXMediaGeneralUri ),
-                    KNullDesC );
-    
-    iTnRequestId = iTnManager.GetL( *source );
-    CleanupStack::PopAndDestroy( source );
+    if ( LastWatchedSetL() )
+        {
+        if ( iLastWatched )
+            {
+            CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC( 
+                            iLastWatched->ValueText( KMPXMediaGeneralUri ),
+                            KNullDesC );
+            
+            iTnRequestId = iTnManager.GetL( *source );
+            CleanupStack::PopAndDestroy( source );
+            }
+        }
+    else 
+        {
+        if ( PreloadedExistsL() )
+            {
+            TBuf<KMaxPath> path;
+            TInt error = iModel.GetMyVideosCustomizationString( 
+			                        KCRVideoPlayerPreloadedVideoPath, path );
+            CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC( 
+                            path,
+                            KNullDesC );
+            
+            iTnRequestId = iTnManager.GetL( *source );
+            CleanupStack::PopAndDestroy( source );
+            }
+        }
 	}
 
 // -----------------------------------------------------------------------------
@@ -1202,3 +1288,37 @@
 
     return icon;
     }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoModelHandler::LastWatchedSetL()
+// -----------------------------------------------------------------------------
+//
+TBool CVcxHgMyVideosCategoryModelHandler::LastWatchedSetL()
+    {
+    TInt id;
+    if ( !iModel.GetLastWatchedIdL( id ) && id )
+        {
+        return ETrue;
+        }
+    else
+        {
+        return EFalse;
+        }
+    }
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoModelHandler::PreloadedExistsL()
+// -----------------------------------------------------------------------------
+//
+TBool CVcxHgMyVideosCategoryModelHandler::PreloadedExistsL()
+    {
+    TBuf<KMaxPath> path;
+    TInt error = iModel.GetMyVideosCustomizationString( KCRVideoPlayerPreloadedVideoPath, path );
+    if ( !error && path.Length() && BaflUtils::FileExists( iModel.FileServerSessionL(), path ) )
+        {
+        return ETrue;
+        }
+    else
+        {
+        return EFalse;
+        }
+    }
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosmainview.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosmainview.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 */
 
 
-// Version : %version: e92_37 %
+// Version : %version: 39 %
 
 // INCLUDE FILES
 #include <bldvariant.hrh>
@@ -373,7 +373,8 @@
                 }
             }
             break;
-        case EVcxHgMyVideosCmdDelete:
+        case EVcxHgMyVideosCmdDelete: // Fall through
+        case EVcxHgMyVideosCmdDeleteMarked:
             {
             if ( iModel->AppState() == CVcxHgMyVideosModel::EVcxMyVideosAppStateVideoIdle )
                 {
@@ -435,17 +436,22 @@
             }
             break;
         case EVcxHgMyVideosCmdCopy:
-        case EVcxHgMyVideosCmdMove:
+        case EVcxHgMyVideosCmdMove: // Fall through
+        case EVcxHgMyVideosCmdCopyMarked: // Fall through
+        case EVcxHgMyVideosCmdMoveMarked: // Fall through
             {
             if ( iModel->AppState() == CVcxHgMyVideosModel::EVcxMyVideosAppStateVideoIdle )
                 {
-                VideoListL()->HandleMoveOrCopyCommandL( aCommand == EVcxHgMyVideosCmdCopy ? 
-                                                        ETrue : EFalse );
+                VideoListL()->HandleMoveOrCopyCommandL(
+                        aCommand == EVcxHgMyVideosCmdCopy || aCommand == EVcxHgMyVideosCmdCopyMarked ?
+                        ETrue : EFalse );
                 }
             }
             break;
-        case EVcxHgMyVideosCmdSend:
+        case EVcxHgMyVideosCmdSend: // Fall through
+        case EVcxHgMyVideosCmdSendMarked:
             {
+            Cba()->DrawDeferred();
             VideoListL()->HandleSendL();
             break;
             }        
@@ -606,13 +612,10 @@
 void CVcxHgMyVideosMainView::DynInitMenuPaneL( TInt aResourceId,
                                                CEikMenuPane* aMenuPane )
     {
-    TBool showMoveAndCopySubmenu = EFalse;
-    TBool showCopy = EFalse;
-    TBool showMove = EFalse;
-
     if ( aResourceId == R_VCXHGMYVIDEOS_MAINVIEW_MENU )
         {
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdDelete, ETrue );
+        aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdDeleteMarked, ETrue );
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdResumeDownload, ETrue );
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdCancelDownload, ETrue );
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdSortSubMenu, ETrue );        
@@ -627,6 +630,8 @@
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdMemoryStatus, ETrue );
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdCopy, ETrue );
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdMove, ETrue );
+        aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdCopyMarked, ETrue );
+        aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdMoveMarked, ETrue );
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdMarkUnmarkSubMenu, ETrue);
                 
         if ( iModel->AppState() == CVcxHgMyVideosModel::EVcxMyVideosAppStateCategoryIdle )
@@ -636,14 +641,10 @@
             }
         else if ( iModel->AppState() == CVcxHgMyVideosModel::EVcxMyVideosAppStateVideoIdle )
             {
-            VideoListL()->ShowMoveAndCopyMenuItemsL( showMoveAndCopySubmenu, showCopy, showMove );
-            
             aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdPlay, EFalse );
-            aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdCopy, !showCopy );
-            aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdMove, !showMove );
             aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdMemoryStatus, EFalse );
             aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdSortSubMenu, EFalse );
-            
+
             // Video list handles initialisation of menu items specific to it.
             VideoListL()->DynInitMenuPaneL( aResourceId, aMenuPane );
             }
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -249,6 +249,9 @@
 //
 void CVcxHgMyVideosVideoListImpl::HandleOpenL( TInt /*aIndex*/ )
     {
+    // Reset the visible selection of the list.
+    iScroller->DrawDeferred();
+    
     if ( iModel.TouchSupport() )
         {    
         PlayCurrentVideoL();
@@ -622,6 +625,8 @@
             EndMarkingMode();
             break;
             }
+        default:
+            break;
         }
     
     iView.DynInitMskL();
@@ -629,33 +634,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoListImpl::ShowMoveAndCopyMenuItemsL()
-// -----------------------------------------------------------------------------
-//
-void CVcxHgMyVideosVideoListImpl::ShowMoveAndCopyMenuItemsL( 
-        TBool& aShowMoveAndCopySubmenu, TBool& aShowCopy, TBool& aShowMove )
-    {
-    RArray<TInt> operationTargets;
-    CleanupClosePushL( operationTargets );
-    
-    TRAPD( error, GetOperationTargetIndexesL( operationTargets ) );
-
-    if ( error != KErrNone )
-        {
-        aShowMoveAndCopySubmenu = aShowCopy = aShowMove = EFalse;
-        }
-	else
-        {
-        iVideoCopier->ShowMenuItemsL( operationTargets, 
-                                      aShowMoveAndCopySubmenu,
-                                      aShowCopy,
-                                      aShowMove );
-        }
-    
-    CleanupStack::PopAndDestroy( &operationTargets );
-    }
-
-// -----------------------------------------------------------------------------
 // CVcxHgMyVideosVideoListImpl::HandleMoveOrCopyCommandL() 
 // -----------------------------------------------------------------------------
 //
@@ -713,150 +691,67 @@
         }
 #endif
 
-    RArray<TInt> markedVideos;
-    CleanupClosePushL( markedVideos );
-    
-    iVideoModel->MarkedVideosL( markedVideos );
-    TInt highlight = Highlight();        
-    TInt count = iVideoModel->VideoCount();
-
-    TVcxMyVideosDownloadState dlState( EVcxMyVideosDlStateNone );
-    TBool progressivePlay( EFalse );
-    
-    if ( count > 0 && highlight >= 0 )
+    if ( aResourceId == R_VCXHGMYVIDEOS_MAINVIEW_MENU )
         {
-        dlState = iVideoModel->VideoDownloadState( highlight );
-        progressivePlay = iVideoModel->IsProgressivePlayPossible( highlight );
-        }
+        // Check if list has videos marked
+        RArray<TInt> markedVideos;
+        CleanupClosePushL( markedVideos );
+        iVideoModel->MarkedVideosL( markedVideos );
+        TBool videosMarked = ( markedVideos.Count() > 0 );
+        CleanupStack::PopAndDestroy( &markedVideos );
 
-    // Check if there are marked items on the list that can be deleted
-    TBool itemsToDelete( EFalse );
-    
-    for ( TInt i = 0; i < markedVideos.Count(); i++ )
-        {
-        if ( iVideoModel->VideoDownloadState( markedVideos[i] ) == EVcxMyVideosDlStateNone )
-            {    
-            itemsToDelete = ETrue;
-            break;
-            }
-        }
+        TInt highlight = Highlight();
+        TInt count = iVideoModel->VideoCount();
 
-    TBool showDelete = ( ( highlight >= 0 ) && ( count > 0 ) 
-                         && ( ( dlState == EVcxMyVideosDlStateNone && markedVideos.Count() == 0 ) 
-                         || itemsToDelete ) );
-    
-    if ( aResourceId == R_VCXHGMYVIDEOS_MAINVIEW_MENU )
-        {      
+        // Show play menuitem for non-touch
         if ( ! iModel.TouchSupport() )
             {
-            TBool showPlay = ( ( markedVideos.Count() == 0 ) && ( highlight >= 0 ) && ( count > 0 )
-                           && ( ( dlState == EVcxMyVideosDlStateNone ) || ( progressivePlay ) ) );
+            TBool showPlay = ( !videosMarked && ( highlight >= 0 ) && ( count > 0 ) );
             aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdPlay, ! showPlay );
             }
 
-        aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdDelete, ! showDelete );
-
-        TBool showCancel = ( ( markedVideos.Count() == 0 ) && ( highlight >= 0 ) && ( count > 0 )
-                             && ( dlState != EVcxMyVideosDlStateNone ) );
-        aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdCancelDownload, ! showCancel );
-
-        TBool showResume = showCancel && ( ( dlState == EVcxMyVideosDlStatePaused ) ||
-                                           ( dlState == EVcxMyVideosDlStateFailed ) );
-        aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdResumeDownload, ! showResume );
+        if ( count > 0 )
+            {
+            // Video details.
+            TBool showVideoDetails = ( !videosMarked && highlight >= 0 );
+            aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdVideoDetails, !showVideoDetails );
 
-        TBool showVideoDetails = ( ( markedVideos.Count() == 0 ) &&
-                                   ( highlight >= 0 ) && 
-                                   ( count > 0 ) && 
-                                   ( ( dlState == EVcxMyVideosDlStateNone ) ||
-                                     ( progressivePlay ) ) );        
-        
-        // Dont show file details if file isn't downloaded yet.
-        if( ( VideoModel().VideoDownloadState( Highlight() ) == EVcxMyVideosDlStateDownloading ) ||
-            ( VideoModel().VideoDownloadState( Highlight() ) == EVcxMyVideosDlStateFailed ) ||
-            ( VideoModel().VideoDownloadState( Highlight() ) == EVcxMyVideosDlStatePaused ) )
-            {
-            showVideoDetails = EFalse;
-            }
-        
-        aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdVideoDetails, ! showVideoDetails );        
+            // UPnP menu item. Item's behaviour follows video details item.
+            if ( showVideoDetails && iUPnP->IsApplicable() )
+                {
+                if ( iUPnP->IsStarted() )
+                    {
+                    aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdStopShowViaHomenet, EFalse);
+                    }
+                else
+                    {
+                    aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdShowViaHomenet, EFalse );
+                    }
+                }
 
-        // UPnP menu item. Item's behaviour follows video details item.     
-        if ( showVideoDetails && count > 0 && highlight >= 0 && iUPnP->IsApplicable() )
-            {
-            if ( iUPnP->IsStarted() )
+            // Move, copy, delete
+            DynInitMenuPaneFileOperationsL( aMenuPane, videosMarked );
+
+            // Send item
+            if ( highlight >= 0 || videosMarked )
                 {
-                aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdStopShowViaHomenet, EFalse);
+                AddSendItemToMenuPaneL( aMenuPane, videosMarked );
+                }
+
+#ifdef RD_VIDEO_AS_RINGING_TONE
+            // Assign (use as) menu item
+            if ( !videosMarked && highlight >= 0 )
+                {
+                aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdAiwAssign, EFalse );
                 }
             else
                 {
-                aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdShowViaHomenet, EFalse );
-                }
-            }
-        
-        // Send menu item.
-        if ( ( highlight >= 0 ) && ( count > 0 ) &&
-                ( dlState == EVcxMyVideosDlStateNone ) )
-            {
-            // Get total size for marked videos
-            RArray<TInt> operationTargets;
-            CleanupClosePushL( operationTargets );
-            
-            GetOperationTargetIndexesL( operationTargets );
-            TInt64 attachmentsTotalSize( 0 );
-            for ( TInt i = 0; i < operationTargets.Count(); i++ )
-                {
-                attachmentsTotalSize += iVideoModel->GetVideoSize( operationTargets[i] );
+                // Hide Assign (use as) menu item
+                aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdAiwAssign, ETrue );
                 }
-
-            IPTVLOGSTRING3_LOW_LEVEL( "CVcxHgMyVideosVideoListImpl::DynInitMenuPaneL() %d files with total size %ld", operationTargets.Count(), attachmentsTotalSize );
-            
-            // SendUi uses TInt for size, hide Send menu item for over 2GB attachments
-            if ( attachmentsTotalSize > 0 && attachmentsTotalSize < KMaxTInt )
-                {
-                // Place Send menu item on top of "Use as" (Assign) submenu
-                TInt sendItemIndex = 0;
-#ifdef RD_VIDEO_AS_RINGING_TONE                
-                aMenuPane->ItemAndPos( EVcxHgMyVideosCmdAiwAssign, sendItemIndex );
-#else
-                aMenuPane->ItemAndPos( EVcxHgMyVideosCmdSortSubMenu, sendItemIndex );
-#endif
-                // Add Send item to menu
-                TSendingCapabilities capabilities(
-                    0,
-                    attachmentsTotalSize,
-                    TSendingCapabilities::ESupportsAttachments );
-                SendUiL()->AddSendMenuItemL(
-                        *aMenuPane,
-                        sendItemIndex,
-                        EVcxHgMyVideosCmdSend,
-                        capabilities );
-                aMenuPane->SetItemSpecific( EVcxHgMyVideosCmdSend, ETrue );
-
-                // The Send item also needs to be flagged as a list query.
-                CEikMenuPaneItem::SData& itemData = aMenuPane->ItemData( EVcxHgMyVideosCmdSend );
-                itemData.iFlags |= EEikMenuItemSpecificListQuery;
-                }
-            CleanupStack::PopAndDestroy( &operationTargets );
-            }
-
-#ifdef RD_VIDEO_AS_RINGING_TONE
-        // Assign (use as) menu item
-        if ( ( markedVideos.Count() == 0 ) &&
-                ( highlight >= 0 ) && ( count > 0 ) &&
-                ( ( dlState == EVcxMyVideosDlStateNone ) ) )
-            {
-            aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdAiwAssign, EFalse );
-            }
-        else
-            {
-            // Hide Assign (use as) menu item
-            aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdAiwAssign, ETrue );
-            }
 #endif
 
-        // Marking submenu
-        if( count > 0 )
-            {
+            // Marking submenu
             // Show "Mark/Unmark" only if there are videos in the list
             aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdMarkUnmarkSubMenu, EFalse);
             }
@@ -867,10 +762,11 @@
             // Dont show "Sort by" if list is empty.
             aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdSortSubMenu, ETrue );
             }
-        
+
         // Hide "Settings" menu item
         aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdOpenSettings, ETrue );
         }
+
 #ifdef RD_VIDEO_AS_RINGING_TONE
     else if ( aResourceId == R_VCXHGMYVIDEOS_USE_AS_SUBMENU )
         {
@@ -895,7 +791,6 @@
         CleanupStack::PopAndDestroy( &operationTargets );
         }
 #endif
-    CleanupStack::PopAndDestroy( &markedVideos );
     }
 
 // -----------------------------------------------------------------------------
@@ -1172,3 +1067,104 @@
             }
         }
     }
+
+// ---------------------------------------------------------------------------
+// CVcxHgMyVideosVideoListImpl::AddSendItemToMenuPaneL()
+// ---------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoListImpl::AddSendItemToMenuPaneL(
+        CEikMenuPane* aMenuPane,
+        TBool aAddToOptions )
+    {
+    IPTVLOGSTRING_LOW_LEVEL( "CVcxHgMyVideosVideoListImpl::AddSendItemToMenuPaneL() enter" );
+    // Get total size of the videos that we're about to send
+    RArray<TInt> operationTargets;
+    CleanupClosePushL( operationTargets );
+
+    GetOperationTargetIndexesL( operationTargets );
+    TInt64 attachmentsTotalSize( 0 );
+    for ( TInt i = 0; i < operationTargets.Count(); i++ )
+        {
+        attachmentsTotalSize += iVideoModel->GetVideoSize( operationTargets[i] );
+        }
+
+    IPTVLOGSTRING3_LOW_LEVEL( "CVcxHgMyVideosVideoListImpl::AddSendItemToMenuPaneL() %d files with total size %ld", operationTargets.Count(), attachmentsTotalSize );
+
+    // SendUi uses TInt for size, hide Send menu item for over 2GB attachments
+    if ( attachmentsTotalSize > 0 && attachmentsTotalSize < KMaxTInt )
+        {
+        // Find place for Send menu item on top of "Use as" (Assign) or Sort submenu
+        TInt sendItemIndex = 0;
+#ifdef RD_VIDEO_AS_RINGING_TONE
+        aMenuPane->ItemAndPos( EVcxHgMyVideosCmdAiwAssign, sendItemIndex );
+#else
+        aMenuPane->ItemAndPos( EVcxHgMyVideosCmdSortSubMenu, sendItemIndex );
+#endif
+        // Add Send item to context menu
+        TSendingCapabilities capabilities(
+            0,
+            attachmentsTotalSize,
+            TSendingCapabilities::ESupportsAttachments );
+        SendUiL()->AddSendMenuItemL(
+                *aMenuPane,
+                sendItemIndex,
+                EVcxHgMyVideosCmdSend,
+                capabilities );
+        aMenuPane->SetItemSpecific( EVcxHgMyVideosCmdSend, ETrue );
+        // The Send item also needs to be flagged as a list query.
+        CEikMenuPaneItem::SData& itemData = aMenuPane->ItemData( EVcxHgMyVideosCmdSend );
+        itemData.iFlags |= EEikMenuItemSpecificListQuery;
+
+        // Add Send to Options menu
+        if ( aAddToOptions )
+            {
+            SendUiL()->AddSendMenuItemL(
+                    *aMenuPane,
+                    sendItemIndex,
+                    EVcxHgMyVideosCmdSendMarked,
+                    capabilities );
+            aMenuPane->SetItemSpecific( EVcxHgMyVideosCmdSendMarked, EFalse );
+            }
+        }
+    CleanupStack::PopAndDestroy( &operationTargets );
+    IPTVLOGSTRING_LOW_LEVEL( "CVcxHgMyVideosVideoListImpl::AddSendItemToMenuPaneL() return" );
+    }
+
+// ---------------------------------------------------------------------------
+// CVcxHgMyVideosVideoListImpl::DynInitMenuPaneFileOperationsL()
+// ---------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoListImpl::DynInitMenuPaneFileOperationsL(
+        CEikMenuPane* aMenuPane,
+        TBool aItemsMarked )
+    {
+    // Delete
+    TBool showDelete = ( ( Highlight() >= 0 ) || aItemsMarked );
+
+    // Move and copy
+    RArray<TInt> operationTargets;
+    CleanupClosePushL( operationTargets );
+
+    TRAPD( error, GetOperationTargetIndexesL( operationTargets ) );
+
+    TBool showMoveAndCopySubmenu( EFalse );
+    TBool showCopy( EFalse );
+    TBool showMove( EFalse );
+
+    if ( error == KErrNone )
+        {
+        iVideoCopier->ShowMenuItemsL( operationTargets,
+                                      showMoveAndCopySubmenu,
+                                      showCopy,
+                                      showMove );
+        }
+
+    aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdCopy, !showCopy );
+    aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdMove, !showMove );
+    aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdDelete, !showDelete );
+    aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdCopyMarked, !showCopy || !aItemsMarked );
+    aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdMoveMarked, !showMove || !aItemsMarked );
+    aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdDeleteMarked, !showDelete || !aItemsMarked );
+
+    CleanupStack::PopAndDestroy( &operationTargets );
+    }
--- a/videoplayback/inc/mpxvideobaseplaybackview.h	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/inc/mpxvideobaseplaybackview.h	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 18 %
+
+// Version : %version: 19 %
 
 
 // This file defines the API for VideoBasePlaybackView.dll
@@ -34,6 +35,7 @@
 #include "mpxvideoplaybackcontrol.hrh"
 #include "mpxvideoplaybackdisplayhandler.h"
 #include <mpxvideoplaybackdefs.h>
+#include <AknWsEventObserver.h>
 
 //  Constants
 
@@ -47,14 +49,14 @@
 
 class CMPXVideoPlaybackViewFileDetails;
 
-
 //  Class Definitions
 
 class CMPXVideoBasePlaybackView : public CAknView,
                                   public MMPXPlaybackObserver,
                                   public MMPXViewActivationObserver,
                                   public MMPXPlaybackCallback,
-                                  public MMPXCollectionObserver
+                                  public MMPXCollectionObserver,
+                                  public MAknWsEventObserver
 {
     public:
         ~CMPXVideoBasePlaybackView();
@@ -69,6 +71,8 @@
 
         void RetrieveFileNameAndModeL( CMPXCommand* aCmd );
 
+        void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
+
     protected:
 
         /**
@@ -349,6 +353,8 @@
 
         void HandleRealOneBitmapTimeoutL();
 
+        void SendWindowCommandL( TMPXVideoPlaybackCommand aCmd );
+
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
         TInt OpenDrmFileHandle64L( RFile64& aFile );
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
@@ -358,6 +364,7 @@
         MMPXViewUtility*                    iViewUtility;
         MMPXCollectionUtility*              iCollectionUtility;
         CMPXVideoPlaybackDisplayHandler*    iDisplayHandler;
+        CAknWsEventMonitor*                 iAknEventMonitor;
 
         TMPXPlaybackState                   iPlaybackState;
 
@@ -374,6 +381,7 @@
         TBool                               iCollectionMediaRequested;
         TBool                               iPdlReloading;
         TBool                               iRealOneDelayedPlay;
+        TBool                               iKeyboardInFocus;
 
         HBufC*                              iClipName;
 };
--- a/videoplayback/inc/mpxvideoplaybackmediadetailsviewer.h	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/inc/mpxvideoplaybackmediadetailsviewer.h	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  e003sa33#5 %
+// Version : %version:  e003sa33#6 %
 
 #ifndef MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
 #define MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
@@ -123,19 +123,19 @@
         void UpdateBackgroundBitmapL() const;
         
         /** 
-        * Timer callback for scroll filename timer
+        * Timer callback for scroll timer
         * @since 9.2 
         * @param aPtr Pointer to timers callback 
         * @return KErrNone 
         */ 
-        static TInt ScrollFilenameTimer( TAny* aPtr );
+        static TInt ScrollTimer( TAny* aPtr );
 
         /** 
-        * Handle Scroll Filename Timer
+        * Handle Scroll Timer
         * @since 9.2 
         * @return void 
         */ 
-        void HandleScrollFilenameTimerL();   
+        void HandleScrollTimerL();
         
         /** 
         * Determine the number of items to be shown in the viewer
@@ -150,9 +150,60 @@
         * @return the viewer rect
         */                   
         TRect CalculateViewerRectL();          
+
+        /**
+         * Update the text of filename label
+         */
+        void UpdateFilenameL();
+
+        /**
+         * Update the text of title label
+         */
+        void UpdateTitleL();
+
+    private:
+        
+        /**
+         * Scroll the too long text for some label
+         */
+        class TTextScroller
+        {
+            public:
+        
+                /**
+                 * Constructor
+                 */
+                TTextScroller();
+
+                /**
+                 * Check if the source text needs scrolling.
+                 */
+                TBool IsScrollNeeded();
+
+                /**
+                 * Check if the text of a label needs to be updated
+                 */
+                TBool IsUpdateNeeded();
+
+                /**
+                 * Scroll the source text, and append it to the destination text
+                 *
+                 * @param aSrcText the source text to be scrolled.
+                 * @param aDesText to which the scrolled text to be appended
+                 */
+                void ScrollText( const TDesC& aSrcText, TDes& aDesText );
+
+            private:
                 
+                TUint32		iDelayBeginningTick;
+                TInt		iTextScrollPos;
+                TBool		iDelay;
+                TBool		iScroll;
+                TInt		iSrcTextLen;
+        };
 
     private:    // Data
+        
         CMPXVideoPlaybackControlsController* iController;
         
         CEikLabel*                           iClipnameLabel;
@@ -168,11 +219,12 @@
 
         CFbsBitmap*                          iBackgroundBitmap;   
         CPeriodic*                           iScrollingTextTimer;
-        TInt                                 iScrollPosition;
-        TBool                                iShouldPauseScrolling;
         TRect                                iViewerRect;
         HBufC*                               iAdditionalString;
-        TUint32                              iScrollTimerDelayBeginningTick;
+        TTextScroller                        iFilenameScroller;
+        TTextScroller                        iTitleScroller;
+        // after every scrolling label has updated, draw them
+        TBool                                iScrolledTextUpdated; 
 };
 
 
--- a/videoplayback/inc/mpxvideoplaybackviewfiledetails.h	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/inc/mpxvideoplaybackviewfiledetails.h	Wed Apr 14 15:59:50 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 12 %
+// Version : %version: e003sa33#13 %
 
 
 #ifndef __MPXVIDEOPLAYBACKVIEWFILEDETAILS__
@@ -51,6 +51,16 @@
         * @return generated file name, ownership is transferred
         */
         IMPORT_C HBufC* GenerateFileNameL();
+        
+        /**
+         * Parse file title
+         * if title exists, then use it as title content directly.
+         * if title is null, then for streaming/live streaming clip,
+         * parse its file name as title content.
+         * 
+         * @return  generated file title, ownership is transferred
+         */
+        IMPORT_C HBufC* GenerateFileTitleL();
 
     private:
         //
--- a/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: ou1cpsw#21 %
+
+// Version : %version: 22 %
 
 
 #ifndef _CMPXVIDEOPLAYBACKCONTROLLER_H_
@@ -52,6 +53,7 @@
 class CMPXVideoSeeker;
 class CMpxVideoDrmHelper;
 class CHWRMLight;
+
 //
 //  CLASS DECLARATION
 //
@@ -94,7 +96,7 @@
         void HandleSettingChange( const TUid& aRepositoryUid,
                                   TUint32 aSettingId );
 
-        void OpenFileL( const TDesC& aMediaFile, RFile& aFile, TInt aPosition, TInt aAccessPointId = KUseDefaultIap );  
+        void OpenFileL( const TDesC& aMediaFile, RFile& aFile, TInt aPosition, TInt aAccessPointId = KUseDefaultIap );
 
         void HandleGeneralPlaybackCommandL( CMPXCommand& aCmd );
 
@@ -132,7 +134,7 @@
 
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
-        void OpenFile64L( const TDesC& aMediaFile, RFile64& aFile, TInt aPosition, TInt aAccessPointId = KUseDefaultIap ); 
+        void OpenFile64L( const TDesC& aMediaFile, RFile64& aFile, TInt aPosition, TInt aAccessPointId = KUseDefaultIap );
 
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
@@ -155,33 +157,35 @@
         void DetermineMediaTypeL();
 
         void ResetMemberVariables();
-        
+
         void StartLightsControl();
         void CancelLightsControl();
-        
+
         void EnableDisplayBacklight();
         void DisableDisplayBacklight();
-       
+
         static TInt HandleBackLightTimeout( TAny* aPtr );
         void DoHandleBackLightTimeout();
         void StartBackLightTimer();
         void CancelBackLightTimer();
-        
+
         void InitUserActivityTimerL();
         void RestartUserActivityTimer();
         void CancelUserActivityTimer();
         static TInt HandleUserActivityTimeout( TAny* aPtr );
         void DoHandleUserActivityTimeout();
-       
+
         TTimeIntervalMicroSeconds32 InitDisplayTimerL();
         void RestartDisplayTimer();
         void CancelDisplayTimer();
         static TInt HandleDisplayTimeout( TAny* aPtr );
         void DoHandleDisplayTimeout();
-        
+
         CHWRMLight* GetLightsL();
         void ReleaseLights();
 
+        TBool SendTvOutEventL( TBool aConnected, TBool aPlaybackAllowed );
+
     protected:
 
         /*
@@ -244,15 +248,14 @@
 
         // Timer for calling User::ResetInactivityTime() periodicallly while playing.
         // This keeps backligth on and screensaver off.
-        CPeriodic*                              iBackLightTimer;        
-                                                                        
+        CPeriodic*                              iBackLightTimer;
+
         // Timer to turn display lights off when playing to TV-out
-        CPeriodic*                              iDisplayTimer;         
+        CPeriodic*                              iDisplayTimer;
         TTimeIntervalMicroSeconds32             iDisplayTimerTimeout;
         // Timer monitoring user activity when TV-out is connected
-        CPeriodic*                              iUserActivityTimer;     
+        CPeriodic*                              iUserActivityTimer;
 
-        
         TBool                                   iSeekable;
 
         CMpxVideoDrmHelper*                     iDrmHelper;
--- a/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,8 @@
  *
 */
 
-// Version : %version: 50 %
+
+// Version : %version: 52 %
 
 
 //
@@ -41,7 +42,7 @@
 #include <e32std.h>
 #include <devsoundif.h>
 #include <avkondomainpskeys.h>
-#include <hwrmlight.h>  
+#include <hwrmlight.h>
 #include <centralrepository.h>  // For display timeout setting
 #include <hwrmlightdomaincrkeys.h>
 
@@ -164,7 +165,7 @@
     iBackLightTimer = CPeriodic::NewL( CActive::EPriorityStandard );
 
     iDrmHelper = CMpxVideoDrmHelper::NewL();
-    
+
     iSavedPosition = 0;
 }
 
@@ -185,7 +186,7 @@
 void CMPXVideoPlaybackController::OpenFileL( const TDesC& aMediaFile,
                                              RFile& aFile,
                                              TInt aPosition,
-                                             TInt aAccessPointId ) 
+                                             TInt aAccessPointId )
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::OpenFileL()"),
                    _L("file = %S"), &aMediaFile );
@@ -216,7 +217,7 @@
     SetPlaybackModeL();
 
     iSavedPosition = aPosition;
-    
+
     //
     //  Create accessory monitor to search for TV-Out events
     //
@@ -349,16 +350,16 @@
         delete iPlayer;
         iPlayer = NULL;
     }
-   
+
     if ( iUserActivityTimer )
     {
         iUserActivityTimer->Cancel();
         delete iUserActivityTimer;
         iUserActivityTimer = NULL;
     }
-    
+
     ReleaseLights();
-    
+
     CancelDisplayTimer();
 
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
@@ -495,7 +496,7 @@
             {
                 iSeekable = aCmd.ValueTObjectL<TBool>(KMPXMediaGeneralExtVideoSeekable);
 
-                if( iFileDetails )
+                if ( iFileDetails )
                 {
                     iFileDetails->iSeekable &= iSeekable;
                 }
@@ -1203,7 +1204,7 @@
             case EMPXVideoPlaying:
             {
                 iState = iPlayingState;
-                
+
                 //
                 //  If clip is audio only, stop the backlight timer and break switch
                 //  If clip has audio and video, proceed to the next case which will
@@ -1217,7 +1218,7 @@
                 {
                     CancelLightsControl();
                 }
-                
+
                 break;
             }
             case EMPXVideoPaused:
@@ -1378,9 +1379,9 @@
 
             if ( ! metaData->Name().CompareF( KSeekable ) )
             {
-                if ( ! metaData->Value().CompareF( KTrue ) )
+                if ( ! metaData->Value().CompareF( KFalse ) )
                 {
-                    iFileDetails->iSeekable = ETrue;
+                    iFileDetails->iSeekable = EFalse;
                 }
             }
             else if ( ! metaData->Name().CompareF( KLiveStream ) )
@@ -1751,9 +1752,9 @@
     return alarm;
 }
 
-// -----------------------------------------------------------------------------
-// CMPXVideoPlaybackController::IsKeyLocked
-// -----------------------------------------------------------------------------
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackController::IsKeyLocked
+// -------------------------------------------------------------------------------------------------
 //
 TBool CMPXVideoPlaybackController::IsKeyLocked()
 {
@@ -1765,55 +1766,13 @@
     return keylock;
 }
 
-//  ------------------------------------------------------------------------------------------------
-//    CMPXVideoPlaybackController::HandleTvOutEventL()
-//  ------------------------------------------------------------------------------------------------
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackController::SendTvOutEventL
+// -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackController::HandleTvOutEventL( TBool aConnected )
+TBool CMPXVideoPlaybackController::SendTvOutEventL( TBool aConnected, TBool aPlaybackAllowed )
 {
-    MPX_ENTER_EXIT( _L("CMPXVideoPlaybackController::HandleTvOutEventL()"),
-                    _L("aConnected = %d"), aConnected );
-
-    TBool playbackAllowed = ETrue;
-
-    if ( aConnected )
-    {
-        //
-        //  TV-Out accessory connected
-        //
-        if ( ! iAccessoryMonitor->IsTvOutPlaybackAllowed() )
-        {
-            //
-            //  Clip has DRM protection and TV-Out is connected
-            //  Pause playback and display info note
-            //
-            DoHandleCommandL( EPbCmdPause );
-
-            playbackAllowed = EFalse;
-
-            iState->SendErrorToViewL( KMPXVideoTvOutPlaybackNotAllowed );
-        }
-        else
-        {
-            // If lights are being controlled enable display timer so that screen backlight will be turned
-            // of after timeout.
-            if ( iBackLightTimer->IsActive() )
-            {
-                RestartDisplayTimer();
-            }
-         } 
-    }
-    else 
-    {
-        // TV out disconnected
-        CancelDisplayTimer();
-        
-        // Ensure that lights are on after this 
-        ReleaseLights();
-        
-        // Pause playback since TV-Out accessory has been disconnected.
-        DoHandleCommandL( EPbCmdPause );
-    }
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::SendTvOutEventL()"));
 
     //
     //  Send notice to the playback view with TV-Out connection status
@@ -1826,7 +1785,7 @@
     message->SetTObjectValueL<TMPXVideoPlaybackCommand>
         ( KMPXMediaVideoPlaybackCommand, EPbCmdTvOutEvent );
     message->SetTObjectValueL<TInt>( KMPXMediaVideoTvOutConnected, aConnected );
-    message->SetTObjectValueL<TInt>( KMPXMediaVideoTvOutPlayAllowed, playbackAllowed );
+    message->SetTObjectValueL<TInt>( KMPXMediaVideoTvOutPlayAllowed, aPlaybackAllowed );
 
     iMPXPluginObs->HandlePlaybackMessage( message, KErrNone );
 
@@ -1834,6 +1793,60 @@
 }
 
 //  ------------------------------------------------------------------------------------------------
+//    CMPXVideoPlaybackController::HandleTvOutEventL()
+//  ------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPlaybackController::HandleTvOutEventL( TBool aConnected )
+{
+    MPX_ENTER_EXIT( _L("CMPXVideoPlaybackController::HandleTvOutEventL()"),
+                    _L("aConnected = %d"), aConnected );
+
+    TBool playbackAllowed = iAccessoryMonitor->IsTvOutPlaybackAllowed();
+
+    SendTvOutEventL( aConnected, playbackAllowed );
+
+    //
+    //  Check playback status of clip with new Tv-Out status
+    //
+    if ( aConnected )
+    {
+        //
+        //  TV-Out accessory connected
+        //
+        if ( ! playbackAllowed )
+        {
+            //
+            //  Clip has DRM protection and TV-Out is connected
+            //  Pause playback and display info note
+            //
+            DoHandleCommandL( EPbCmdPause );
+
+            iState->SendErrorToViewL( KMPXVideoTvOutPlaybackNotAllowed );
+        }
+        else
+        {
+            // If lights are being controlled enable display timer so that screen backlight will be turned
+            // of after timeout.
+            if ( iBackLightTimer->IsActive() )
+            {
+                RestartDisplayTimer();
+            }
+         }
+    }
+    else
+    {
+        // TV out disconnected
+        CancelDisplayTimer();
+
+        // Ensure that lights are on after this
+        ReleaseLights();
+
+        // Pause playback since TV-Out accessory has been disconnected.
+        DoHandleCommandL( EPbCmdPause );
+    }
+}
+
+//  ------------------------------------------------------------------------------------------------
 //    CMPXVideoPlaybackController::CancelBackLightTimer
 //  ------------------------------------------------------------------------------------------------
 void  CMPXVideoPlaybackController::CancelBackLightTimer()
@@ -1844,7 +1857,6 @@
     {
         iBackLightTimer->Cancel();
     }
-    
 }
 
 //  ------------------------------------------------------------------------------------------------
@@ -1861,7 +1873,6 @@
             KMPXBackLightTimeOut,
             TCallBack( CMPXVideoPlaybackController::HandleBackLightTimeout, this ));
     }
-    
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -1881,13 +1892,13 @@
 void CMPXVideoPlaybackController::DoHandleBackLightTimeout()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::DoHandleBackLightTimeout()"));
-    
+
     TBool tvOutConnected( EFalse );
     if ( iAccessoryMonitor )
     {
         tvOutConnected = iAccessoryMonitor->IsTvOutConnected();
     }
-    
+
     // User activity timer runs always when TV-out is connected
     // it keeps resetting display timer and keeps lights on whenever there is user activity
     if ( tvOutConnected )
@@ -1896,9 +1907,9 @@
         // Cancel activity timer. Otherwise resetting inactivity time would fire user activity detection
         CancelUserActivityTimer();
     }
-        
+
     User::ResetInactivityTime();
-    
+
     if ( tvOutConnected )
     {
         // Restart user activity timer. It must be running between backlight timer intervals so that backlight
@@ -1916,7 +1927,7 @@
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::StartLightsControl()"));
 
     StartBackLightTimer();
-             
+
     if (iAccessoryMonitor )
     {
         if ( iAccessoryMonitor->IsTvOutConnected() )
@@ -1933,21 +1944,21 @@
 void CMPXVideoPlaybackController::CancelLightsControl()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::CancelLightsControl()"));
-	
+
     // This is called whenever there is no need to keep screensaver of anymore
-    // This means that also displaytimer and activity monitoring can be stopped. 
+    // This means that also displaytimer and activity monitoring can be stopped.
     // This method is not correct place for these calls
     CancelBackLightTimer();
-   
+
     CancelUserActivityTimer();
-    
+
     CancelDisplayTimer();
-	
+
     // Ensure that lights are on
     EnableDisplayBacklight();
-    
-	// Release lights if releserved
-    ReleaseLights();  
+
+    // Release lights if releserved
+    ReleaseLights();
 }
 
 
@@ -1958,23 +1969,22 @@
 TTimeIntervalMicroSeconds32 CMPXVideoPlaybackController::InitDisplayTimerL()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::InitDisplayTimerL()"));
-	
+
     if ( !iDisplayTimer )
     {
         iDisplayTimer = CPeriodic::NewL( CPeriodic::EPriorityStandard );
-		
-        MPX_DEBUG(_L("CMPXVideoPlaybackController::InitDisplayTimerL() - created") );	
-        
+
+        MPX_DEBUG(_L("CMPXVideoPlaybackController::InitDisplayTimerL() - created") );
     }
-   
+
     if ( iDisplayTimerTimeout.Int() == 0 )
     {
         // Get the display light time-out value from CenRep
-        CRepository* repository = CRepository::NewLC( KCRUidLightSettings  );    
+        CRepository* repository = CRepository::NewLC( KCRUidLightSettings  );
         // What's the timeout value (in seconds ) for the display light?
         TInt displayTimeOut ( 0 );
         repository->Get( KDisplayLightsTimeout, displayTimeOut );
-        
+
         if ( ( displayTimeOut * KMPXMicroSecondsInASecond ) > KMaxTInt )
         {
             iDisplayTimerTimeout = KMaxTInt;
@@ -1983,15 +1993,14 @@
         {
             iDisplayTimerTimeout = displayTimeOut * KMPXMicroSecondsInASecond;
         }
-        
+
         CleanupStack::PopAndDestroy( repository );
-    }     
-    
-    
+    }
+
     MPX_DEBUG( _L("CMPXVideoPlaybackController::InitDisplayTimerL Timeout(%d)"), iDisplayTimerTimeout.Int() );
-	
+
     // Convert the timeout value to microseconds
-    return iDisplayTimerTimeout;   
+    return iDisplayTimerTimeout;
 }
 
 // -----------------------------------------------------------------------------
@@ -2006,29 +2015,28 @@
     // Leave system to safe state if following leaves. Lights stay on
     MPX_TRAPD(err, displayTimeOut=InitDisplayTimerL(); )
     if ( err == KErrNone )
-    {   
+    {
         // check if the display timer is running and cancel it
         if ( iDisplayTimer->IsActive() )
         {
             iDisplayTimer->Cancel();
         }
-      
+
         MPX_DEBUG( _L("CMPXVideoPlaybackController::RestartDisplayTimer() restarting displayTimer to=%d ms"), displayTimeOut.Int() );
-        
+
         iDisplayTimer->Start( displayTimeOut, displayTimeOut,
             TCallBack( CMPXVideoPlaybackController::HandleDisplayTimeout, this ) );
     }
-    
 }
 
 // -----------------------------------------------------------------------------
 // CMPXVideoPlaybackController::CancelDisplayTimer
 // -----------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackController::CancelDisplayTimer() 
+void CMPXVideoPlaybackController::CancelDisplayTimer()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::CancelDisplayTimer"));
-    
+
     if ( iDisplayTimer )
     {
         if ( iDisplayTimer->IsActive() )
@@ -2071,21 +2079,21 @@
 //  ------------------------------------------------------------------------------------------------
 //  CMPXVideoPlaybackController::EnableDisplayBacklight
 //  ------------------------------------------------------------------------------------------------
-// 
+//
 void CMPXVideoPlaybackController::EnableDisplayBacklight()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::EnableDisplayBacklight()"));
-    
+
     // ELightStatusUnknown - We are not controlling lights and we don't care about lights
-    // ELightOn            - Ligths are certainly on 
+    // ELightOn            - Ligths are certainly on
     MPX_DEBUG(_L("CMPXVideoPlaybackController::EnableDisplayBacklight() iLightStatus=%d"), iLightStatus );
-    
+
     // We are responsible of turning lights on only if we have switched them off.
     if ( iLightStatus == CHWRMLight::ELightOff )
     {
 
         MPX_TRAPD( err,
-        {   
+        {
             // Following GetLightsL() call will not leave.
             // This call should not result to creation of CHWRMLight in this case
             // because CHWRMLight was created when lights were turned off.
@@ -2093,105 +2101,103 @@
             if ( lights->LightStatus(CHWRMLight::EPrimaryDisplay) == CHWRMLight::ELightOff )
             {
                 MPX_DEBUG(_L("CMPXVideoPlaybackController::EnableDisplayBacklight() enabling") );
-			
+
                 lights->LightOnL( CHWRMLight::EPrimaryDisplay, 0  );
                 iLightStatus = CHWRMLight::ELightOn;
             }
         } );
-        
     }
-   
 }
 
 //  ------------------------------------------------------------------------------------------------
 //  CMPXVideoPlaybackController::DisableDisplayBacklight
 //  ------------------------------------------------------------------------------------------------
-// 
+//
 void CMPXVideoPlaybackController::DisableDisplayBacklight()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::DisableDisplayBacklight()"));
-       
+
     // No major harm done if following block leaves. Lights are left on
     MPX_TRAPD( err,
-    {  
+    {
         CHWRMLight* lights = GetLightsL();
         if ( lights->LightStatus(CHWRMLight::EPrimaryDisplay) == CHWRMLight::ELightOn )
         {
            MPX_DEBUG(_L("CMPXVideoPlaybackController::DisableDisplayBacklight() disabling") );
-		   
+
            lights->LightOffL( CHWRMLight::EPrimaryDisplay, 0  );
            iLightStatus = CHWRMLight::ELightOff;
         }
     } );
-   
 }
 
 
 //  ------------------------------------------------------------------------------------------------
 //  CMPXVideoPlaybackController::InitUserActivityTimer
 //  ------------------------------------------------------------------------------------------------
-// 
+//
 void CMPXVideoPlaybackController::InitUserActivityTimerL()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::InitUserActivityTimerL()"));
-    
+
     iUserActivityTimer = CPeriodic::NewL( CActive::EPriorityStandard);
-    
-    // This timer will not run to the end. Timer will be canceled and reset at backlight timeout.    
+
+    // This timer will not run to the end. Timer will be canceled and reset at backlight timeout.
     iUserActivityTimer->Start(
         0,
         KMPXInactivityTimeout,
         TCallBack( CMPXVideoPlaybackController::HandleUserActivityTimeout, this ));
-    
 }
 
 //  ------------------------------------------------------------------------------------------------
 //  CMPXVideoPlaybackController::RestartUserActivityTimer
 //  ------------------------------------------------------------------------------------------------
-// 
-void CMPXVideoPlaybackController::RestartUserActivityTimer() 
+//
+void CMPXVideoPlaybackController::RestartUserActivityTimer()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::RestartUserActivityTimer()"));
-    
+
     if ( !iUserActivityTimer )
     {
        // This is first call. Create and initialize timer
        MPX_TRAPD( err,
-       {   
+       {
            InitUserActivityTimerL();
        } );
-       // If user activity timer creation fails we can't detect user activity and 
-       // get lights back on when user taps screen. 
+
+       // If user activity timer creation fails we can't detect user activity and
+       // get lights back on when user taps screen.
        // Leave lights on.
        if ( err != KErrNone )
-       { 
-           EnableDisplayBacklight(); 
-       }  
+       {
+           EnableDisplayBacklight();
+       }
     }
-      
+
     if ( iUserActivityTimer )
     {
         if ( iUserActivityTimer->IsActive() )
         {
             iUserActivityTimer->Cancel();
-        }            
+        }
+
         // Not interested about inactivity callback, only activity
-        // If CPeriodic::Inactivity is started with argument 0 
+        // If CPeriodic::Inactivity is started with argument 0
         // timer will fire when system's user inactivity timer resets.
         iUserActivityTimer->Inactivity( 0 );
-    } 
+    }
 }
 
 //  ------------------------------------------------------------------------------------------------
 //  CMPXVideoPlaybackController::CancelUserActivityTimer
 //  ------------------------------------------------------------------------------------------------
-// 
-void CMPXVideoPlaybackController::CancelUserActivityTimer() 
+//
+void CMPXVideoPlaybackController::CancelUserActivityTimer()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::CancelUserActivityTimer()"));
-	
-    if  ( iUserActivityTimer ) 
-    {   
+
+    if  ( iUserActivityTimer )
+    {
         if ( iUserActivityTimer->IsActive() )
         {
             iUserActivityTimer->Cancel();
@@ -2202,35 +2208,35 @@
 //  ------------------------------------------------------------------------------------------------
 //  CMPXVideoPlaybackController::HandleUserActivityTimeout
 //  ------------------------------------------------------------------------------------------------
-// 
+//
 TInt CMPXVideoPlaybackController::HandleUserActivityTimeout( TAny* aPtr )
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::HandleUserActivityTimeout()"));
-	
+
     static_cast<CMPXVideoPlaybackController*>(aPtr)->DoHandleUserActivityTimeout();
-    return KErrNone;     
+    return KErrNone;
 }
 
 //  ------------------------------------------------------------------------------------------------
 //  CMPXVideoPlaybackController::DoHandleUserActivityTimeout
 //  ------------------------------------------------------------------------------------------------
-// 
+//
 void CMPXVideoPlaybackController::DoHandleUserActivityTimeout()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::DoHandleUserActivityTimeout()"));
-    
+
     // Act only once for detected activity.
-    if ( iUserActivityTimer->IsActive() ) 
+    if ( iUserActivityTimer->IsActive() )
     {
         iUserActivityTimer->Cancel();
     }
-    
+
     // iUserActivityTimer runs when TV-out is connected and playback with video is going on
-    // This timer fires in two situations. 
+    // This timer fires in two situations.
     // a) Lights are off and user activity is detected - Turn lights on and restart display timer
     // b) Lights are on and user activity is detected - restart display timer to prevent lights go off
     EnableDisplayBacklight();
-    
+
     // Start counting down to next lights off
     RestartDisplayTimer();
 }
@@ -2242,8 +2248,8 @@
 CHWRMLight* CMPXVideoPlaybackController::GetLightsL()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::GetLightsL()"));
-	
-    if ( !iLight ) 
+
+    if ( !iLight )
     {
         MPX_DEBUG( _L("CMPXVideoPlaybackController::GetLightsL() - creating") );
         iLight = CHWRMLight::NewL();
@@ -2258,13 +2264,13 @@
 void CMPXVideoPlaybackController::ReleaseLights()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::ReleaseLights()"));
-	
+
     if ( iLight )
     {
-        // If iLights was created when ReleaseLights was called then TV out must be connected and lights may be off. 
+        // If iLights was created when ReleaseLights was called then TV out must be connected and lights may be off.
         // This call ensures that lights are on again.
         EnableDisplayBacklight();
-		
+
         MPX_DEBUG( _L("CMPXVideoPlaybackController::ReleaseLights() - deleting") );
         delete iLight;
         iLight = NULL;
@@ -2379,7 +2385,7 @@
         iFileHandle64.Close();
     }
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
-    
+
     // reset to True
     iSeekable = ETrue;
 
@@ -2484,8 +2490,8 @@
     DetermineMediaTypeL();
     SetPlaybackModeL();
 
-    iSavedPosition = aPosition; 
-    
+    iSavedPosition = aPosition;
+
     //
     //  Create accessory monitor to search for TV-Out events
     //
--- a/videoplayback/videohelix/src/mpxvideoplaybackmode.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackmode.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: e003sa33#21 %
+// Version : %version: 22 %
 
 
 
@@ -199,11 +199,12 @@
 }
 
 //  ------------------------------------------------------------------------------------------------
-//  CMPXVideoPlaybackMode::CanPlayNow
+//  CMPXVideoPlaybackMode::CanPlayNow()
 //  ------------------------------------------------------------------------------------------------
 TBool CMPXVideoPlaybackMode::CanPlayNow()
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackMode::CanPlayNow"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackMode::CanPlayNow"));
+
     TBool playAllowed = EFalse;
 
     if ( iVideoPlaybackCtlr->iAppInForeground && iVideoPlaybackCtlr->iAllowAutoPlay )
@@ -362,31 +363,34 @@
         TInt apMaxLen = 3;
 
         MPX_TRAPD( err,
-                   HBufC8* accessPoint = HBufC8::NewLC( KMMFAccessPoint().Length() + apMaxLen );
-                   accessPoint->Des().Format( KMMFAccessPoint, iVideoPlaybackCtlr->iAccessPointId );
+        {
+            HBufC8* accessPoint = HBufC8::NewLC( KMMFAccessPoint().Length() + apMaxLen );
+            accessPoint->Des().Format( KMMFAccessPoint, iVideoPlaybackCtlr->iAccessPointId );
 
-                   tempBuf = HBufC8::NewLC( accessPoint->Length() );
-                   tempBuf->Des().Copy( accessPoint->Des() );
+            tempBuf = HBufC8::NewLC( accessPoint->Length() );
+            tempBuf->Des().Copy( accessPoint->Des() );
 
-                   if ( tempBuf )
-                   {
-                       iVideoPlaybackCtlr->iPlayer->CustomCommandSync( destinationPckg,
-                                                            EMMFROPControllerSetApplicationConfig,
-                                                            tempBuf->Des(),
-                                                            savePckg );
-                   }
+            if ( tempBuf )
+            {
+                iVideoPlaybackCtlr->iPlayer->CustomCommandSync(
+                                                 destinationPckg,
+                                                 EMMFROPControllerSetApplicationConfig,
+                                                 tempBuf->Des(),
+                                                 savePckg );
+            }
 
-                   CleanupStack::PopAndDestroy(2);   // accessPoint, tempBuf 
-                );
+            CleanupStack::PopAndDestroy(2);
+        } );
     }
 }
 
 //  ------------------------------------------------------------------------------------------------
-//  CMPXStreamingPlaybackMode::CanPlayNow
+//    CMPXStreamingPlaybackMode::CanPlayNow
 //  ------------------------------------------------------------------------------------------------
 TBool CMPXStreamingPlaybackMode::CanPlayNow()
 {
-    MPX_DEBUG(_L("CMPXStreamingPlaybackMode::CanPlayNow"));
+    MPX_ENTER_EXIT(_L("CMPXStreamingPlaybackMode::CanPlayNow"));
+
     TBool playAllowed = EFalse;
 
     if ( iVideoPlaybackCtlr->iAppInForeground && iVideoPlaybackCtlr->iAllowAutoPlay )
@@ -425,6 +429,7 @@
     MPX_ENTER_EXIT(_L("CMPXStreamingPlaybackMode::IsTvOutAllowedL(1)"));
     return ETrue;
 }
+
 //  ------------------------------------------------------------------------------------------------
 //    CMPXStreamingPlaybackMode::HandlePause()
 //  ------------------------------------------------------------------------------------------------
@@ -440,9 +445,10 @@
         {
             iVideoPlaybackCtlr->ChangeState( EMPXVideoPaused );
 
-            iVideoPlaybackCtlr->iMPXPluginObs->HandlePluginEvent( MMPXPlaybackPluginObserver::EPPaused,
-                                                                  0,
-                                                                  err );
+            iVideoPlaybackCtlr->iMPXPluginObs->HandlePluginEvent(
+                                                   MMPXPlaybackPluginObserver::EPPaused,
+                                                   0,
+                                                   err );
         }
         else
         {
--- a/videoplayback/videohelix/src/mpxvideoplaybackstate.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackstate.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e003sa33#36 %
+// Version : %version: 37 %
 
 
 //
@@ -116,8 +116,6 @@
 
 //  ------------------------------------------------------------------------------------------------
 //    CMPXVideoPlaybackState::HandlePause()
-//
-//   @@FP for now we are assuming that Pause is only valid for Playing state
 //  ------------------------------------------------------------------------------------------------
 void CMPXVideoPlaybackState::HandlePause()
 {
@@ -187,8 +185,6 @@
 void CMPXVideoPlaybackState::HandleBackground()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackState::HandleBackground()"));
-
-    // Just pause the plackback
     HandlePause();
 }
 
@@ -526,7 +522,7 @@
             TMPXAttribute( KMPXMediaVideoDrmProtected ),
             iVideoPlaybackCtlr->iFileDetails->iDrmProtected );
     }
-    
+
     //
     //  Description
     //
@@ -537,7 +533,7 @@
             TMPXAttribute( KMPXMediaVideoDescription ),
             *( iVideoPlaybackCtlr->iFileDetails->iDescription ) );
     }
-    
+
     //
     //  Location
     //
@@ -548,7 +544,7 @@
             TMPXAttribute( KMPXMediaVideoLocation ),
             *( iVideoPlaybackCtlr->iFileDetails->iLocation ) );
     }
-    
+
     //
     //  Copyright
     //
@@ -559,7 +555,7 @@
             TMPXAttribute( KMPXMediaVideoCopyright ),
             *( iVideoPlaybackCtlr->iFileDetails->iCopyright ) );
     }
- 
+
     //
     //  Language
     //
@@ -570,7 +566,7 @@
             TMPXAttribute( KMPXMediaVideoLanguage ),
             *( iVideoPlaybackCtlr->iFileDetails->iLanguage ) );
     }
-     
+
     //
     //  Keywords
     //
@@ -580,7 +576,7 @@
         aMedia->SetTextValueL(
             TMPXAttribute( KMPXMediaVideoKeywords ),
             *( iVideoPlaybackCtlr->iFileDetails->iKeywords ) );
-    }        
+    }
 }
 
 //  ------------------------------------------------------------------------------------------------
@@ -673,6 +669,13 @@
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackState::CommandHandleBackground()"));
 
+    //
+    //  Block playback in the following cases:
+    //  -  App is not in foreground
+    //  -  Alarm
+    //  -  Phone call
+    //  -  Video call
+    //
     if ( !iVideoPlaybackCtlr->iAppInForeground ||
          iVideoPlaybackCtlr->IsAlarm() ||
          iVideoPlaybackCtlr->IsPhoneCall() ||
@@ -689,7 +692,7 @@
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackState::CommandHandleForeground()"));
 
-    if ( !iVideoPlaybackCtlr->IsActivePhoneCall() )
+    if ( ! iVideoPlaybackCtlr->IsActivePhoneCall() )
     {
         iVideoPlaybackCtlr->iAllowAutoPlay = ETrue;
     }
@@ -979,20 +982,20 @@
     if ( aError == KErrNone )
     {
         iVideoPlaybackCtlr->iPlaybackMode->HandleOpenComplete();
-		
+
         //
-		//  call setposition with converted value saved in openfile
+        //  call setposition with converted value saved in openfile
         //
-		if ( iVideoPlaybackCtlr->iSavedPosition > 0 )
-        {    
+        if ( iVideoPlaybackCtlr->iSavedPosition > 0 )
+        {
             MPX_DEBUG(_L("CMPXInitialisingState::HandleOpenComplete()  iSavedPosition %d"), iVideoPlaybackCtlr->iSavedPosition );
-                
+
             TInt64 pos( iVideoPlaybackCtlr->iSavedPosition );
             pos *= KPbMilliMultiplier;
-            
+
             MPX_TRAPD( err, iVideoPlaybackCtlr->iPlayer->SetPositionL( pos ) );
         }
-               
+
         MPX_DEBUG(_L("CMPXInitialisingState::HandleOpenComplete()  Sending Prepare()"));
 
         iVideoPlaybackCtlr->iPlayer->Prepare();
@@ -1747,8 +1750,9 @@
         }
         else
         {
-            //  delayed pause :
-            //  background event was received while we were in buffering state
+            //
+            //  Delayed pause, background event was received while we were in buffering state
+            //
             iVideoPlaybackCtlr->iPlaybackMode->HandlePause();
         }
     }
@@ -1775,14 +1779,11 @@
 }
 
 //  ------------------------------------------------------------------------------------------------
-//  CMPXBufferingState::HandleBackground()
+//    CMPXBufferingState::HandleBackground()
 //  ------------------------------------------------------------------------------------------------
 void CMPXBufferingState::HandleBackground()
 {
     MPX_DEBUG(_L("CMPXBufferingState::HandleBackground()"));
-
-    // we are in buffering state and received a background event
-    // we cannot pause now but need to pause when buffering is complete
     iVideoPlaybackCtlr->iPlaybackMode->HandleBackground();
 }
 
@@ -1793,8 +1794,10 @@
 {
     MPX_DEBUG(_L("CMPXBufferingState::HandleForeground()"));
 
-    // we are in buffering state and received a background event
-    // we cannot pause now but need to pause when buffering is complete
+    //
+    //  We are in buffering state and received a background and foreground event
+    //  playback will continue when buffering is complete
+    //
 }
 
 //  ------------------------------------------------------------------------------------------------
@@ -1888,7 +1891,8 @@
 //  ------------------------------------------------------------------------------------------------
 void CMPXSeekingState::HandleBackground()
 {
-    MPX_DEBUG(_L("CMPXSeekingState::HandleBackground()"));
+    MPX_ENTER_EXIT(_L("CMPXSeekingState::HandleBackground()"));
+
     MPX_TRAPD( err, HandleStopSeekL() );
     iVideoPlaybackCtlr->iPlaybackMode->HandleBackground();
 }
@@ -1898,7 +1902,8 @@
 //  ------------------------------------------------------------------------------------------------
 void CMPXSeekingState::HandlePause()
 {
-    MPX_DEBUG(_L("CMPXSeekingState::HandlePause()"));
+    MPX_ENTER_EXIT(_L("CMPXSeekingState::HandlePause()"));
+
     MPX_TRAPD( err, HandleStopSeekL() );
     iVideoPlaybackCtlr->iPlaybackMode->HandlePause();
 }
--- a/videoplayback/videohelix/src/mpxvideoseeker.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoseeker.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 8 %
+// Version : %version: 9 %
 
 
 // INCLUDE FILES
@@ -31,7 +31,7 @@
 const TInt KDefaultPlaySpeed(100);        // 1x
 const TInt KDefaultTrickPlaySpeed(400);   // 4x
 #else
-const TInt KTrickPlayTimeout(5000000);    // 5 sec
+const TInt KTrickPlayTimeout(2000000);    // 2 sec
 const TInt KSpeedInterval(125000);        // 125 msec
 const TInt KDurationA(90000000);          // 90 sec
 const TInt KDurationB(180000000);         // 180 sec
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrol.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrol.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 19 %
+// Version : %version: e003sa33#20 %
 
 
 // INCLUDE FILES
@@ -562,6 +562,9 @@
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::ResetControl()"));
 
+    iControl->SetPointerCapture( EFalse );
+    iControl->ClaimPointerGrab( EFalse );
+    
     switch( iControlIndex )
     {
         case EMPXButtonBar:
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: e003sa33#31 %
+// Version : %version: 32 %
 
 
 // INCLUDE FILES
@@ -1239,7 +1239,7 @@
 //
 void CMPXVideoPlaybackControlsController::HideAllControls()
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::HideAllControls()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::HideAllControls()"));
 
     ResetDisappearingTimers( EMPXTimerCancel );
 
@@ -1255,7 +1255,8 @@
 //
 void CMPXVideoPlaybackControlsController::ShowControls()
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::ShowControls() iState = %d"), iState);
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::ShowControls()"),
+                   _L("iState = %d"), iState );
 
     CloseMediaDetailsViewer();
 
@@ -1299,7 +1300,7 @@
 //
 void CMPXVideoPlaybackControlsController::UpdateControlsVisibility()
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::UpdateControlsVisibility()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::UpdateControlsVisibility()"));
 
     HideAllControls();
     ShowControls();
@@ -1914,6 +1915,8 @@
 //
 void CMPXVideoPlaybackControlsController::CloseMediaDetailsViewer()
 {
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::CloseMediaDetailsViewer()"));
+
     if ( iMediaDetailsViewerControl )
     {
         iMediaDetailsViewerControl->MakeVisible(EFalse);
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackmediadetailsviewer.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackmediadetailsviewer.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version:  e003sa33#16 %
+// Version : %version:  e003sa33#17 %
 
 
 // INCLUDE FILES
@@ -65,7 +65,6 @@
 CMPXVideoPlaybackMediaDetailsViewer::CMPXVideoPlaybackMediaDetailsViewer(
     CMPXVideoPlaybackControlsController* aController )
     : iController( aController )
-    , iScrollTimerDelayBeginningTick( KInvalidTick )
 {
 }
 
@@ -88,14 +87,11 @@
     TSize bitmapSize = Rect().Size();
     User::LeaveIfError( iBackgroundBitmap->Create( bitmapSize, EColor16MA ) );
 
-    iScrollPosition = 0;
     iScrollingTextTimer = CPeriodic::NewL( CActive::EPriorityStandard );
     iScrollingTextTimer->Start(
                 0,
                 175000,
-                TCallBack( CMPXVideoPlaybackMediaDetailsViewer::ScrollFilenameTimer, this ) );
-
-    iShouldPauseScrolling = EFalse;
+                TCallBack( CMPXVideoPlaybackMediaDetailsViewer::ScrollTimer, this ) );
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -299,36 +295,53 @@
         CleanupStack::PushL( heading );
 
         TBuf<KMediaDetailsViewerMaxBufLen> licenseField;
-        licenseField.Append(KLeftMargin);
+        licenseField.Append( KLeftMargin );
         licenseField.Append( *heading );
-        iLicenseLabel->OverrideColorL(EColorLabelText, KRgbDarkBlue);
-        iLicenseLabel->SetTextL(licenseField);
-        iLicenseLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
-        iLicenseLabel->SetLabelAlignment(ELayoutAlignCenter);
-        iLicenseLabel->SetUnderlining(ETrue);
+        iLicenseLabel->OverrideColorL( EColorLabelText, KRgbDarkBlue );
+        iLicenseLabel->SetTextL( licenseField );
+        iLicenseLabel->SetAllMarginsTo( KMediaDetailsViewerItemMargin );
+        iLicenseLabel->SetLabelAlignment( ELayoutAlignCenter );
+        iLicenseLabel->SetUnderlining( ETrue );
         iLicenseLabel->MakeVisible( ETrue );
         rowsAdded++;
 
         CleanupStack::PopAndDestroy( heading );
     }
+    
+    // Title
+    HBufC* fileTitle = iController->FileDetails()->GenerateFileTitleL();
+    
+    if ( fileTitle && fileTitle->Length() )
+    {
+        // Title gets populated by UpdateTitle method
+        iTitleLabel->SetExtent(
+                          TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) ,
+                          TSize( labelWidth, labelHeight )
+                          );
+        iTitleLabel->SetAllMarginsTo( KMediaDetailsViewerItemMargin );
+        iTitleLabel->MakeVisible( ETrue );
+        rowsAdded++;
+    }
+    
+    delete fileTitle;
 
     // Filename
     HBufC* fileName = iController->FileDetails()->GenerateFileNameL();
 
     if ( fileName && fileName->Length() )
     {
-        // file name gets populated by HandleScrollFilenameTimer method
+        // file name gets populated by UpdateFilename method
         iClipnameLabel->SetExtent(
                              TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) ,
                              TSize( labelWidth, labelHeight )
                              );
-        iClipnameLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
+        iClipnameLabel->SetAllMarginsTo( KMediaDetailsViewerItemMargin );
         iClipnameLabel->MakeVisible( ETrue );
         rowsAdded++;
-
-        delete fileName;
     }
-
+    
+    delete fileName;
+    
     // Mime Type (Format)
     if ( iController->FileDetails()->iMimeType && iController->FileDetails()->iMimeType->Length() )
     {
@@ -340,13 +353,13 @@
         CleanupStack::PushL( heading );
 
         TBuf<KMediaDetailsViewerMaxBufLen> formatField;
-        formatField.Append(KLeftMargin);
+        formatField.Append( KLeftMargin );
         formatField.Append( *heading );
         formatField.Append( KHeadingValueSeperator );
         TInt allowLen = KMediaDetailsViewerMaxBufLen-formatField.Length();
-        formatField.Append( (iController->FileDetails()->iMimeType)->Left(allowLen) );
-        iFormatLabel->SetTextL(formatField);
-        iFormatLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
+        formatField.Append( ( iController->FileDetails()->iMimeType )->Left( allowLen ) );
+        iFormatLabel->SetTextL( formatField );
+        iFormatLabel->SetAllMarginsTo( KMediaDetailsViewerItemMargin );
         iFormatLabel->MakeVisible( ETrue );
         rowsAdded++;
 
@@ -364,7 +377,7 @@
         CleanupStack::PushL( heading );
 
         TBuf<KMediaDetailsViewerMaxBufLen> resolutionField;
-        resolutionField.Append(KLeftMargin);
+        resolutionField.Append( KLeftMargin );
         resolutionField.Append( *heading );
         resolutionField.Append( KHeadingValueSeperator );
         resolutionField.AppendNum( iController->FileDetails()->iVideoWidth );
@@ -372,7 +385,7 @@
         resolutionField.AppendNum( iController->FileDetails()->iVideoHeight);
         AknTextUtils::DisplayTextLanguageSpecificNumberConversion( resolutionField );
 
-        iResolutionLabel->SetTextL(resolutionField);
+        iResolutionLabel->SetTextL( resolutionField );
         iResolutionLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
         iResolutionLabel->MakeVisible( ETrue );
         rowsAdded++;
@@ -391,7 +404,7 @@
         CleanupStack::PushL( heading );
 
         TBuf<KMediaDetailsViewerMaxBufLen> durationField;
-        durationField.Append(KLeftMargin);
+        durationField.Append( KLeftMargin );
         durationField.Append( *heading );
         durationField.Append( KHeadingValueSeperator );
 
@@ -409,13 +422,13 @@
         }
 
         TBuf<64> dur;
-        TTime durTime = TTime(durationInSeconds * 1000000);
-        durTime.FormatL(dur, *unitFormatString);
+        TTime durTime = TTime( durationInSeconds * 1000000 );
+        durTime.FormatL( dur, *unitFormatString );
         AknTextUtils::DisplayTextLanguageSpecificNumberConversion( dur );
 
         durationField.Append( dur );
-        iDurationLabel->SetTextL(durationField);
-        iDurationLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
+        iDurationLabel->SetTextL( durationField );
+        iDurationLabel->SetAllMarginsTo( KMediaDetailsViewerItemMargin );
         iDurationLabel->MakeVisible( ETrue );
         rowsAdded++;
 
@@ -434,7 +447,7 @@
         CleanupStack::PushL( heading );
 
         TBuf<KMediaDetailsViewerMaxBufLen> bitrateField;
-        bitrateField.Append(KLeftMargin);
+        bitrateField.Append( KLeftMargin );
         bitrateField.Append( *heading );
         bitrateField.Append( KHeadingValueSeperator );
 
@@ -442,8 +455,8 @@
              StringLoader::LoadLC(R_MPX_BITRATE_UNITS,iController->FileDetails()->iBitRate / 1000 );
 
         bitrateField.Append( *formattedBitrate );
-        iBitrateLabel->SetTextL(bitrateField);
-        iBitrateLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
+        iBitrateLabel->SetTextL( bitrateField );
+        iBitrateLabel->SetAllMarginsTo( KMediaDetailsViewerItemMargin );
         iBitrateLabel->MakeVisible( ETrue );
         rowsAdded++;
 
@@ -451,30 +464,6 @@
         CleanupStack::PopAndDestroy( heading );
     }
 
-    // Title
-    if ( iController->FileDetails()->iTitle && iController->FileDetails()->iTitle->Length() )
-    {
-        iTitleLabel->SetExtent(
-                          TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) ,
-                          TSize( labelWidth, labelHeight )
-                          );
-        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_TITLE_HEADING );
-        CleanupStack::PushL( heading );
-
-        TBuf<KMediaDetailsViewerMaxBufLen> titleField;
-        titleField.Append(KLeftMargin);
-        titleField.Append( *heading );
-        titleField.Append( KHeadingValueSeperator );
-        TInt allowLen = KMediaDetailsViewerMaxBufLen-titleField.Length();
-        titleField.Append( (iController->FileDetails()->iTitle)->Left(allowLen) );
-        iTitleLabel->SetTextL(titleField);
-        iTitleLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
-        iTitleLabel->MakeVisible( ETrue );
-        rowsAdded++;
-
-        CleanupStack::PopAndDestroy( heading );
-    }
-
     // Artist
     if ( iController->FileDetails()->iArtist && iController->FileDetails()->iArtist->Length() )
     {
@@ -486,13 +475,13 @@
         CleanupStack::PushL( heading );
 
         TBuf<KMediaDetailsViewerMaxBufLen> artistField;
-        artistField.Append(KLeftMargin);
+        artistField.Append( KLeftMargin );
         artistField.Append( *heading );
         artistField.Append( KHeadingValueSeperator );
         TInt allowLen = KMediaDetailsViewerMaxBufLen-artistField.Length();
-        artistField.Append( (iController->FileDetails()->iArtist)->Left( allowLen ) );
-        iArtistLabel->SetTextL(artistField);
-        iArtistLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
+        artistField.Append( ( iController->FileDetails()->iArtist )->Left( allowLen ) );
+        iArtistLabel->SetTextL( artistField );
+        iArtistLabel->SetAllMarginsTo( KMediaDetailsViewerItemMargin );
         iArtistLabel->MakeVisible( ETrue );
         rowsAdded++;
 
@@ -508,11 +497,11 @@
                                );
 
         TBuf<KMediaDetailsViewerMaxBufLen> titleField;
-        titleField.Append(KLeftMargin);
+        titleField.Append( KLeftMargin );
         TInt allowLen = KMediaDetailsViewerMaxBufLen-titleField.Length();
-        titleField.Append( iAdditionalString->Left(allowLen) );
-        iAdditionalLabel->SetTextL(titleField);
-        iAdditionalLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
+        titleField.Append( iAdditionalString->Left( allowLen ) );
+        iAdditionalLabel->SetTextL( titleField );
+        iAdditionalLabel->SetAllMarginsTo( KMediaDetailsViewerItemMargin );
         iAdditionalLabel->MakeVisible( ETrue );
         rowsAdded++;
     }
@@ -685,98 +674,47 @@
 }
 
 // -------------------------------------------------------------------------------------------------
-// CMPXVideoPlaybackMediaDetailsViewer::ScrollFilenameTimer
+// CMPXVideoPlaybackMediaDetailsViewer::ScrollTimer
 // -------------------------------------------------------------------------------------------------
 //
-TInt CMPXVideoPlaybackMediaDetailsViewer::ScrollFilenameTimer( TAny* aPtr )
+TInt CMPXVideoPlaybackMediaDetailsViewer::ScrollTimer( TAny* aPtr )
 {
     TRAP_IGNORE(
-            static_cast<CMPXVideoPlaybackMediaDetailsViewer*>(aPtr)->HandleScrollFilenameTimerL()
+            static_cast<CMPXVideoPlaybackMediaDetailsViewer*>(aPtr)->HandleScrollTimerL()
             );
     return KErrNone;
 }
 
 // -------------------------------------------------------------------------------------------------
-// CMPXVideoPlaybackMediaDetailsViewer::HandleScrollFilenameTimerL
+// CMPXVideoPlaybackMediaDetailsViewer::HandleScrollTimerL
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackMediaDetailsViewer::HandleScrollFilenameTimerL()
+void CMPXVideoPlaybackMediaDetailsViewer::HandleScrollTimerL()
 {
-    MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackMediaDetailsViewer::HandleScrollFilenameTimerL" ) );
+    MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackMediaDetailsViewer::HandleScrollTimerL" ) );
 
-    TBool skipForTimerDelay = EFalse;
-
-    // add a delay after each complete scrolling
-    if ( iScrollTimerDelayBeginningTick != KInvalidTick )
+    if ( iFilenameScroller.IsUpdateNeeded() )
     {
-        if ( ( User::NTickCount() - iScrollTimerDelayBeginningTick ) >= KScrollTimerDelayTickCounts )
-        {
-            iScrollTimerDelayBeginningTick = KInvalidTick;
-        }
-        else
-        {
-            skipForTimerDelay = ETrue;
-        }
+        UpdateFilenameL();
     }
-
-    if ( !skipForTimerDelay && iShouldPauseScrolling )
+    
+    if ( iTitleScroller.IsUpdateNeeded() )
     {
-        iShouldPauseScrolling = EFalse;
-        iScrollTimerDelayBeginningTick = User::NTickCount();
-        skipForTimerDelay = ETrue;
+        UpdateTitleL();
     }
 
-    // skip the scrolling operation if the loop for delay is going on
-    if ( !skipForTimerDelay )
+    if ( !iFilenameScroller.IsScrollNeeded() && !iTitleScroller.IsScrollNeeded() )
     {
-        HBufC* fileName = iController->FileDetails()->GenerateFileNameL();
-
-        
-        if ( fileName && fileName->Length() )
-        {
-            CleanupStack::PushL( fileName );
-        
-            TInt length = fileName->Length();
-
-            HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_FILENAME_HEADING );
-            CleanupStack::PushL( heading );
+        iScrollingTextTimer->Cancel();   // no need to keep the timer active
+    }
 
-            TBuf<KMediaDetailsViewerMaxBufLen> filenameField;
-            filenameField.Append(KLeftMargin);
-            filenameField.Append( *heading );
-            filenameField.Append( KHeadingValueSeperator );
-            
-            if ( length >= KMediaDetailsViewerVisibleCharacters )
-            {
-                filenameField.Append( fileName->Mid( iScrollPosition,
-                        KMediaDetailsViewerVisibleCharacters ) );
-
-                if ( iScrollPosition ==  (length - KMediaDetailsViewerVisibleCharacters) )
-                {
-                    iScrollPosition = 0;
-                    iShouldPauseScrolling = ETrue;
-                }
-                else
-                {
-                    iScrollPosition++;
-                }
-            }
-            else
-            {
-                filenameField.Append( *fileName );
-                iScrollingTextTimer->Cancel();   // no need to keep the timer active
-            }
-
-            iClipnameLabel->SetTextL(filenameField);
-            DrawNow();
-
-            CleanupStack::PopAndDestroy( heading );
-            CleanupStack::PopAndDestroy( fileName );
-        }
+    if ( iScrolledTextUpdated )
+    {
+        iScrolledTextUpdated = EFalse;
+        DrawNow();
     }
 }
 
-
 // -------------------------------------------------------------------------------------------------
 //   CMPXVideoPlaybackMediaDetailsViewer::NumOfItemsShownInViewer
 // -------------------------------------------------------------------------------------------------
@@ -816,9 +754,13 @@
         numOfItems++;
     }
 
-    if ( iController->FileDetails()->iTitle )
+    HBufC* title = NULL;
+    TRAP_IGNORE ( title = iController->FileDetails()->GenerateFileTitleL() ); 
+    
+    if ( title )
     {
         numOfItems++;
+        delete title;
     }
 
     if ( iController->FileDetails()->iArtist )
@@ -895,6 +837,72 @@
 }
 
 // -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackMediaDetailsViewer::UpdateFilenameL
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPlaybackMediaDetailsViewer::UpdateFilenameL()
+{
+    MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackMediaDetailsViewer::UpdateFilenameL" ) );
+    
+	HBufC* fileName = iController->FileDetails()->GenerateFileNameL();
+    CleanupStack::PushL( fileName );
+    
+    if ( fileName && fileName->Length() )
+    {
+        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_FILENAME_HEADING );
+        CleanupStack::PushL( heading );
+
+        TBuf<KMediaDetailsViewerMaxBufLen> filenameField;
+        filenameField.Append( KLeftMargin );
+        filenameField.Append( *heading );
+        filenameField.Append( KHeadingValueSeperator );
+
+        iFilenameScroller.ScrollText( *fileName, filenameField );
+
+        iClipnameLabel->SetTextL( filenameField );
+
+        iScrolledTextUpdated = ETrue;
+
+        CleanupStack::PopAndDestroy( heading );
+    }
+    
+    CleanupStack::PopAndDestroy( fileName );
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackMediaDetailsViewer::UpdateTitleL
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPlaybackMediaDetailsViewer::UpdateTitleL()
+{
+    MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackMediaDetailsViewer::UpdateTitleL" ) );
+    
+	HBufC* fileTitle = iController->FileDetails()->GenerateFileTitleL();
+    CleanupStack::PushL( fileTitle );
+    
+	if ( fileTitle && fileTitle->Length() )
+    {
+        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_TITLE_HEADING );
+        CleanupStack::PushL( heading );
+
+        TBuf<KMediaDetailsViewerMaxBufLen> titleField;
+        titleField.Append( KLeftMargin );
+        titleField.Append( *heading );
+        titleField.Append( KHeadingValueSeperator );
+
+        iTitleScroller.ScrollText( *fileTitle, titleField );
+
+        iTitleLabel->SetTextL( titleField );
+
+        iScrolledTextUpdated = ETrue;
+
+        CleanupStack::PopAndDestroy( heading );
+    }
+	
+    CleanupStack::PopAndDestroy( fileTitle );	
+}
+
+// -------------------------------------------------------------------------------------------------
 //   CMPXVideoPlaybackMediaDetailsViewer::ViewerRect
 // -------------------------------------------------------------------------------------------------
 //
@@ -903,5 +911,101 @@
     return iViewerRect;
 }
 
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackMediaDetailsViewer::TTextScroller::TTextScroller
+// -------------------------------------------------------------------------------------------------
+//
+CMPXVideoPlaybackMediaDetailsViewer::TTextScroller::TTextScroller()
+    : iDelayBeginningTick( KInvalidTick )
+    , iTextScrollPos( 0 )
+    , iDelay( EFalse )
+    , iScroll( ETrue )
+    , iSrcTextLen( 0 )
+{
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackMediaDetailsViewer::TTextScroller::IsScrollNeeded
+// -------------------------------------------------------------------------------------------------
+//
+TBool CMPXVideoPlaybackMediaDetailsViewer::TTextScroller::IsScrollNeeded()
+{
+    return iScroll;
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackMediaDetailsViewer::TTextScroller::IsUpdateNeeded
+// -------------------------------------------------------------------------------------------------
+//
+TBool CMPXVideoPlaybackMediaDetailsViewer::TTextScroller::IsUpdateNeeded()
+{
+    MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackMediaDetailsViewer::TTextScroller::IsUpdateNeeded" ) );
+    
+	// skip the scrolling operation if the loop for delay is going on
+    TBool skipForTimerDelay = EFalse;
+
+    // add a delay after each complete scrolling
+    if ( iScroll && iDelayBeginningTick != KInvalidTick )
+    {
+        if ( ( User::NTickCount() - iDelayBeginningTick ) >= KScrollTimerDelayTickCounts )
+        {
+            iDelayBeginningTick = KInvalidTick;
+        }
+        else
+        {
+            skipForTimerDelay = ETrue;
+        }
+    }
+
+    // start delay
+    if ( iScroll && !skipForTimerDelay && iDelay )
+    {
+        iDelay = EFalse;
+        iDelayBeginningTick = User::NTickCount();
+        skipForTimerDelay = ETrue;
+    }
+
+    return iScroll && !skipForTimerDelay;
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackMediaDetailsViewer::TTextScroller::ScrollText
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPlaybackMediaDetailsViewer::TTextScroller::ScrollText(
+        const TDesC& aSrcText,
+        TDes& aDesText )
+{
+    MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackMediaDetailsViewer::TTextScroller::ScrollText" ) );
+    
+	if ( 0 == iSrcTextLen )
+    {
+        iSrcTextLen = aSrcText.Length();
+    }
+    
+    ASSERT( aSrcText.Length() == iSrcTextLen );
+    if ( aSrcText.Length() >= KMediaDetailsViewerVisibleCharacters )
+    {
+        aDesText.Append( aSrcText.Mid( iTextScrollPos,
+                KMediaDetailsViewerVisibleCharacters ) );
+
+        if ( iTextScrollPos ==  ( iSrcTextLen - KMediaDetailsViewerVisibleCharacters ) )
+        {
+            iTextScrollPos = 0;
+            iDelay = ETrue;
+        }
+        else
+        {
+            iTextScrollPos++;
+        }
+        iScroll = ETrue;
+        
+    }
+    else
+    {
+        aDesText.Append( aSrcText );
+        iScroll = EFalse;
+    }
+}
 
 //  End of File
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e003sa33#19 %
+// Version : %version: e003sa33#20 %
 
 
 // INCLUDE FILES
@@ -860,6 +860,8 @@
     {
         TPointerEvent event;
         event.iType = TPointerEvent::EButton1Up;
+        event.iPosition.iX = iSliderRect.iTl.iX;
+
         MPX_TRAPD( err, HandlePointerEventL(event) );
     }
 }
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e003sa33#19 %
+// Version : %version: e003sa33#20 %
 
 
 // INCLUDE FILES
@@ -1004,7 +1004,11 @@
 
     if ( iDragging != EVolumeNotDragging )
     {
-    	iDragging = EVolumeNotDragging;
+        TPointerEvent event;
+        event.iType = TPointerEvent::EButton1Up;
+        event.iPosition.iY = ( iSliderRect.iTl.iY + iSliderRect.iBr.iY ) / 2;
+        
+        MPX_TRAPD( err, HandlePointerEventL(event) );
     }
 }
 
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/bwins/ui_videoplaybackcontrolstestu.def	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/bwins/ui_videoplaybackcontrolstestu.def	Wed Apr 14 15:59:50 2010 +0300
@@ -7,4 +7,5 @@
 	?HandleEventL@CMPXVideoPlaybackControlsController@@QAEXW4TMPXVideoPlaybackControlCommandIds@@H@Z @ 6 NONAME ; void CMPXVideoPlaybackControlsController::HandleEventL(enum TMPXVideoPlaybackControlCommandIds, int)
 	?NewL@CMPXVideoPlaybackControlsController@@SAPAV1@PAVCMPXVideoPlaybackContainer@@VTRect@@PAVCMPXVideoPlaybackViewFileDetails@@@Z @ 7 NONAME ; class CMPXVideoPlaybackControlsController * CMPXVideoPlaybackControlsController::NewL(class CMPXVideoPlaybackContainer *, class TRect, class CMPXVideoPlaybackViewFileDetails *)
 	?GenerateFileNameL@CMPXVideoPlaybackViewFileDetails@@QAEPAVHBufC16@@XZ @ 8 NONAME ; class HBufC16 * CMPXVideoPlaybackViewFileDetails::GenerateFileNameL(void)
+	?GenerateFileTitleL@CMPXVideoPlaybackViewFileDetails@@QAEPAVHBufC16@@XZ @ 9 NONAME ; class HBufC16 * CMPXVideoPlaybackViewFileDetails::GenerateFileTitleL(void)
 
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/conf/ui_videoplaybackcontrolstest.cfg	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/conf/ui_videoplaybackcontrolstest.cfg	Wed Apr 14 15:59:50 2010 +0300
@@ -857,4 +857,26 @@
 pause 2000
 [Endtest]
 
+[Test]
+title [36] Open Close Media Details Viewer (with empty title)
+bringtoforeground
+create ui_videoplaybackcontrolstest ControlsTest
+ControlsTest CreateControls rtsp:\/\/10.41.2.3/h264/Video%20BitRate%2008%20-%2064/Meat%20Loaf%20-%20I%20would%20do%20anything%20for%20love.3gp EMPXVideoStreaming
+pause 100
+ControlsTest AddEmptyTitleFileDetails
+pause 100
+ControlsTest SetState EPbStatePlaying
+pause 100
+ControlsTest ShowControls
+pause 1000
+ControlsTest ShowMediaDetailsViewer
+pause 3000
+ControlsTest CloseMediaDetailsViewer
+pause 100
+ControlsTest DeleteControls
+delete ControlsTest
+sendtobackground
+pause 2000
+[Endtest]
+
 // End of file
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/eabi/ui_videoplaybackcontrolstestu.def	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/eabi/ui_videoplaybackcontrolstestu.def	Wed Apr 14 15:59:50 2010 +0300
@@ -37,4 +37,5 @@
 	_ZN32CMPXVideoPlaybackViewFileDetails17GenerateFileNameLEv @ 36 NONAME
 	_ZTI35CMPXVideoPlaybackMediaDetailsViewer @ 37 NONAME
 	_ZTV35CMPXVideoPlaybackMediaDetailsViewer @ 38 NONAME
+	_ZN32CMPXVideoPlaybackViewFileDetails18GenerateFileTitleLEv @ 39 NONAME
 
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/group/videoplaybackcontrolstest.mmp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/group/videoplaybackcontrolstest.mmp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 9 %
+// Version : %version: e003sa33#10 %
 
 
 
@@ -90,5 +90,6 @@
 LIBRARY         RemConInterfaceBase.lib
 LIBRARY         RemConCoreApi.lib
 LIBRARY         ecom.lib
+LIBRARY         inetprotutil.lib
 
 // End of File
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/inc/mpxvpbc_stub.h	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/inc/mpxvpbc_stub.h	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e003sa33#10 %
+// Version : %version: e003sa33#11 %
 
 
 
@@ -117,6 +117,12 @@
         */
         void AddSameARFileDetailsL( TBool aHasVideoTrack = ETrue );
         
+        /**
+        * Add file details with empty title
+        * and make sure aspect ratio equal to screen aspect ratio 
+        */        
+        void AddEmptyTitleFileDetailsL( TBool aHasVideoTrack = ETrue );
+        
     private:    
         // Data
         TInt                                 iCommand;
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/inc/videoplaybackcontrolstest.h	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/inc/videoplaybackcontrolstest.h	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e003sa33#10 %
+// Version : %version: e003sa33#11 %
 
 
 
@@ -213,6 +213,12 @@
      * @return symbian OS error code.
      */
     virtual TInt AddSameARFileDetails();
+        
+    /**
+     * Add empty title file details
+     * @return symbian OS error code.
+     */
+    virtual TInt AddEmptyTitleFileDetailsL();
     
     /**
     * Create controller
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/mpxvpbc_stub.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/mpxvpbc_stub.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e003sa33#14 %
+// Version : %version: e003sa33#15 %
 
 
 // INCLUDES
@@ -408,4 +408,34 @@
     iControlsController->AddFileDetailsL( iFileDetails );
 }
 
+//
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPlaybackContainer::AddEmptyTitleFileDetailsL()
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPlaybackContainer::AddEmptyTitleFileDetailsL( TBool aHasVideoTrack )
+{
+    MPX_DEBUG(_L("CMPXVideoPlaybackContainer::AddEmptyTitleFileDetailsL() "));
+
+    iFileDetails->iAudioEnabled = ETrue;
+    iFileDetails->iVideoEnabled = aHasVideoTrack;
+    iFileDetails->iSeekable = ETrue;
+    
+    if ( iFileDetails->iVideoEnabled )
+    {        
+        iFileDetails->iVideoHeight = 176;
+        iFileDetails->iVideoWidth = 144;
+        
+        iFileDetails->iBitRate = 8000;
+        iFileDetails->iMimeType = _L("video/3gp").Alloc();        
+    }
+
+    if ( iFileDetails->iPlaybackMode == EMPXVideoLiveStreaming )
+    {
+        iFileDetails->iSeekable = EFalse;
+    }
+
+    iControlsController->AddFileDetailsL( iFileDetails );
+}
+
 //  End of File
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/mpxvpbvfd_stub.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/mpxvpbvfd_stub.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,13 +15,14 @@
 *
 */
 
-// Version : %version: e003sa33#7 %
+// Version : %version: e003sa33#8 %
 
 
 //
 //  INCLUDE FILES
 //
 #include <f32file.h>
+#include <uri16.h>
 
 #include "mpxvideo_debug.h"
 #include "mpxvideoplaybackviewfiledetails.h"
@@ -116,4 +117,65 @@
     return fileName;
 }
 
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPlaybackViewFileDetails::GenerateFileTitleL
+// -------------------------------------------------------------------------------------------------
+//
+EXPORT_C HBufC* CMPXVideoPlaybackViewFileDetails::GenerateFileTitleL()
+{
+    MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackViewFileDetails::GenerateFileTitleL()" ) );
+
+    HBufC* fileTitle = NULL;
+
+    if ( iTitle && iTitle->Length() )
+    {
+        //
+        // use file title in metadata as title cotent directly
+        //
+        fileTitle = iTitle->AllocL();
+    }
+    else if ( ( EMPXVideoStreaming == iPlaybackMode || EMPXVideoLiveStreaming == iPlaybackMode ) &&
+              iClipName && iClipName->Length() )
+    {
+        //
+        //  parse file name in URL
+        //
+        TUriParser parser;
+
+        if ( parser.Parse( iClipName->Des() ) == KErrNone )
+        {
+
+            MPX_DEBUG(
+                _L( "    streaming link: schema = %S, urihost = %S, uriPort = %S, uriPath = %S" ),
+                &( parser.Extract( EUriScheme ) ),
+                &( parser.Extract( EUriHost ) ),
+                &( parser.Extract( EUriPort ) ),
+                &( parser.Extract( EUriPath ) ) );
+
+            HBufC* nameAndTail = NULL;
+
+            MPX_TRAPD( err, nameAndTail = parser.GetFileNameL( EUriFileNameTail ) );
+
+            if ( KErrNone == err && nameAndTail )
+            {
+                CleanupStack::PushL( nameAndTail );
+                TInt extPos = nameAndTail->Des().LocateReverse( KExtDelimiter );
+
+                if ( extPos > 0 )
+                {
+                    fileTitle = ( nameAndTail->Des().Left( extPos ) ).AllocL();
+                }
+                else
+                {
+                    fileTitle = nameAndTail->Des().AllocL();
+                }
+
+                CleanupStack::PopAndDestroy( nameAndTail );
+            }
+        }
+    }
+
+    return fileTitle;
+}
+
 //  EOF
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/videoplaybackcontrolstestblocks.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/videoplaybackcontrolstestblocks.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e003sa33#11 %
+// Version : %version: e003sa33#12 %
 
 
 // [INCLUDE FILES] - do not remove
@@ -72,6 +72,7 @@
         ENTRY( "AddLongFileDetails", CVideoPlaybackControlsTest::AddLongFileDetails ),
         ENTRY( "AddAudioOnlyFileDetails", CVideoPlaybackControlsTest::AddAudioOnlyFileDetails ),
         ENTRY( "AddSameARFileDetails", CVideoPlaybackControlsTest::AddSameARFileDetails ),
+        ENTRY( "AddEmptyTitleFileDetails", CVideoPlaybackControlsTest::AddEmptyTitleFileDetailsL ),
         ENTRY( "SetDuration", CVideoPlaybackControlsTest::SetDuration ),
         ENTRY( "SoftkeyPressed", CVideoPlaybackControlsTest::SoftkeyPressed ),
         ENTRY( "ShowControls", CVideoPlaybackControlsTest::ShowControls ),
@@ -512,6 +513,19 @@
 }
 
 // -------------------------------------------------------------------------------------------------
+// CVideoPlaybackControlsTest::AddEmptyTitleFileDetails
+// -------------------------------------------------------------------------------------------------
+//
+TInt CVideoPlaybackControlsTest::AddEmptyTitleFileDetailsL()
+{
+	MPX_ENTER_EXIT( _L( "CVideoPlaybackControlsTest::AddEmptyTitleFileDetailsL()" ) );
+
+    MPX_TRAPD( result, iContainer->AddEmptyTitleFileDetailsL() );
+
+    return result;
+}
+
+// -------------------------------------------------------------------------------------------------
 // CVideoPlaybackControlsTest::ParseType
 // -------------------------------------------------------------------------------------------------
 //
--- a/videoplayback/videoplaybackviews/bwins/mpxvideoplaybackviewsu.def	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackviews/bwins/mpxvideoplaybackviewsu.def	Wed Apr 14 15:59:50 2010 +0300
@@ -11,4 +11,5 @@
 	?NewL@CMPXVideoPlaybackView@@SAPAV1@XZ @ 10 NONAME ; class CMPXVideoPlaybackView * CMPXVideoPlaybackView::NewL(void)
 	?DoHandleKeyEventL@CMPXVideoPlaybackContainer@@QAEXABUTKeyEvent@@W4TEventCode@@@Z @ 11 NONAME ; void CMPXVideoPlaybackContainer::DoHandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
 	?GenerateFileNameL@CMPXVideoPlaybackViewFileDetails@@QAEPAVHBufC16@@XZ @ 12 NONAME ; class HBufC16 * CMPXVideoPlaybackViewFileDetails::GenerateFileNameL(void)
+	?GenerateFileTitleL@CMPXVideoPlaybackViewFileDetails@@QAEPAVHBufC16@@XZ @ 13 NONAME ; class HBufC16 * CMPXVideoPlaybackViewFileDetails::GenerateFileTitleL(void)
 
--- a/videoplayback/videoplaybackviews/eabi/mpxvideoplaybackviewsu.def	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackviews/eabi/mpxvideoplaybackviewsu.def	Wed Apr 14 15:59:50 2010 +0300
@@ -21,4 +21,5 @@
 	_ZTI31CMPXVideoPlaybackDisplayHandler @ 20 NONAME ; #<TI>#
 	_ZTV31CMPXVideoPlaybackDisplayHandler @ 21 NONAME ; #<VT>#
 	_ZN32CMPXVideoPlaybackViewFileDetails17GenerateFileNameLEv @ 22 NONAME
+	_ZN32CMPXVideoPlaybackViewFileDetails18GenerateFileTitleLEv @ 23 NONAME
 
--- a/videoplayback/videoplaybackviews/group/mpxvideoplaybackviews.mmp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackviews/group/mpxvideoplaybackviews.mmp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: ou1cpsw#15 %
+// Version : %version: e003sa33#16 %
 
 
 #include <data_caging_paths.hrh>
@@ -82,7 +82,7 @@
 LIBRARY             mpfiledetailsdialog.lib
 LIBRARY             sysutil.lib 
 LIBRARY             drmuihandling.lib
-
+LIBRARY             inetprotutil.lib
 
 #ifdef SYMBIAN_BUILD_GCE
 LIBRARY             mediaclientvideodisplay.lib
--- a/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 68 %
+// Version : %version: e003sa33#71 %
 
 
 //  Include Files
@@ -67,7 +67,10 @@
 #include "mpxvideo_debug.h"
 #include "mpxvideoplayercustomviewmsgconsts.h"
 
-//  Member Functions
+//
+//  Set a constant for the information timeout of 5 seconds
+//
+const TInt KInformationNoteTimeout = 5000000;
 
 // -------------------------------------------------------------------------------------------------
 // CMPXVideoBasePlaybackView::CMPXVideoBasePlaybackView()
@@ -113,6 +116,8 @@
     iCloseAO = CIdle::NewL( CActive::EPriorityStandard );
 
     BaseConstructL( R_MPX_VIDEO_PLAYBACK_VIEW );
+
+    iAknEventMonitor = static_cast<CAknAppUiBase*>(CCoeEnv::Static()->AppUi())->EventMonitor();
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -456,6 +461,15 @@
     }
 
     //
+    //  Register for window visibility changes
+    //
+    iContainer->GetWindow().EnableVisibilityChangeEvents();
+
+    iKeyboardInFocus = ETrue;
+    iAknEventMonitor->Enable( ETrue );
+    iAknEventMonitor->AddObserverL( this );
+
+    //
     //  Deactivate the CBA set the LSK & RSK to empty
     //
     Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_EMPTY );
@@ -493,6 +507,10 @@
     //
     MPX_TRAPD( err, HandleCommandL( EMPXPbvCmdClose ) );
 
+    iAknEventMonitor->Enable( EFalse );
+    iAknEventMonitor->RemoveObserver( this );
+    iKeyboardInFocus = EFalse;
+
     //
     //  Delete the display handler when the view is deactivated
     //
@@ -533,8 +551,7 @@
 }
 
 // -------------------------------------------------------------------------------------------------
-// From CAknView
-// Foreground event handling function.
+//   CMPXVideoBasePlaybackView::HandleForegroundEventL()
 // -------------------------------------------------------------------------------------------------
 //
 void CMPXVideoBasePlaybackView::HandleForegroundEventL( TBool aForeground )
@@ -542,31 +559,20 @@
     MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::HandleForegroundEventL()"),
                    _L("aForeground = %d"), aForeground );
 
-    TMPXVideoPlaybackCommand videoCmd = EPbCmdHandleBackground;
-
     if ( aForeground )
     {
-        videoCmd = EPbCmdHandleForeground;
         iContainer->HandleEventL( EMPXControlCmdHandleForegroundEvent );
+        iKeyboardInFocus = ETrue;
+
+        SendWindowCommandL( EPbCmdHandleForeground );
     }
     else
     {
         iContainer->HandleEventL( EMPXControlCmdHandleBackgroundEvent );
-    }
-
-    //
-    //  create command to pass to playback plugin
-    //
-    CMPXCommand* cmd = CMPXCommand::NewL();
-    CleanupStack::PushL( cmd );
+        iKeyboardInFocus = EFalse;
 
-    cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue );
-    cmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId, KMPXMediaIdVideoPlayback );
-    cmd->SetTObjectValueL<TMPXVideoPlaybackCommand>( KMPXMediaVideoPlaybackCommand, videoCmd );
-    cmd->SetTObjectValueL<TBool>( KMPXMediaVideoAppForeground, IsAppInFrontL() );
-
-    iPlaybackUtility->CommandL( *cmd );
-    CleanupStack::PopAndDestroy( cmd );
+        SendWindowCommandL( EPbCmdHandleBackground );
+    }
 
     CAknView::HandleForegroundEventL( aForeground );
 }
@@ -873,6 +879,9 @@
 {
     MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::HandleClosePlaybackViewL()"));
 
+    // Reset the playback state to stopped
+    iPlaybackState = EPbStateStopped;
+    
     if ( IsMultiItemPlaylist() )
     {
         RemoveBackgroundSurfaceL();
@@ -1056,7 +1065,6 @@
     }
 }
 
-
 // -------------------------------------------------------------------------------------------------
 // Handle playback error message.
 // -------------------------------------------------------------------------------------------------
@@ -1080,7 +1088,6 @@
     MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::HandlePlaybackCommandComplete()"));
 }
 
-
 // -------------------------------------------------------------------------------------------------
 // CMPXVideoBasePlaybackView::ParseMetaDataL()
 // -------------------------------------------------------------------------------------------------
@@ -1377,9 +1384,6 @@
 
             // Handle the plugin error
             HandlePluginErrorL( error );
-
-            // Reset the playback state to stopped
-            iPlaybackState = EPbStateStopped;
         }
         else
         {
@@ -1480,6 +1484,7 @@
     HBufC* text = StringLoader::LoadLC( aResourceId );
 
     CAknInformationNote* dlg = new (ELeave) CAknInformationNote( aWaitingDialog );
+    dlg->SetTimeout( (CAknNoteDialog::TTimeout) KInformationNoteTimeout );
     dlg->ExecuteLD( *text );
     CleanupStack::PopAndDestroy( text );
 }
@@ -1517,7 +1522,6 @@
     iPlaybackUtility->CommandL( *aCmd );
 }
 
-
 // -------------------------------------------------------------------------------------------------
 //   CMPXVideoBasePlaybackView::ActivateClosePlayerActiveObject
 // -------------------------------------------------------------------------------------------------
@@ -1624,10 +1628,9 @@
     }
 }
 
-// ---------------------------------------------------------------------------
-// CMPXVideoBasePlaybackView::IsAppInFrontL()
-// Returns true if app is foreground. Uses windowgroup id
-// ---------------------------------------------------------------------------
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoBasePlaybackView::IsAppInFrontL()
+// -------------------------------------------------------------------------------------------------
 //
 TBool CMPXVideoBasePlaybackView::IsAppInFrontL()
 {
@@ -1642,15 +1645,14 @@
         CArrayFixFlat<TInt>* wgList =
             new (ELeave) CArrayFixFlat<TInt>( wsSession.NumWindowGroups() );
 
-        // check if our window is front or not
         if ( wsSession.WindowGroupList( 0, wgList ) == KErrNone )
         {
+            //
+            //  If this window group is at the start of the window group array,
+            //  this application is in the front
+            //
             ret = ( iCoeEnv->RootWin().Identifier() == wgList->At(0) );
         }
-        else
-        {
-            ret = EFalse;
-        }
 
         delete wgList;
     }
@@ -2206,4 +2208,53 @@
     }
 }
 
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoBasePlaybackView::HandleWsEventL()
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoBasePlaybackView::HandleWsEventL( const TWsEvent& aEvent,
+                                                CCoeControl* /*aDestination*/ )
+{
+    //
+    //  Fg/Bg events aren't received when the view has lost keyboard focus
+    //  If we are sent to full background, sent a background command to the playback plugin
+    //
+    if ( ! iKeyboardInFocus && aEvent.Type() == EEventWindowVisibilityChanged )
+    {
+        MPX_DEBUG(_L("CMpxVideoPlayerAppUi::HandleWsEventL() EEventWindowVisibilityChanged"));
+
+        TUint visible = aEvent.VisibilityChanged()->iFlags;
+
+        if ( visible & TWsVisibilityChangedEvent::ENotVisible )
+        {
+            MPX_DEBUG(_L("CMpxVideoPlayerAppUi::HandleWsEventL() ENotVisible"));
+            SendWindowCommandL( EPbCmdHandleBackground );
+        }
+    }
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoBasePlaybackView::SendWindowCommandL()
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoBasePlaybackView::SendWindowCommandL( TMPXVideoPlaybackCommand aCmd )
+{
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUi::SendWindowCommandL()"),
+                   _L("aCmd = %d"), aCmd );
+
+    //
+    //  create command to pass to playback plugin
+    //
+    CMPXCommand* cmd = CMPXCommand::NewL();
+    CleanupStack::PushL( cmd );
+
+    cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue );
+    cmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId, KMPXMediaIdVideoPlayback );
+    cmd->SetTObjectValueL<TMPXVideoPlaybackCommand>( KMPXMediaVideoPlaybackCommand, aCmd );
+    cmd->SetTObjectValueL<TBool>( KMPXMediaVideoAppForeground, IsAppInFrontL() );
+
+    iPlaybackUtility->CommandL( *cmd );
+    CleanupStack::PopAndDestroy( cmd );
+}
+
 // EOF
--- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackuserinputhandler.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackuserinputhandler.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: ou1cpsw#16 %
+// Version : %version: 17 %
 
 
 // INCLUDE FILES
@@ -72,7 +72,7 @@
 CMPXVideoPlaybackUserInputHandler* CMPXVideoPlaybackUserInputHandler::NewL(
         CMPXVideoPlaybackContainer* aContainer )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackUserInputHandler::NewL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::NewL()"));
 
     CMPXVideoPlaybackUserInputHandler* self =
         new (ELeave) CMPXVideoPlaybackUserInputHandler( aContainer );
@@ -109,6 +109,8 @@
 //
 CMPXVideoPlaybackUserInputHandler::~CMPXVideoPlaybackUserInputHandler()
 {
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::~CMPXVideoPlaybackUserInputHandler()"));
+
     if ( iVolumeRepeatTimer )
     {
         iVolumeRepeatTimer->Cancel();
@@ -122,7 +124,6 @@
         iCoreTarget = NULL;
         iInterfaceSelector = NULL;
     }
-
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -136,21 +137,19 @@
         _L("CMPXVideoPlaybackUserInputHandler::MrccatoPlay"),
         _L("aButtonAct = %d"), aButtonAct );
 
-    ProcessMediaKey(ERemConCoreApiPlay, aButtonAct);
+    ProcessMediaKey( ERemConCoreApiPlay, aButtonAct );
 }
 
 // -------------------------------------------------------------------------------------------------
 // CMPXVideoPlaybackUserInputHandler::MrccatoCommand()
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackUserInputHandler::MrccatoCommand(TRemConCoreApiOperationId aOperationId,
-                                                       TRemConCoreApiButtonAction aButtonAct )
+void CMPXVideoPlaybackUserInputHandler::MrccatoCommand( TRemConCoreApiOperationId aOperationId,
+                                                        TRemConCoreApiButtonAction aButtonAct )
 {
-    MPX_ENTER_EXIT(
-        _L("CMPXVideoPlaybackUserInputHandler::MrccatoCommand"),
-        _L("aButtonAct = %d"), aButtonAct );
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::MrccatoCommand"));
 
-    ProcessMediaKey(aOperationId, aButtonAct);
+    ProcessMediaKey( aOperationId, aButtonAct );
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -160,7 +159,8 @@
 void CMPXVideoPlaybackUserInputHandler::DoHandleMediaKey( TRemConCoreApiOperationId aOperationId,
                                                           TRemConCoreApiButtonAction aButtonAct )
 {
-    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::DoHandleMediaKey()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::DoHandleMediaKey()"),
+                   _L("aOperationId = %d"), aOperationId );
 
     switch ( aOperationId )
     {
@@ -178,47 +178,45 @@
         }
         case ERemConCoreApiRewind:
         {
-            HandleRewind(aButtonAct);
+            HandleRewind( aButtonAct );
             break;
         }
         case ERemConCoreApiFastForward:
         {
-            HandleFastForward(aButtonAct);
+            HandleFastForward( aButtonAct );
             break;
         }
         case ERemConCoreApiVolumeUp:
         {
-            HandleVolumeUp(aButtonAct);
+            HandleVolumeUp( aButtonAct );
             break;
         }
         case ERemConCoreApiVolumeDown:
         {
-            HandleVolumeDown(aButtonAct);
+            HandleVolumeDown( aButtonAct );
             break;
         }
         case ERemConCoreApiPausePlayFunction:
         {
             if ( aButtonAct == ERemConCoreApiButtonClick )
             {
-                TRAP_IGNORE(iContainer->HandleCommandL(EMPXPbvCmdPlayPause));
+                TRAP_IGNORE(iContainer->HandleCommandL( EMPXPbvCmdPlayPause ));
             }
             break;
         }
         case ERemConCoreApiPause:
         {
-            TRAP_IGNORE(iContainer->HandleCommandL(EMPXPbvCmdPause));
+            TRAP_IGNORE( iContainer->HandleCommandL(EMPXPbvCmdPause) );
             break;
         }
         case ERemConCoreApiPlay:
         {
             if ( aButtonAct == ERemConCoreApiButtonClick )
             {
-                TRAP_IGNORE(iContainer->HandleCommandL(EMPXPbvCmdPlay));
+                TRAP_IGNORE( iContainer->HandleCommandL( EMPXPbvCmdPlay ) );
             }
             break;
         }
-        default:
-            break;
     }
 }
 
@@ -226,15 +224,17 @@
 // CMPXVideoPlaybackUserInputHandler::HandleFastForward()
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackUserInputHandler::HandleFastForward(TRemConCoreApiButtonAction aButtonAct)
+void CMPXVideoPlaybackUserInputHandler::HandleFastForward( TRemConCoreApiButtonAction aButtonAct )
 {
-    if (aButtonAct == ERemConCoreApiButtonPress)
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::HandleFastForward()"));
+
+    if ( aButtonAct == ERemConCoreApiButtonPress )
     {
-        TRAP_IGNORE(iContainer->HandleCommandL(EMPXPbvCmdSeekForward));
+        TRAP_IGNORE( iContainer->HandleCommandL( EMPXPbvCmdSeekForward ) );
     }
-    else if (aButtonAct == ERemConCoreApiButtonRelease)
+    else if ( aButtonAct == ERemConCoreApiButtonRelease )
     {
-        TRAP_IGNORE(iContainer->HandleCommandL(EMPXPbvCmdEndSeek));
+        TRAP_IGNORE( iContainer->HandleCommandL( EMPXPbvCmdEndSeek ) );
     }
 }
 
@@ -243,15 +243,17 @@
 // CMPXVideoPlaybackUserInputHandler::HandleRewind()
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackUserInputHandler::HandleRewind(TRemConCoreApiButtonAction aButtonAct)
+void CMPXVideoPlaybackUserInputHandler::HandleRewind( TRemConCoreApiButtonAction aButtonAct )
 {
-    if (aButtonAct == ERemConCoreApiButtonPress)
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::HandleFastForward()"));
+
+    if ( aButtonAct == ERemConCoreApiButtonPress )
     {
-        TRAP_IGNORE(iContainer->HandleCommandL(EMPXPbvCmdSeekBackward));
+        TRAP_IGNORE( iContainer->HandleCommandL( EMPXPbvCmdSeekBackward ) );
     }
-    else if (aButtonAct == ERemConCoreApiButtonRelease)
+    else if ( aButtonAct == ERemConCoreApiButtonRelease )
     {
-        TRAP_IGNORE(iContainer->HandleCommandL(EMPXPbvCmdEndSeek));
+        TRAP_IGNORE( iContainer->HandleCommandL( EMPXPbvCmdEndSeek ) );
     }
 }
 
@@ -259,8 +261,11 @@
 // CMPXVideoPlaybackUserInputHandler::HandleVolumeUp()
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackUserInputHandler::HandleVolumeUp(TRemConCoreApiButtonAction aButtonAct)
+void CMPXVideoPlaybackUserInputHandler::HandleVolumeUp( TRemConCoreApiButtonAction aButtonAct )
 {
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::HandleVolumeUp()"),
+                   _L("aButtonAct = %d"), aButtonAct );
+
     switch ( aButtonAct )
     {
         case ERemConCoreApiButtonPress:
@@ -272,6 +277,7 @@
             }
 
             iVolumeRepeatUp = ETrue;
+
             iVolumeRepeatTimer->Start(
                 KAknStandardKeyboardRepeatRate,
                 KAknStandardKeyboardRepeatRate,
@@ -301,8 +307,10 @@
 // CMPXVideoPlaybackUserInputHandler::HandleVolumeDown()
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackUserInputHandler::HandleVolumeDown(TRemConCoreApiButtonAction aButtonAct)
+void CMPXVideoPlaybackUserInputHandler::HandleVolumeDown( TRemConCoreApiButtonAction aButtonAct )
 {
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::HandleVolumeDown()"));
+
     switch ( aButtonAct )
     {
         case ERemConCoreApiButtonPress:
@@ -314,6 +322,7 @@
             }
 
             iVolumeRepeatUp = EFalse;
+
             iVolumeRepeatTimer->Start(
                 KAknStandardKeyboardRepeatRate,
                 KAknStandardKeyboardRepeatRate,
@@ -348,25 +357,25 @@
                                                          const TPointerEvent& aPointerEvent,
                                                          TMPXVideoControlType aMPXControl )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackUserInputHandler::ProcessPointerEvent"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::ProcessPointerEvent()"));
 
-    switch (iProcessingInputType)
+    switch ( iProcessingInputType )
     {
         case EMpxVideoNone:
         {
-            if (aPointerEvent.iType == TPointerEvent::EButton1Down && iForeground)
+            if ( aPointerEvent.iType == TPointerEvent::EButton1Down && iForeground )
             {
                 iProcessingInputType = EMpxVideoTouch;
 
-                ReRoutePointerEventL(aControl, aPointerEvent, aMPXControl);
+                ReRoutePointerEventL( aControl, aPointerEvent, aMPXControl );
             }
             break;
         }
         case EMpxVideoTouch:
         {
-            if (aPointerEvent.iType != TPointerEvent::EButton1Down)
+            if ( aPointerEvent.iType != TPointerEvent::EButton1Down )
             {
-                ReRoutePointerEventL(aControl, aPointerEvent, aMPXControl);
+                ReRoutePointerEventL( aControl, aPointerEvent, aMPXControl );
 
                 // reset the value only on pointer up event - but not on drag
                 if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
@@ -376,11 +385,6 @@
             }
             break;
         }
-        default:
-        {
-            // user input is disallowed
-            break;
-        }
     } // switch
 }
 
@@ -392,13 +396,13 @@
 void CMPXVideoPlaybackUserInputHandler::ProcessKeyEventL( const TKeyEvent& aKeyEvent,
                                                           TEventCode aType )
 {
-    MPX_DEBUG(_L("MPXVideoPlaybackUserInputHandler::ProcessKeyEvent"));
+    MPX_ENTER_EXIT(_L("MPXVideoPlaybackUserInputHandler::ProcessKeyEvent()"));
 
-    switch (iProcessingInputType)
+    switch ( iProcessingInputType )
     {
         case EMpxVideoNone:
         {
-            if (aType == EEventKeyDown && iForeground)
+            if ( aType == EEventKeyDown && iForeground )
             {
                 iProcessingInputType = EMpxVideoKeyboard;
                 iLastPressedKeyCode = aKeyEvent.iCode;
@@ -410,12 +414,12 @@
         }
         case EMpxVideoKeyboard:
         {
-            if (aType == EEventKeyUp)
+            if ( aType == EEventKeyUp )
             {
                 // only handle up event for the key being handled
                 // ignore spurious key presses
-                if (aKeyEvent.iCode == iLastPressedKeyCode  &&
-                    aKeyEvent.iScanCode == iLastPressedKeyScanCode)
+                if ( aKeyEvent.iCode == iLastPressedKeyCode  &&
+                     aKeyEvent.iScanCode == iLastPressedKeyScanCode )
                 {
                     iContainer->DoHandleKeyEventL(aKeyEvent, aType);
 
@@ -425,11 +429,6 @@
             }
             break;
         }
-        default:
-        {
-            // user input is disallowed
-            break;
-        }
     } // switch
 }
 
@@ -440,50 +439,51 @@
 void CMPXVideoPlaybackUserInputHandler::ProcessMediaKey( TRemConCoreApiOperationId aOperationId,
                                                          TRemConCoreApiButtonAction aButtonAct )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackUserInputHandler::ProcessMediaKey"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::ProcessMediaKey()"),
+                   _L("iProcessingInputType = %d, aButtonAct = %d"),
+                       iProcessingInputType, aButtonAct );
 
     switch ( iProcessingInputType )
     {
         case EMpxVideoNone:
         {
-            if ( aButtonAct == ERemConCoreApiButtonPress && iForeground )
-            {
-                iProcessingInputType = EMpxVideoMediaKeys;
-                iLastMediaKeyPressed = aOperationId;
-                DoHandleMediaKey(aOperationId, aButtonAct);
-            }
-            else if (aButtonAct == ERemConCoreApiButtonClick && iForeground)
+            if ( iForeground )
             {
-                DoHandleMediaKey(aOperationId, aButtonAct);
-                // reset on click AND/OR release
-                iProcessingInputType = EMpxVideoNone;
-            }
-            break;
-        }
-        case EMpxVideoMediaKeys:
-        {
-            if (aButtonAct == ERemConCoreApiButtonRelease)
-            {
-                // handle only if this release is for media-key being currently handled
-                // ignore spurious media key presses
-                if (iLastMediaKeyPressed == aOperationId)
+                if ( aButtonAct == ERemConCoreApiButtonPress )
                 {
-                    DoHandleMediaKey(aOperationId, aButtonAct);
+                    iProcessingInputType = EMpxVideoMediaKeys;
+                    iLastMediaKeyPressed = aOperationId;
+                    DoHandleMediaKey( aOperationId, aButtonAct );
+                }
+                else if ( aButtonAct == ERemConCoreApiButtonClick )
+                {
+                    DoHandleMediaKey( aOperationId, aButtonAct );
                     // reset on click AND/OR release
                     iProcessingInputType = EMpxVideoNone;
                 }
             }
             break;
         }
-        default:
+        case EMpxVideoMediaKeys:
         {
-            // user input is disallowed
+            if ( aButtonAct == ERemConCoreApiButtonRelease )
+            {
+                //
+                //  Handle only if this release is for media-key being currently handled
+                //  Ignore spurious media key presses
+                //
+                if ( iLastMediaKeyPressed == aOperationId )
+                {
+                    DoHandleMediaKey( aOperationId, aButtonAct );
+
+                    iProcessingInputType = EMpxVideoNone;
+                }
+            }
             break;
         }
     } // switch
 }
 
-
 // -------------------------------------------------------------------------------------------------
 //   CMPXVideoPlaybackUserInputHandler::HandleVolumeRepeatTimeoutL()
 // -------------------------------------------------------------------------------------------------
@@ -503,7 +503,7 @@
 //
 void CMPXVideoPlaybackUserInputHandler::HandleVolumeRepeatL()
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackUserInputHandler::HandleVolumeRepeatL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::HandleVolumeRepeatL()"));
 
     TMPXVideoPlaybackViewCommandIds command = EMPXPbvCmdDecreaseVolume;
 
@@ -520,11 +520,11 @@
 //   CMPXVideoPlaybackUserInputHandler::ReRoutePointerEventL()
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackUserInputHandler::ReRoutePointerEventL(CCoeControl* aControl,
-                                                             const TPointerEvent& aPointerEvent,
-                                                             TMPXVideoControlType aMPXControl)
+void CMPXVideoPlaybackUserInputHandler::ReRoutePointerEventL( CCoeControl* aControl,
+                                                              const TPointerEvent& aPointerEvent,
+                                                              TMPXVideoControlType aMPXControl )
 {
-    MPX_DEBUG(_L("CMPXVideoPlaybackUserInputHandler::ReRoutePointerEventL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::ReRoutePointerEventL()"));
 
     if ( aMPXControl == EMpxVideoPlaybackContainer )
     {
@@ -540,14 +540,25 @@
 //   CMPXVideoPlaybackUserInputHandler::SetForeground()
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackUserInputHandler::SetForeground(TBool aForeground)
+void CMPXVideoPlaybackUserInputHandler::SetForeground( TBool aForeground )
 {
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::SetForeground()"),
+                   _L("aForeground = %d"), aForeground );
+
     iForeground = aForeground;
 
-    if ( !iForeground )
+    if ( ! iForeground )
     {
-        // we are in background so reset iProcessingInputType value
+        //
+        //  Keyboard focus has been lost
+        //  Reset input type and clear volume timer if necessary
+        //
         iProcessingInputType = EMpxVideoNone;
+
+        if ( iVolumeRepeatTimer->IsActive() )
+        {
+            iVolumeRepeatTimer->Cancel();
+        }
     }
 }
 
--- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackviewfiledetails.cpp	Wed Mar 31 21:34:36 2010 +0300
+++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackviewfiledetails.cpp	Wed Apr 14 15:59:50 2010 +0300
@@ -15,13 +15,14 @@
 *
 */
 
-// Version : %version: 10 %
+// Version : %version: e003sa33#11 %
 
 
 //
 //  INCLUDE FILES
 //
 #include <f32file.h>
+#include <uri16.h>
 
 #include "mpxvideo_debug.h"
 #include "mpxvideoplaybackviewfiledetails.h"
@@ -126,4 +127,65 @@
     return fileName;
 }
 
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPlaybackViewFileDetails::GenerateFileTitleL
+// -------------------------------------------------------------------------------------------------
+//
+EXPORT_C HBufC* CMPXVideoPlaybackViewFileDetails::GenerateFileTitleL()
+{
+    MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackViewFileDetails::GenerateFileTitleL()" ) );
+
+    HBufC* fileTitle = NULL;
+
+    if ( iTitle && iTitle->Length() )
+    {
+        //
+        // use file title in metadata as title cotent directly
+        //
+        fileTitle = iTitle->AllocL();
+    }
+    else if ( ( EMPXVideoStreaming == iPlaybackMode || EMPXVideoLiveStreaming == iPlaybackMode ) &&
+              iClipName && iClipName->Length() )
+    {
+        //
+        //  parse file name in URL
+        //
+        TUriParser parser;
+
+        if ( parser.Parse( iClipName->Des() ) == KErrNone )
+        {
+
+            MPX_DEBUG(
+                _L( "    streaming link: schema = %S, urihost = %S, uriPort = %S, uriPath = %S" ),
+                &( parser.Extract( EUriScheme ) ),
+                &( parser.Extract( EUriHost ) ),
+                &( parser.Extract( EUriPort ) ),
+                &( parser.Extract( EUriPath ) ) );
+
+            HBufC* nameAndTail = NULL;
+
+            MPX_TRAPD( err, nameAndTail = parser.GetFileNameL( EUriFileNameTail ) );
+
+            if ( KErrNone == err && nameAndTail )
+            {
+                CleanupStack::PushL( nameAndTail );
+                TInt extPos = nameAndTail->Des().LocateReverse( KExtDelimiter );
+
+                if ( extPos > 0 )
+                {
+                    fileTitle = ( nameAndTail->Des().Left( extPos ) ).AllocL();
+                }
+                else
+                {
+                    fileTitle = nameAndTail->Des().AllocL();
+                }
+
+                CleanupStack::PopAndDestroy( nameAndTail );
+            }
+        }
+    }
+
+    return fileTitle;
+}
+
 //  EOF