Revision: 201009 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:40:47 +0200
branchRCL_3
changeset 9 5294c000a26d
parent 8 ce5ada96ab30
child 10 112a725ff2c2
Revision: 201009 Kit: 201010
filedetails/filedetailsdialog/src/MPFileDetailsDialog.cpp
filedetails/filedetailsplugin/inc/filedetailsplugin.h
filedetails/filedetailsplugin/src/filedetailsplugin.cpp
videocollection/hgmyvideos/inc/vcxhgmyvideosvideodataupdater.h
videocollection/hgmyvideos/inc/vcxhgmyvideosvideodetailsdialog.h
videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistimpl.h
videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h
videocollection/hgmyvideos/src/vcxhgmyvideoscategorymodelhandler.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideocopier.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideodataupdater.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideodetailsdialog.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp
videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp
videoplayback/inc/mpxcommonvideoplaybackview.hrh
videoplayback/inc/mpxvideobaseplaybackview.h
videoplayback/inc/mpxvideopdlplaybackview.h
videoplayback/inc/mpxvideoplaybackcontainer.h
videoplayback/inc/mpxvideoplaybackcontrol.hrh
videoplayback/inc/mpxvideoplaybackcontrolscontroller.h
videoplayback/inc/mpxvideoplaybackdisplayhandler.h
videoplayback/inc/mpxvideoplaybackmediadetailsviewer.h
videoplayback/inc/mpxvideoplaybackuserinputhandler.h
videoplayback/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/videohelix/group/mpxvideohelixplayback.mmp
videoplayback/videohelix/inc/mpxvideohelixplayback.h
videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h
videoplayback/videohelix/src/mpxvideohelixplayback.cpp
videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp
videoplayback/videohelix/src/mpxvideoplaybackmode.cpp
videoplayback/videohelix/src/mpxvideoplaybackstate.cpp
videoplayback/videohelix/src/mpxvideoplayerutility.cpp
videoplayback/videohelix/src/mpxvideoseeker.cpp
videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg
videoplayback/videohelix/tsrc/ut_videohelixtest/group/videohelixtest.mmp
videoplayback/videohelix/tsrc/ut_videohelixtest/inc/videohelixtest.h
videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolconfiguration.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackmediadetailsviewer.cpp
videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/conf/ui_videoplaybackcontrolstest.cfg
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/videoplaybackcontrolstestblocks.cpp
videoplayback/videoplaybackviews/bwins/mpxvideoplaybackviewsu.def
videoplayback/videoplaybackviews/group/mpxvideoplaybackviews.mmp
videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp
videoplayback/videoplaybackviews/src/mpxvideopdlplaybackview.cpp
videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp
videoplayback/videoplaybackviews/src/mpxvideoplaybackdisplayhandler.cpp
videoplayback/videoplaybackviews/src/mpxvideoplaybackuserinputhandler.cpp
videoplayback/videoplaybackviews/src/mpxvideoplaybackview.cpp
videoplayback/videoplaybackviews/src/mpxvideoplaybackviewfiledetails.cpp
videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/bwins/ui_userinputhandlertestu.def
videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/conf/ui_userinputhandlertest.cfg
videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/eabi/ui_userinputhandlertestu.def
videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/inc/userinputhandlertest.h
videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/src/userinputhandlertestBlocks.cpp
videoplayer_plat/video_player_file_details_dialog_api/inc/filedetailspluginif.h
videoplayerapp/mpxvideoplayer/inc/mpxvideoplayerappuiengine.h
videoplayerapp/mpxvideoplayer/src/mpxvideoembeddedpdlhandler.cpp
videoplayerapp/mpxvideoplayer/src/mpxvideoplayerappui.cpp
videoplayerapp/mpxvideoplayer/src/mpxvideoplayerappuiengine.cpp
videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/src/mpxvideoplayer_appuienginetester.cpp
--- a/filedetails/filedetailsdialog/src/MPFileDetailsDialog.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/filedetails/filedetailsdialog/src/MPFileDetailsDialog.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 */
 
 
-// Version : %version: 19 %
+// Version : %version: 20 %
 
 // INCLUDE FILES
 #include <aknlists.h>
@@ -517,6 +517,11 @@
     }
 
     delete this;
+    
+    if ( KLeaveExit == err )
+        {
+        User::Leave( err );
+        }
 }
 
 // -----------------------------------------------------------------------------
--- a/filedetails/filedetailsplugin/inc/filedetailsplugin.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/filedetails/filedetailsplugin/inc/filedetailsplugin.h	Mon Mar 15 12:40:47 2010 +0200
@@ -49,7 +49,7 @@
            * @param    aDetails  Already constructed details to be shown    
            * @return   None
            */  
-        void ShowFileDetails( const CMPXMedia& aMedia );
+        void ShowFileDetailsL( const CMPXMedia& aMedia );
 
     private:// Constructors and destructor
 
--- a/filedetails/filedetailsplugin/src/filedetailsplugin.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/filedetails/filedetailsplugin/src/filedetailsplugin.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -60,21 +60,21 @@
 //
 // -----------------------------------------------------------------------------
 //  
-void CFileDetailsPlugin::ShowFileDetails( const CMPXMedia& aMedia )
+void CFileDetailsPlugin::ShowFileDetailsL( const CMPXMedia& aMedia )
     {  
-    CMPFileDetailsDialog* detailsDialog = CMPFileDetailsDialog::NewL(); 
     CMPFileDetails* details = new (ELeave) CMPFileDetails();
+    CleanupStack::PushL( details );
     
     //File path    
     if ( aMedia.IsSupported( KMPXMediaGeneralUri ) )
         {
-        details->iFilePath = aMedia.ValueText( KMPXMediaGeneralUri ).AllocLC();                
+        details->iFilePath = aMedia.ValueText( KMPXMediaGeneralUri ).AllocL();                
         }
     
     //Name    
     if ( aMedia.IsSupported( KMPXMediaGeneralTitle ) )
         {
-        details->iTitle = aMedia.ValueText( KMPXMediaGeneralTitle ).AllocLC();                
+        details->iTitle = aMedia.ValueText( KMPXMediaGeneralTitle ).AllocL();                
         }
     else if ( details->iFilePath )
         {
@@ -100,13 +100,13 @@
     //Copyright
     if ( aMedia.IsSupported( KMPXMediaGeneralCopyright ) )
         {
-        details->iCopyright = aMedia.ValueText( KMPXMediaGeneralCopyright ).AllocLC();        
+        details->iCopyright = aMedia.ValueText( KMPXMediaGeneralCopyright ).AllocL();        
         }
     
     //MIME
     if ( aMedia.IsSupported( KMPXMediaGeneralMimeType ) )
         {
-        details->iFormat = aMedia.ValueText( KMPXMediaGeneralMimeType ).AllocLC();        
+        details->iFormat = aMedia.ValueText( KMPXMediaGeneralMimeType ).AllocL();        
         }
     
     // File creation date
@@ -138,32 +138,12 @@
     //Artist    
    if ( aMedia.IsSupported( KMPXMediaVideoArtist ) )
        {
-       details->iArtist = aMedia.ValueText( KMPXMediaVideoArtist ).AllocLC();                
+       details->iArtist = aMedia.ValueText( KMPXMediaVideoArtist ).AllocL();                
        } 
-             
+
+    // Show details dialog
+    CMPFileDetailsDialog* detailsDialog = CMPFileDetailsDialog::NewL(); 
     detailsDialog->ExecuteLD( details );
-    
-    // cleanup
-    if( details->iFormat )
-        {
-        CleanupStack::PopAndDestroy( details->iFormat );
-        details->iFormat = NULL;
-        }    
-    if( details->iCopyright )
-        {
-        CleanupStack::PopAndDestroy( details->iCopyright );
-        details->iCopyright = NULL;
-        }
-    if( details->iTitle )
-        {
-        CleanupStack::PopAndDestroy( details->iTitle );
-        details->iTitle = NULL;
-        }
-    if( details->iFilePath )
-        {
-        CleanupStack::PopAndDestroy( details->iFilePath );
-        details->iFilePath = NULL;
-        }   
-  
-    delete details;
+
+    CleanupStack::PopAndDestroy( details );
     }
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideodataupdater.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideodataupdater.h	Mon Mar 15 12:40:47 2010 +0200
@@ -123,6 +123,14 @@
          */
         void ReleaseData( TMPXItemId aMPXItemId );
         
+        /**
+         * Called when user wants to move or delete video from UI. Removes
+         * data item from buffer and cancels ongoing thumbnail generation.
+         * 
+         * @param aMPXItemId MPX item id of video data.         
+         */
+        void PrepareForMoveOrDelete( TMPXItemId aMPXItemId );
+        
     public: // From MThumbnailManagerObserver
         
         /**
@@ -191,9 +199,11 @@
         
         /**
          * Selects next index to be fetched.
-         * @param aSelectForPeekOnly  
+         * 
+         * @param aSelectForPeekOnly    Select for peek only.
+         * @return ETrue if selected otherwise EFalse.
          */
-        void SelectNextIndexL( TBool aSelectForPeekOnly );
+        TBool SelectNextIndexL( TBool aSelectForPeekOnly );
         
         /**
          * Removes item from fetch array.
@@ -201,6 +211,13 @@
          * @param aIndex Index of fetch array.
          */
         void RemoveItem( TInt aIndex );
+        
+        /**
+         * Removes item from fetch array and cancel thumbnail generation.
+         * 
+         * @param aIndex Index of fetch array.         
+         */
+        void RemoveAndCancelThumbnailGeneration( TInt aIndex );
                 
         /**
          * Cancels possibly ongoing activities (thumbnail generation, DRM check).
@@ -251,12 +268,17 @@
 
         /**
          * Checks DRM properties
+		 *
+		 * @param aVideoData	Reference to video data.
          */
         void CheckDrmL( CVcxHgMyVideosVideoData& aVideoData );
 
         /**
          * Gets active request count
-         */
+         *
+		 * @param aPeekRequests	On return number of peek requests.
+		 * @param aGetRequests	On return number of get requests.
+		 */
         void GetActiveRequestCount( TInt& aPeekRequests, TInt& aGetRequests );
 
         /**
@@ -264,6 +286,65 @@
          */
         void StartThumbnailL( CVcxHgMyVideosVideoData& aItem, TBool aPeek );
 
+        /**
+         * Tries to select item for fetch.
+		 * 
+		 * @param aIndex				Index
+		 * @param aSelectForPeekOnly	ETrue
+		 * @return ETrue if selected, otherwise EFalse
+         */
+        TBool TrySelectL( TInt aIndex, TBool aSelectForPeekOnly );
+
+        /**
+         * Tries to select item for fetch.
+		 *
+		 * @param aPos                Scroller position.
+		 * @param aSelectForPeekOnly  Select for peek only status.
+		 * @return ETrue if selected, otherwise EFalse.
+         */
+        TBool TrySelectFromScrollerL( TInt aPos, TBool aSelectForPeekOnly );
+
+        /**
+         * Tries to select item for fetch.
+		 *
+		 * @param aStartPos           Start position.
+         * @param aEndPos             End position.
+		 * @param aSelectForPeekOnly  Select for peek only status.
+		 * @return ETrue if selected, otherwise EFalse.
+         */
+        TBool TrySelectFromScrollerAreaL( TInt aStartPos, 
+                                          TInt aEndPos,
+                                          TBool aSelectForPeekOnly );
+
+        /**
+         * Starts final actions for finished thumbnails
+         */
+        void StartFinalActions();
+
+        /**
+         * Checks if cancellation of activities is needed for item
+		 *
+		 * @param aItem		Reference to data item.
+		 * @return ETrue if cancel is needed, otherwise EFalse.
+         */
+        TBool CancelNeeded( CVcxHgMyVideosVideoData& aItem );
+
+        /**
+         * Callback method for RetryTimer.  
+         */
+        static TInt RetryTimerCallBack( TAny* aAny );
+
+        /**
+         * Gets scroller area
+		 *
+		 * @param aFirstIndexOnScreen     First index on screen.
+ 		 * @param aLastIndexOnScreen      Last index on screen.
+		 * @param aLastIndex              Last index.
+         */
+        void GetScrollerArea( TInt& aFirstIndexOnScreen, 
+							  TInt& aLastIndexOnScreen,
+        					  TInt& aLastIndex );
+
     protected:
 
         /**
@@ -300,11 +381,28 @@
          * Flag for pause state.
          */
         TBool iPaused;
-                
+
+        /**
+         * Stores previous first scroller index for checking scroll direction 
+         */
+        TInt iPreviousFirstScrollerIndex;
+
         /**
-         * Flag indicates that list refresh is delayed. 
+         * Stores time of previous scroller first index update
+         */
+        TInt64 iPreviousFirstScrollerIndexTime;
+
+        /** 
+         * Used for restarting thumbnail creation after scroll
+         * Own.
          */
-        TBool iListRefreshIsDelayed;
+        CPeriodic* iRetryTimer;
+
+        /**
+         * For refresh logic
+         */
+        TBool iPreviousModifiedIndexOnScreen;
+
     };
 
 #endif // VCXHGMYVIDEOSVIDEODATAUPDATER_H
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideodetailsdialog.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideodetailsdialog.h	Mon Mar 15 12:40:47 2010 +0200
@@ -20,8 +20,34 @@
 #ifndef VCXHGMYVIDEOSVIDEODETAILS_H_
 #define VCXHGMYVIDEOSVIDEODETAILS_H_
 
-NONSHARABLE_CLASS ( TVcxHgMyVideosVideoDetailsDialog )
+
+#include <mpxmedia.h>
+
+NONSHARABLE_CLASS ( CVcxHgMyVideosVideoDetailsDialog ) : public CBase
     {
+    public:// Constructors and destructor
+
+        /**
+        * Two-phased constructor.        
+        */
+        static CVcxHgMyVideosVideoDetailsDialog* NewL();
+        
+        /**
+        * C+ destructor
+        */
+        virtual ~CVcxHgMyVideosVideoDetailsDialog();        
+
+    public:        
+        
+        /**
+         *  Provides the static function for the callback to show file details.
+         *  Called by CIdle iDetailsAo.
+         *
+         *  @param aPtr Pointer to callback class
+         */
+        static TInt ShowDetailsL( TAny* aPtr );
+                
+        
     public:
         
         /**
@@ -36,7 +62,33 @@
         /**
          * Default C++ constructor. By default it is private
          */
-        TVcxHgMyVideosVideoDetailsDialog();
+        CVcxHgMyVideosVideoDetailsDialog();
+      
+        /**
+         * Symbian 2nd phase constructor.
+         */        
+        void ConstructL();
+
+        /*
+         *  Activates an active object to display details.
+         */    
+        void ActivateDetailsActiveObject();
+
+        /*
+         *  Called to display file details.
+         */   
+        void DoShowDetailsL();
+
+        /*
+         *  Pointer to MPX media for which details are displayed. Own.
+         */   
+        CMPXMedia* iDetailsMedia;
+
+        /*
+         *  Active object to cut call stack and display details. Own.
+         */  
+        CIdle* iDetailsAo;
+        
     };
 
 #endif /*VCXHGMYVIDEOSVIDEODETAILS_H_*/
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistimpl.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideolistimpl.h	Mon Mar 15 12:40:47 2010 +0200
@@ -397,6 +397,17 @@
         CHgMyVideosAiwMenuHandler* AiwMenuHandlerL();
 #endif
 
+        /**
+         * OperationTargetsToMpxIdsL
+         * Translates the target ui indexes to mpx ids. Needed for targeting 
+         * list items if list may change while the requested operation is ongoing.
+         *
+         * @param operationTargetIndexes IN: Ui idexes of the target items
+         * @param operationTargetIds OUT: Mpx ids of the target items
+         */
+        void OperationTargetsToMpxIdsL( RArray<TInt>& operationTargetIndexes,  
+                                        RArray<TInt>& operationTargetIds );
+
     protected:
     
         /**
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h	Mon Mar 15 12:40:47 2010 +0200
@@ -34,7 +34,7 @@
 class CMPXMedia;
 class CVcxHgMyVideosVideoDataUpdater;
 class CVcxHgMyVideosDownloadUpdater;
-class TVcxHgMyVideosVideoDetailsDialog;
+class CVcxHgMyVideosVideoDetailsDialog;
 class CVcxHgMyVideosVideoList;
 class CHgScroller;
 class CMyVideosIndicator;
@@ -186,6 +186,14 @@
         const TDesC& GetVideoUri( TInt aIndex );
         
         /**
+         * Returns video's unique mpx id.
+         * 
+         * @param aIndex Video's index on UI list.
+         * @return Video's id or KErrNotFound.
+         */  
+        TInt GetVideoId( TInt aIndex );
+        
+        /**
          * Returns video size in bytes
          * 
          * @param aIndex Video's index on UI list.
@@ -194,16 +202,16 @@
         TInt64 GetVideoSize( TInt aIndex );
 
         /**
-         * Deletes videos from requested indexes.
+         * Deletes videos with requested ids.
          * 
-         * @param aOperationTargets Video indexes.
+         * @param aOperationTargets Videos' mpx ids.
          */
         void DeleteVideosL( const RArray<TInt>& aOperationTargets );
 
         /**
-         * Moves or copies videos from requested indexes to given target.
+         * Moves or copies videos with requested ids to given target.
          * 
-         * @param aOperationTargets Video indexes.
+         * @param aOperationTargets Videos' mpx ids.
          * @param aTargetDrive Target drive.
          * @param aCopy If ETrue, copy is performed. If EFalse, move.
          */
@@ -503,7 +511,7 @@
          * Video details dialog.
          * Own.
          */
-        TVcxHgMyVideosVideoDetailsDialog* iVideoDetails;
+        CVcxHgMyVideosVideoDetailsDialog* iVideoDetails;
         
         /**
          * Reference to video list implementation.
--- a/videocollection/hgmyvideos/src/vcxhgmyvideoscategorymodelhandler.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideoscategorymodelhandler.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -36,6 +36,8 @@
 #include <AknsUtils.h>
 #include <AknUtils.h>
 #include <aknlayoutscalable_avkon.cdl.h>
+#include <coemain.h>
+#include <aknappui.h>
 
 #include <vcxhgmyvideosicons.mbg>
 #include <myvideosindicator.h>
@@ -873,6 +875,15 @@
     IPTVLOGSTRING_LOW_LEVEL( "MPX My Videos UI # CategoryListFetchingCompletedL()" ); 
     FetchLastWatchedL();
     SetLastWatchedIndicatorL();
+
+    // Send custom command to appui that signals that the 
+    // my videos main view is constructed.
+    CAknAppUi* appui = static_cast<CAknAppUi*>( CCoeEnv::Static()->AppUi() );
+    
+    if ( appui )
+        {
+        appui->HandleCommandL( KVcxMyVideosCmdDoLateConstruct );
+        }
     }
 
 // -----------------------------------------------------------------------------
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideocopier.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideocopier.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -151,7 +151,13 @@
         // in DialogDismissedL() or in VideoMoveOrCopyCompletedL().
         OpenMoveCopyWaitNoteL( aOperationTargets, aCopy );
 
-        iVideoModel.MoveOrCopyVideosL( aOperationTargets, targetDrive, aCopy );
+        TRAPD( ret, iVideoModel.MoveOrCopyVideosL( aOperationTargets, targetDrive, aCopy ));
+        
+        if( ret != KErrNone )
+            {
+            CloseMoveCopyWaitNote();
+            }
+        
         iCopy = aCopy;
         }
     }
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideodataupdater.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideodataupdater.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -41,9 +41,22 @@
 #include "vcxhgmyvideosindicatorhelper.h"
 #include "vcxhgmyvideosthumbnailmanager.h"
 
-const TInt KRefreshTimerInterval( 1000000 ); // 1 second
-const TInt KMaxThumbnailReqs( 2 ); // Max count of peek and get reqs combined
-const TInt KMaxThumbnailGetReqs( 1 ); // Max count of get reqs
+const TInt KRefreshTimerInterval( 1000000 );    // 1 second
+const TInt KMaxThumbnailReqs( 2 );              // Max count of peek and get reqs combined
+const TInt KMaxThumbnailGetReqs( 1 );           // Max count of get reqs
+const TInt KMaxPredictiveSelect( 10 );          // Max range for selecting items before/after visible area
+const TInt KScrollCheckInterval( 250000 );      // 0.25 seconds
+
+// -----------------------------------------------------------------------------
+// TimeStamp
+// -----------------------------------------------------------------------------
+//
+static TInt64 TimeStamp()
+    {
+    TTime time;
+    time.UniversalTime();
+    return time.Int64();
+    }
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -106,6 +119,7 @@
 void CVcxHgMyVideosVideoDataUpdater::ConstructL()
     {
     iRefreshTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+    iRetryTimer =   CPeriodic::NewL( CActive::EPriorityStandard );
     iModel.ThumbnailManager().AddObserverL( *this );
     }
 
@@ -130,6 +144,7 @@
     iModel.ThumbnailManager().RemoveObserver( *this );
     Cancel();
     delete iRefreshTimer; // Cancels active timer
+    delete iRetryTimer;
     iFetchArray.ResetAndDestroy();
     }
 
@@ -181,7 +196,40 @@
 //
 void CVcxHgMyVideosVideoDataUpdater::ReleaseData( TMPXItemId aMPXItemId )
     {
-    RemoveItem( IndexByMPXItemId( aMPXItemId ) );  
+    TInt index = IndexByMPXItemId( aMPXItemId );
+    if ( index >= 0 )
+        {
+        RemoveItem( index ); 
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDataUpdater::PrepareForMoveOrDelete()
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoDataUpdater::PrepareForMoveOrDelete( TMPXItemId aMPXItemId )
+    {
+    TInt index = IndexByMPXItemId( aMPXItemId );
+    if ( index >= 0 )
+        {
+        RemoveAndCancelThumbnailGeneration( index ); 
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDataUpdater::RemoveAndCancelThumbnailGeneration()
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoDataUpdater::RemoveAndCancelThumbnailGeneration( TInt aIndex )
+    {
+    if ( aIndex >= 0 && aIndex < iFetchArray.Count() )
+        {
+        // Can be enabled when cancellation of (hd) thumbnail gets faster and
+        // does not hang up UI
+        CancelActivities( aIndex );
+        delete iFetchArray[aIndex];
+        iFetchArray.Remove( aIndex );
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -191,13 +239,19 @@
 void CVcxHgMyVideosVideoDataUpdater::RemoveItem( TInt aIndex )
     {
     if ( aIndex >= 0 && aIndex < iFetchArray.Count() )
-        {
-        CancelActivities( aIndex );
+        {    
+        CVcxHgMyVideosVideoData* item = iFetchArray[aIndex];
         
-        delete iFetchArray[aIndex];
-        iFetchArray[aIndex] = NULL;
-        iFetchArray.Remove( aIndex );
-        }    
+        // When scrolling around canceling thumbnail creation is sometimes so slow
+        // that it hangs UI for while. Thumbnail is needed sooner or later anyway.
+        // Therefore let creation get finished in peace. It is possible to fetch already 
+        // created thumbs during creation but not during hang up. 
+        if ( item && !CancelNeeded( *item ) )
+            {
+            delete item;
+            iFetchArray.Remove( aIndex );
+            }         
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -221,10 +275,8 @@
     {    
     if ( aIndex >= 0 && aIndex < iFetchArray.Count() )
         {
-		CVcxHgMyVideosVideoData* item = iFetchArray[aIndex];
-        CVcxHgMyVideosVideoData::TVideoDataState state = item->State();
-        if ( state == CVcxHgMyVideosVideoData::EVideoDataStateThumbnailPeekStarted ||
-             state == CVcxHgMyVideosVideoData::EVideoDataStateThumbnailStarted )
+        CVcxHgMyVideosVideoData* item = iFetchArray[aIndex];
+        if ( item && CancelNeeded( *item ) )
             {
             iModel.ThumbnailManager().Cancel( item->ThumbnailConversionId() );
             }
@@ -236,13 +288,17 @@
 // -----------------------------------------------------------------------------
 //
 void CVcxHgMyVideosVideoDataUpdater::CancelAndDeleteFetchArray()
-    {    
+    {
     TInt count = iFetchArray.Count();
     for ( TInt i = 0; i < count; i++ )
         {
         CancelActivities( i );
         }
     iFetchArray.ResetAndDestroy();
+    
+    iPreviousFirstScrollerIndexTime = 0;
+    iPreviousFirstScrollerIndex = iScroller.FirstIndexOnScreen();
+    iPreviousModifiedIndexOnScreen = EFalse;
     }
 
 // -----------------------------------------------------------------------------
@@ -251,9 +307,11 @@
 //
 void CVcxHgMyVideosVideoDataUpdater::ContinueVideoDataFetchingL()
     {
+    iRetryTimer->Cancel();
     if ( !iPaused && iVideoArray.VideoCount() > 0 && iFetchArray.Count() > 0 )
         {
-        TBool startRefreshTimer = EFalse;
+        TInt64 time = TimeStamp();
+        TBool refreshTimerNeeded = EFalse;
         TInt peekReqs = 0;
         TInt getReqs = 0;
         GetActiveRequestCount( peekReqs, getReqs );
@@ -268,7 +326,21 @@
                 {
                 TInt err = KErrNone;
                 prevItem = item;
-                SelectNextIndexL( getReqs >= KMaxThumbnailGetReqs );
+                if ( !SelectNextIndexL( getReqs >= KMaxThumbnailGetReqs ) )
+                    {
+                    // Nothing to be started
+                    if ( !reqs && iFetchArray.Count() > 0 )
+                        {
+                        // To ensure that thumbnail creation continues after
+                        // disabled while scrolling
+                        iRetryTimer->Start( KScrollCheckInterval, KScrollCheckInterval,
+                            TCallBack( RetryTimerCallBack, this ) );
+                        iPreviousFirstScrollerIndexTime = 0; // Force scroll check update
+                        IPTVLOGSTRING_LOW_LEVEL(
+                           "MPX My Videos UI # ContinueVideoDataFetchingL # iRetryTimer start" );
+                        }
+                    break;
+                    }
                 item = iFetchArray[0];
                 state = item->State();
                 if ( state == CVcxHgMyVideosVideoData::EVideoDataStateNone )
@@ -278,7 +350,7 @@
                     if( err == KErrNone )
                         {
                         ++reqs;
-                        startRefreshTimer = ETrue;
+                        refreshTimerNeeded = ETrue;
                         }
                     }
                 else if ( state == CVcxHgMyVideosVideoData::EVideoDataStateThumbnailPeekFinished ) 
@@ -291,14 +363,10 @@
                             {
                             ++reqs;
                             ++getReqs;
-                            startRefreshTimer = ETrue;
+                            refreshTimerNeeded = ETrue;
                             }
                         }
                     }
-                else
-                    {
-                    break; // Nothing to be started
-                    }
                 if ( err != KErrNone )
                     {
                     RemoveItem( 0 );
@@ -306,11 +374,18 @@
                 }
             while ( iFetchArray.Count() > 0 && reqs < KMaxThumbnailReqs && prevItem != item );
             }
-        if ( startRefreshTimer )
+        if ( refreshTimerNeeded && !iRefreshTimer->IsActive() )
             {
-            iRefreshTimer->Cancel();
             iRefreshTimer->Start( KRefreshTimerInterval, KRefreshTimerInterval,
                 TCallBack( RefreshTimerCallBack, this ) );
+            IPTVLOGSTRING_LOW_LEVEL(
+               "MPX My Videos UI # ContinueVideoDataFetchingL # iRefreshTimer start" );
+            }
+        if ( time - iPreviousFirstScrollerIndexTime >= KScrollCheckInterval )
+            {
+            // Store values for scroll direction check
+            iPreviousFirstScrollerIndexTime = time;
+            iPreviousFirstScrollerIndex = iScroller.FirstIndexOnScreen();
             }
         }
     }
@@ -412,60 +487,76 @@
 // CVcxHgMyVideosVideoDataUpdater::SelectNextIndexL()
 // -----------------------------------------------------------------------------
 // 
-void CVcxHgMyVideosVideoDataUpdater::SelectNextIndexL( TBool aSelectForPeekOnly )
-    {   
-    TInt firstIndexOnScreen = iScroller.FirstIndexOnScreen();
-    
-    if ( firstIndexOnScreen < 0 ) 
-        {
-        firstIndexOnScreen = 0;
-        }
-    
-    TInt lastIndexOnScreen = firstIndexOnScreen + iScroller.ItemsOnScreen();
-   
-    if ( lastIndexOnScreen >= iScroller.ItemCount() )
+TBool CVcxHgMyVideosVideoDataUpdater::SelectNextIndexL( TBool aSelectForPeekOnly )
+    {
+    TBool selected = EFalse;
+    if ( iScroller.ItemCount() > 0 )
         {
-        lastIndexOnScreen = iScroller.ItemCount() - 1;
-        }
-         
-    // If visible items not found, updater takes object from 0 index. 
-    for ( TInt i = firstIndexOnScreen; i <= lastIndexOnScreen; i++ )
-        {      
-        TInt index( KErrNotFound );
-        TMPXItemId mpxItemId;
-        CGulIcon* icon( NULL );
-        
-        // Skip if list item already have a thumbnail.
-        icon = iScroller.ItemL( i ).Icon();
-        if ( !icon )
+        TInt firstIndexOnScreen = 0;
+        TInt lastIndexOnScreen = 0;
+        TInt lastIndex = 0;
+        GetScrollerArea( firstIndexOnScreen, lastIndexOnScreen, lastIndex );
+
+        // Determine scroll direction for optimal selection
+        TInt maxPredict = KMaxPredictiveSelect;
+        TBool scrollUp = iPreviousFirstScrollerIndex > firstIndexOnScreen;
+        TBool scrollDown = iPreviousFirstScrollerIndex < firstIndexOnScreen;
+        if ( scrollUp || scrollDown )
             {
-            mpxItemId = iVideoArray.ArrayIndexToMpxItemIdL( i );
-            index = IndexByMPXItemId( mpxItemId );
+            if ( scrollUp )
+                {
+                IPTVLOGSTRING_LOW_LEVEL(
+                   "MPX My Videos UI # CVcxHgMyVideosVideoDataUpdater # scroll up" );
+                }
+            else
+                {
+                IPTVLOGSTRING_LOW_LEVEL(
+                    "MPX My Videos UI # CVcxHgMyVideosVideoDataUpdater # scroll down" );
+                }
+            aSelectForPeekOnly = ETrue; // Disable thumb creation while scrolling
+            }
+        else
+            {
+            maxPredict /= 2; // Split range when checking both directions
+            }
 
-            if ( index >= 0 )
+        if ( !aSelectForPeekOnly || scrollUp )
+            {
+            // Try visible area first with thumb creation disabled to get
+            // already created thumbs as fast as possible
+            selected = TrySelectFromScrollerAreaL( firstIndexOnScreen, 
+                                                   lastIndexOnScreen,
+                                                   ETrue );
+            }
+        if ( !selected && !scrollUp )
+            {
+            // Try visible area and items below
+            TInt end = Min( lastIndexOnScreen + maxPredict, lastIndex );
+            selected = TrySelectFromScrollerAreaL( firstIndexOnScreen, end, 
+                    aSelectForPeekOnly );
+            }
+        if ( !selected && !scrollDown && firstIndexOnScreen > 0 )
+            {
+            // Try items above visible area
+            TInt end = Max( firstIndexOnScreen - maxPredict - 1, 0 );
+            selected = TrySelectFromScrollerAreaL( firstIndexOnScreen - 1, end,
+                    aSelectForPeekOnly );
+            }
+        if ( !selected )
+            {
+            // Try any item
+            TInt count = iFetchArray.Count();
+            for ( TInt i = 0; i < count; i++ )
                 {
-                CVcxHgMyVideosVideoData* item = iFetchArray[index];
-                CVcxHgMyVideosVideoData::TVideoDataState state = item->State();
-                // Move selected index to first index of the fetch array. 
-                if ( aSelectForPeekOnly )
+                if ( TrySelectL( i, aSelectForPeekOnly ) )
                     {
-                    if ( state == CVcxHgMyVideosVideoData::EVideoDataStateNone )
-                        {
-                        iFetchArray.InsertL( item, 0 );
-                        iFetchArray.Remove( index + 1 );
-                        break;
-                        }
-                    }
-                else if ( state == CVcxHgMyVideosVideoData::EVideoDataStateNone ||
-                          state == CVcxHgMyVideosVideoData::EVideoDataStateThumbnailPeekFinished )
-                    {
-                    iFetchArray.InsertL( item, 0 );
-                    iFetchArray.Remove( index + 1 );
+                    selected = ETrue;
                     break;
                     }
                 }
             }
         }
+    return selected;
     }
 
 // -----------------------------------------------------------------------------
@@ -475,15 +566,21 @@
 TInt CVcxHgMyVideosVideoDataUpdater::RefreshTimerCallBack( TAny* aAny )
     {
     CVcxHgMyVideosVideoDataUpdater* self = static_cast<CVcxHgMyVideosVideoDataUpdater*>( aAny ); 
-    self->iRefreshTimer->Cancel();
-    if ( self->iListRefreshIsDelayed )
+    if ( !self->iPaused && self->iFetchArray.Count() > 0 )
         {
-        self->iListRefreshIsDelayed = EFalse;
-        if ( !self->iPaused )
+        // Do refresh only if on screen item has been modified
+        if ( self->iPreviousModifiedIndexOnScreen )
             {
+            self->iPreviousModifiedIndexOnScreen = EFalse; // Reset refresh checking
             self->RefreshScreen();
             }
         }
+    else
+        {
+        self->iRefreshTimer->Cancel();
+        IPTVLOGSTRING_LOW_LEVEL(
+           "MPX My Videos UI # RefreshTimerCallBack # iRefreshTimer stop" );
+        }
     return KErrNone;
     }
 
@@ -503,40 +600,38 @@
 //
 TBool CVcxHgMyVideosVideoDataUpdater::ListRefreshNeeded( TInt aIndex )
     {
-    TBool modifiedIndexOnScreen( EFalse );
-    TInt firstIndexOnScreen( iScroller.FirstIndexOnScreen() );
-    
-    if ( firstIndexOnScreen < 0 )
-        {
-        firstIndexOnScreen = 0;
-        }
+    TInt firstIndexOnScreen = 0;
+    TInt lastIndexOnScreen = 0;
+    TInt lastIndex = 0;
+    GetScrollerArea( firstIndexOnScreen, lastIndexOnScreen, lastIndex );
     
-    TInt lastIndexOnScreen = firstIndexOnScreen + iScroller.ItemsOnScreen(); 
-    
-    if ( lastIndexOnScreen >= iScroller.ItemCount() )
-        {
-        lastIndexOnScreen = iScroller.ItemCount() - 1;
-        }
-         
-    if ( aIndex >= firstIndexOnScreen && aIndex <= lastIndexOnScreen )
+    TBool modifiedIndexOnScreen = aIndex >= firstIndexOnScreen &&
+        aIndex <= lastIndexOnScreen;
+    TBool refreshNeeded( EFalse );
+
+    // Refresh rules:
+    // 1) Refresh if off screen item is detected after on screen item
+    // 2) Refresh if item is the last
+    if ( ( iPreviousModifiedIndexOnScreen && !modifiedIndexOnScreen ) ||
+         iFetchArray.Count() <= 1 )
         {
-        modifiedIndexOnScreen = ETrue;
+        // Restart refresh timer if there are items left after current one
+        iRefreshTimer->Cancel();
+        if ( iFetchArray.Count() > 1 )
+            {
+            iRefreshTimer->Start( KRefreshTimerInterval, KRefreshTimerInterval,
+                TCallBack( RefreshTimerCallBack, this ) );
+            IPTVLOGSTRING_LOW_LEVEL(
+               "MPX My Videos UI # ListRefreshNeeded # iRefreshTimer start" );
+            }
+        else
+            {
+            IPTVLOGSTRING_LOW_LEVEL(
+               "MPX My Videos UI # ListRefreshNeeded # iRefreshTimer stop" );
+            }
+        refreshNeeded = ETrue;
         }
-    
-    TBool timerHasExpired( ! iRefreshTimer->IsActive() );
-    TBool refreshNeeded( EFalse );
-    
-    if ( ( iListRefreshIsDelayed && !modifiedIndexOnScreen ) 
-            || iFetchArray.Count() <= 1 || timerHasExpired )
-        {
-        iListRefreshIsDelayed = EFalse;
-        refreshNeeded = ETrue;        
-        }        
-    else if ( modifiedIndexOnScreen )
-        {
-        iListRefreshIsDelayed = ETrue;    
-        }
-    
+    iPreviousModifiedIndexOnScreen = modifiedIndexOnScreen;
     return refreshNeeded;
     }
 
@@ -575,6 +670,7 @@
                 // Never delete this, ownership gone to Ganes list
                 item->SetThumbnail( aError == KErrNone ? aThumbnail.DetachBitmap() : NULL );
                 item->SetState( CVcxHgMyVideosVideoData::EVideoDataStateThumbnailFinished );
+                StartFinalActions();
                 }
             else if ( aError == KErrNotFound &&
             	item->State() == CVcxHgMyVideosVideoData::EVideoDataStateThumbnailPeekStarted )
@@ -586,15 +682,7 @@
                 {
                 // Stop thumbnail peek attemps
                 item->SetState( CVcxHgMyVideosVideoData::EVideoDataStateThumbnailFinished );
-                }
-
-			// Start DRM check if thumb finished
-            if ( item->State() == CVcxHgMyVideosVideoData::EVideoDataStateThumbnailFinished && 
-			     !IsActive() )
-                {
-                SetActive();
-                TRequestStatus* stat = &iStatus;
-                User::RequestComplete( stat, KErrNone );
+                StartFinalActions();
                 }
 
             TRAPD( err, ContinueVideoDataFetchingL() );
@@ -618,8 +706,8 @@
     {
     if ( !iPaused )
         {
-        TInt i = 0;
-        while( i < iFetchArray.Count() )
+        TInt i = iFetchArray.Count() - 1;
+        while( i >= 0 )
             {
             CVcxHgMyVideosVideoData* item = iFetchArray[i];
             if ( item->State() == CVcxHgMyVideosVideoData::EVideoDataStateThumbnailFinished )
@@ -628,16 +716,28 @@
                     {
                     CheckDrmL( *item );
                     UpdateVideoDataToUiL( *item );
-                    } );
-                delete iFetchArray[i];
+                    } );				
+                delete item;
                 iFetchArray.Remove(i);
+#if 0
+                if ( iFetchArray.Count() > 0 )
+                    {
+                    // If drm checking is time consuming, proceed finalisation later
+                    StartFinalActions();
+                    break;
+                    }
+#endif
                 }
-            else
-                {
-                ++i;
-                }
+            --i;
             }
-        ContinueVideoDataFetchingL();
+        if ( !iFetchArray.Count() )
+            {
+            // No items left, timers are not needed anymore
+            iRefreshTimer->Cancel();
+            iRetryTimer->Cancel();
+            IPTVLOGSTRING_LOW_LEVEL(
+               "MPX My Videos UI # RunL # iRefreshTimer stop" );
+            }
         }
     }
 
@@ -762,10 +862,11 @@
             }
         aItem.SetThumbnailConversionId( id );
 
-        IPTVLOGSTRING3_LOW_LEVEL( 
-                "MPX My Videos UI # GetThumbnailL() called thumbID %d for %S.",
+        IPTVLOGSTRING4_LOW_LEVEL( 
+                "MPX My Videos UI # StartThumbnailL() called thumbID %d for %S (peek %d)",
                 aItem.ThumbnailConversionId(),
-                &media->ValueText( KMPXMediaGeneralUri ) );
+                &media->ValueText( KMPXMediaGeneralUri ),
+                aPeek );
 
         aItem.SetState( aPeek ?
                 CVcxHgMyVideosVideoData::EVideoDataStateThumbnailPeekStarted :
@@ -776,3 +877,157 @@
         User::Leave( KErrNotFound );
         }
     }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDataUpdater::TrySelectL()
+// -----------------------------------------------------------------------------
+//
+TBool CVcxHgMyVideosVideoDataUpdater::TrySelectL( TInt aIndex, 
+                                                  TBool aSelectForPeekOnly )
+    {
+    // Move selected index to first index of the fetch array
+    TBool selected = EFalse;
+    CVcxHgMyVideosVideoData* item = iFetchArray[aIndex];
+    CVcxHgMyVideosVideoData::TVideoDataState state = item->State();
+    if ( aSelectForPeekOnly )
+        {
+        // Accept item only for peeking
+        if ( state == CVcxHgMyVideosVideoData::EVideoDataStateNone )
+            {
+            iFetchArray.InsertL( item, 0 );
+            iFetchArray.Remove( aIndex + 1 );
+            selected = ETrue;
+            }
+        }
+    else if ( state == CVcxHgMyVideosVideoData::EVideoDataStateNone ||
+              state == CVcxHgMyVideosVideoData::EVideoDataStateThumbnailPeekFinished )
+        {
+        // Accept any item that waits to be fetched
+        iFetchArray.InsertL( item, 0 );
+        iFetchArray.Remove( aIndex + 1 );
+        selected = ETrue;
+        }
+    return selected;
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDataUpdater::TrySelectFromScrollerL()
+// -----------------------------------------------------------------------------
+//
+TBool CVcxHgMyVideosVideoDataUpdater::TrySelectFromScrollerL(
+    TInt aPos, TBool aSelectForPeekOnly )
+    {
+    TBool selected = EFalse;
+    CGulIcon* icon = iScroller.ItemL( aPos ).Icon();
+    TMPXItemId mpxItemId = iVideoArray.ArrayIndexToMpxItemIdL( aPos );
+    TInt index = IndexByMPXItemId( mpxItemId );
+    if ( index >= 0 )
+        {
+		// Skip fetch selection if icon already exist
+        if ( !icon )
+            {
+            if ( TrySelectL( index, aSelectForPeekOnly ) )
+                {
+                selected = ETrue;
+                }
+            }
+        else
+            {
+            iFetchArray[index]->SetState(
+                CVcxHgMyVideosVideoData::EVideoDataStateThumbnailFinished );
+            StartFinalActions();
+            }
+        }
+    return selected;
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDataUpdater::TrySelectFromScrollerAreaL()
+// -----------------------------------------------------------------------------
+//
+TBool CVcxHgMyVideosVideoDataUpdater::TrySelectFromScrollerAreaL( 
+    TInt aStartPos, TInt aEndPos, TBool aSelectForPeekOnly )
+    {
+    TBool selected = EFalse;
+    if ( aEndPos >= aStartPos )
+        {
+        // Search forwards
+        for ( TInt i = aStartPos; i <= aEndPos; i++ )
+            {
+            if ( TrySelectFromScrollerL( i, aSelectForPeekOnly ) )
+                {
+                selected = ETrue;
+                break;
+                }
+            }
+        }
+    else
+        {
+        // Search backwards
+        for ( TInt i = aStartPos; i >= aEndPos; i-- )
+            {
+            if ( TrySelectFromScrollerL( i, aSelectForPeekOnly ) )
+                {
+                selected = ETrue;
+                break;
+                }
+            }
+        }
+    return selected;
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDataUpdater::StartFinalActions()
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoDataUpdater::StartFinalActions()
+    {
+    if ( !IsActive() )
+        {
+        SetActive();
+        TRequestStatus* stat = &iStatus;
+        User::RequestComplete( stat, KErrNone );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDataUpdater::CancelNeeded()
+// -----------------------------------------------------------------------------
+//
+TBool CVcxHgMyVideosVideoDataUpdater::CancelNeeded( CVcxHgMyVideosVideoData& aItem )
+    {
+    CVcxHgMyVideosVideoData::TVideoDataState state = aItem.State();
+    return ( state == CVcxHgMyVideosVideoData::EVideoDataStateThumbnailPeekStarted ||
+             state == CVcxHgMyVideosVideoData::EVideoDataStateThumbnailStarted );
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDataUpdater::RetryTimerCallBack()
+// -----------------------------------------------------------------------------
+//
+TInt CVcxHgMyVideosVideoDataUpdater::RetryTimerCallBack( TAny* aAny )
+    {
+    CVcxHgMyVideosVideoDataUpdater* self = static_cast<CVcxHgMyVideosVideoDataUpdater*>( aAny ); 
+    self->iRetryTimer->Cancel();
+    TRAPD( err, self->ContinueVideoDataFetchingL() );
+    if ( err != KErrNone )
+        {
+        IPTVLOGSTRING2_LOW_LEVEL(
+        "MPX My Videos UI # CVcxHgMyVideosVideoDataUpdater::RetryTimerCallBack, err = %d",
+        err );
+        }
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDataUpdater::GetScrollerArea()
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoDataUpdater::GetScrollerArea( TInt& aFirstIndexOnScreen, 
+                                                      TInt& aLastIndexOnScreen, 
+                                                      TInt& aLastIndex )
+    {
+    aLastIndex = Max( iScroller.ItemCount() - 1, 0 );
+    aFirstIndexOnScreen = Max( iScroller.FirstIndexOnScreen(), 0 );
+    aLastIndexOnScreen = Min( aFirstIndexOnScreen + iScroller.ItemsOnScreen(), aLastIndex );
+    }
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideodetailsdialog.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideodetailsdialog.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -19,10 +19,8 @@
 
 // INCLUDE FILES
 #include <aknmessagequerydialog.h>
-#include <mpxmedia.h>
 #include <mpxmediageneraldefs.h>
 #include <vcxmyvideosdefs.h>
-#include <StringLoader.h>
 #include <vcxhgmyvideos.rsg>
 #include "vcxhgmyvideosvideodetailsdialog.h"
 #include <MPFileDetailsDialog.h>
@@ -34,20 +32,104 @@
 // ============================ MEMBER FUNCTIONS =============================
 
 // ---------------------------------------------------------------------------
-// TVcxHgMyVideosVideoDetailsDialog::TVcxHgMyVideosVideoDetailsDialog()
+// CVcxHgMyVideosVideoDetailsDialog::CVcxHgMyVideosVideoDetailsDialog()
+// ---------------------------------------------------------------------------
+//
+CVcxHgMyVideosVideoDetailsDialog::CVcxHgMyVideosVideoDetailsDialog()
+    {
+    
+    }
+
+// ---------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDetailsDialog::CVcxHgMyVideosVideoDetailsDialog()
 // ---------------------------------------------------------------------------
 //
-TVcxHgMyVideosVideoDetailsDialog::TVcxHgMyVideosVideoDetailsDialog()
+CVcxHgMyVideosVideoDetailsDialog::~CVcxHgMyVideosVideoDetailsDialog()
+    {
+    if ( iDetailsAo->IsActive() )
+        {
+        iDetailsAo->Cancel();
+        }
+    delete iDetailsAo;
+    delete iDetailsMedia;
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDetailsDialog::NewL
+//
+// -----------------------------------------------------------------------------
+//
+CVcxHgMyVideosVideoDetailsDialog* CVcxHgMyVideosVideoDetailsDialog::NewL()
     {
+    CVcxHgMyVideosVideoDetailsDialog* self =
+            new (ELeave) CVcxHgMyVideosVideoDetailsDialog();
+	CleanupStack::PushL( self );		
+    self->ConstructL();
+	CleanupStack::Pop( self );
+    return self;        
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDetailsDialog::ConstructL
+//
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoDetailsDialog::ConstructL()
+    {
+    iDetailsAo = CIdle::NewL( CActive::EPriorityStandard );
     }
 
 // ---------------------------------------------------------------------------
-// TVcxHgMyVideosVideoDetailsDialog::ShowVideoDetailsDialogL()
+// CVcxHgMyVideosVideoDetailsDialog::ShowVideoDetailsDialogL()
 // ---------------------------------------------------------------------------
 //
-void TVcxHgMyVideosVideoDetailsDialog::ShowVideoDetailsDialogL( const CMPXMedia& aMedia )
+void CVcxHgMyVideosVideoDetailsDialog::ShowVideoDetailsDialogL( const CMPXMedia& aMedia )
+    {
+    if ( iDetailsMedia )
+        {
+        delete iDetailsMedia;
+        iDetailsMedia = NULL;
+        }
+    iDetailsMedia = CMPXMedia::NewL( aMedia );
+    
+    ActivateDetailsActiveObject();
+    }
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoDetailsDialog::ActivateDetailsActiveObject
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoDetailsDialog::ActivateDetailsActiveObject()
     {
-    CFileDetailsPluginIF* fdPlugin = CFileDetailsPluginIF::NewL();
-    fdPlugin->ShowFileDetails( aMedia );
-    delete fdPlugin;
+    if ( !iDetailsAo->IsActive() )
+        {
+        iDetailsAo->Start( TCallBack( CVcxHgMyVideosVideoDetailsDialog::ShowDetailsL, this ) );
+        }
     }
+
+// -------------------------------------------------------------------------------------------------
+//   CVcxHgMyVideosVideoDetailsDialog::ShowDetailsL
+// -------------------------------------------------------------------------------------------------
+//
+TInt CVcxHgMyVideosVideoDetailsDialog::ShowDetailsL( TAny* aPtr )
+{
+    static_cast<CVcxHgMyVideosVideoDetailsDialog*>(aPtr)->DoShowDetailsL();
+    return KErrNone;
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CVcxHgMyVideosVideoDetailsDialog::DoShowDetailsL
+// -------------------------------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoDetailsDialog::DoShowDetailsL()
+    {
+    if ( iDetailsMedia )
+        {
+        CFileDetailsPluginIF* fdPlugin = CFileDetailsPluginIF::NewL();
+        CleanupStack::PushL( fdPlugin );
+        fdPlugin->ShowFileDetailsL( *iDetailsMedia );
+        CleanupStack::PopAndDestroy();
+        }
+    }
+
+
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -312,13 +312,16 @@
 void CVcxHgMyVideosVideoListImpl::DeleteVideosL()
     {
     IPTVLOGSTRING_LOW_LEVEL( "MPX My Videos UI # CVcxHgMyVideosVideoListImpl::DeleteVideosL()" );
-    RArray<TInt> operationTargets;
-    CleanupClosePushL( operationTargets );
+    RArray<TInt> operationTargetIndexes;
+	RArray<TInt> operationTargetIds;
+    CleanupClosePushL( operationTargetIndexes );
+    CleanupClosePushL( operationTargetIds );
     
-    GetOperationTargetIndexesL( operationTargets );
+    GetOperationTargetIndexesL( operationTargetIndexes );
+    OperationTargetsToMpxIdsL( operationTargetIndexes, operationTargetIds );
 
-    if ( ConfirmDeleteVideosL( operationTargets.Count(),
-                               iVideoModel->GetVideoName( operationTargets[0] ) ) )
+    if ( ConfirmDeleteVideosL( operationTargetIndexes.Count(),
+                               iVideoModel->GetVideoName( operationTargetIndexes[0] ) ) )
         {
         HandleMarkCommandL( EVcxHgMyVideosCmdUnmarkAll );
 
@@ -326,9 +329,16 @@
         // in DialogDismissedL() or in VideoDeletionCompletedL().
         OpenDeleteWaitNoteL();
 
-        iVideoModel->DeleteVideosL( operationTargets );
+        TRAPD( err, iVideoModel->DeleteVideosL( operationTargetIds ) );
+        
+        if( err != KErrNone )
+            {
+            CloseDeleteWaitNote();
+            }
         }
-    CleanupStack::PopAndDestroy( &operationTargets );
+
+    CleanupStack::PopAndDestroy( &operationTargetIds );
+    CleanupStack::PopAndDestroy( &operationTargetIndexes );
     }
 
 // -----------------------------------------------------------------------------
@@ -651,14 +661,19 @@
 //
 void CVcxHgMyVideosVideoListImpl::HandleMoveOrCopyCommandL( TBool aCopy )
     {
-    RArray<TInt> operationTargets;
-    CleanupClosePushL( operationTargets );
+    RArray<TInt> operationTargetIndexes;
+	RArray<TInt> operationTargetIds;
+    CleanupClosePushL( operationTargetIndexes );
+    CleanupClosePushL( operationTargetIds );
     
-    GetOperationTargetIndexesL( operationTargets );
+    GetOperationTargetIndexesL( operationTargetIndexes );
+    OperationTargetsToMpxIdsL( operationTargetIndexes, operationTargetIds );
+    
     HandleMarkCommandL( EVcxHgMyVideosCmdUnmarkAll );
-    iVideoCopier->MoveOrCopyL( operationTargets, aCopy );
+    iVideoCopier->MoveOrCopyL( operationTargetIds, aCopy );
     
-    CleanupStack::PopAndDestroy( &operationTargets );
+    CleanupStack::PopAndDestroy( &operationTargetIds );
+    CleanupStack::PopAndDestroy( &operationTargetIndexes );
     }
 
 // -----------------------------------------------------------------------------
@@ -1140,3 +1155,20 @@
     return iAiwMenuHandler;
     }
 #endif
+
+// ---------------------------------------------------------------------------
+// CVcxHgMyVideosVideoListImpl::OperationTargetsToMpxIdsL()
+// ---------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoListImpl::OperationTargetsToMpxIdsL( 
+                                       RArray<TInt>& aOperationTargetIndexes,  
+                                       RArray<TInt>& aOperationTargetIds )
+    {
+    for ( TInt i = 0; i < aOperationTargetIndexes.Count(); i++ )
+        {
+		if ( iVideoModel->GetVideoId( aOperationTargetIndexes[i] ) != KErrNotFound )
+            {
+            aOperationTargetIds.Append( iVideoModel->GetVideoId( aOperationTargetIndexes[i] ) );
+            }
+        }
+    }
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -142,6 +142,7 @@
     {
     iResumeArray.Close();
     
+    delete iVideoDetails;
     delete iVideoIndicator;
     delete iDataUpdater;
     delete iDownloadUpdater;
@@ -487,6 +488,22 @@
     }
 
 // -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoModelHandler::GetVideoId()
+// -----------------------------------------------------------------------------
+//
+TInt CVcxHgMyVideosVideoModelHandler::GetVideoId( TInt aIndex )
+    {
+    CMPXMedia* media = iVideoArray->MPXMedia( aIndex );
+
+    if ( media && media->IsSupported( KMPXMediaGeneralId ) )
+        {
+        return media->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ).iId1;
+        }
+    
+    return KErrNotFound;
+    }
+
+// -----------------------------------------------------------------------------
 // CVcxHgMyVideosVideoModelHandler::GetVideoSize()
 // -----------------------------------------------------------------------------
 //
@@ -516,7 +533,7 @@
 
     for ( TInt i = 0; i < aOperationTargets.Count(); i++ )
         {
-        media = iVideoArray->MPXMedia( aOperationTargets[i] );
+        media = iVideoArray->MPXMediaByMPXItemId( TMPXItemId(aOperationTargets[i],0) );
 
         if ( media && media->IsSupported( KMPXMediaGeneralId ) )
             {
@@ -526,9 +543,15 @@
             mediaToDelete->SetTObjectValueL( KMPXMediaGeneralId, mpxItemId );
             mediasToDelete->AppendL( *mediaToDelete );
             CleanupStack::PopAndDestroy( mediaToDelete );
+            iDataUpdater->PrepareForMoveOrDelete( mpxItemId );
             }
         }
 
+    if ( mediasToDelete->Count() <= 0 )
+        {
+		User::Leave( KErrNotFound );
+        }
+
     TRAPD( err, iModel.CollectionClient().DeleteVideosL( mediasToDelete ) );
     	
     if ( err != KErrNone )
@@ -559,7 +582,7 @@
 
     for ( TInt i = 0; i < aOperationTargets.Count(); i++ )
         {
-        media = iVideoArray->MPXMedia( aOperationTargets[i] );
+        media = iVideoArray->MPXMediaByMPXItemId( TMPXItemId(aOperationTargets[i],0) );
                     
         if ( media && media->IsSupported( KMPXMediaGeneralId ) )
             {
@@ -569,10 +592,17 @@
             mediaToMoveOrCopy->SetTObjectValueL( KMPXMediaGeneralId, mpxItemId );
             mediasToMoveOrCopy->AppendL( *mediaToMoveOrCopy );
             CleanupStack::PopAndDestroy( mediaToMoveOrCopy );
+            iDataUpdater->PrepareForMoveOrDelete( mpxItemId );
             }
         }
 
+    if ( mediasToMoveOrCopy->Count() <= 0 )
+        {
+		User::Leave( KErrNotFound );
+        }
+		
     iModel.CollectionClient().MoveOrCopyVideosL( mediasToMoveOrCopy, aTargetDrive, aCopy );
+
     CleanupStack::PopAndDestroy( mediasToMoveOrCopy );    
     }
 
@@ -1382,6 +1412,10 @@
 // 
 void CVcxHgMyVideosVideoModelHandler::VideoDetailsCompletedL( const CMPXMedia& aMedia )
     {
+    if ( !iVideoDetails )
+        {
+	    iVideoDetails = CVcxHgMyVideosVideoDetailsDialog::NewL();
+        }
     iVideoDetails->ShowVideoDetailsDialogL( aMedia );
     }
 
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosasyncfileoperations.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -223,6 +223,10 @@
 //
 TBool CVcxMyVideosAsyncFileOperations::HandleMoveOrCopyStepL()
     {
+    // Reset inactivity timer. This will prevent ThumbAGDaemon start running while
+    // Move/copy is ongoing and failing the operation due to locked file handle.
+    User::ResetInactivityTime();
+    
     CMPXMedia& cmd = iCollection.iActiveTask->GetCommand();
     
     TBool done;
@@ -667,6 +671,10 @@
 //
 TBool CVcxMyVideosAsyncFileOperations::HandleDeleteStepL()
     {
+    // Reset inactivity timer. This will prevent ThumbAGDaemon start running while
+    // delete is ongoing and failing the operation due to locked file handle.
+    User::ResetInactivityTime();
+    
     CMPXMedia& cmd = iCollection.iActiveTask->GetCommand();
     
     //no sanity checks for array items, since we want to generate all events, even if there is nothing to delete
--- a/videoplayback/inc/mpxcommonvideoplaybackview.hrh	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/inc/mpxcommonvideoplaybackview.hrh	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 9 %
+// Version : %version: 10 %
 
 
 #ifndef MPXCOMMONVIDEOPLAYBACKVIEW_HRH
@@ -57,7 +57,9 @@
     EMPXPbvCmdCustomPlay,
     EMPXPbvCmdExit,
     EMPXPbvLaunchDRMDetails,
-    EMPXPbvSurfaceCreated
+    EMPXPbvSurfaceCreated,
+    EMPXPbvSurfaceRemoved,
+    EMPXPbvCmdRealOneBitmapTimeout
 };
 
 #endif  // MPXCOMMONVIDEOPLAYBACKVIEW_HRH
--- a/videoplayback/inc/mpxvideobaseplaybackview.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/inc/mpxvideobaseplaybackview.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 17 %
+// Version : %version: 18 %
 
 
 // This file defines the API for VideoBasePlaybackView.dll
@@ -204,6 +204,11 @@
 
         inline void HandleOpenL( const CMPXCollectionPlaylist& /*aPlaylist*/, TInt /*aError*/ ) {}
 
+        /*
+         *  Handle actions when the surface is being removed
+         */
+        void RemoveBackgroundSurfaceL();
+
     public:
         /**
         * Set property
@@ -342,6 +347,8 @@
         TInt OpenDrmFileHandleL( RFile& aFile );
         void LaunchDRMDetailsL();
 
+        void HandleRealOneBitmapTimeoutL();
+
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
         TInt OpenDrmFileHandle64L( RFile64& aFile );
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
@@ -366,6 +373,7 @@
         TBool                               iPlaylistView;
         TBool                               iCollectionMediaRequested;
         TBool                               iPdlReloading;
+        TBool                               iRealOneDelayedPlay;
 
         HBufC*                              iClipName;
 };
--- a/videoplayback/inc/mpxvideopdlplaybackview.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/inc/mpxvideopdlplaybackview.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 5 %
+
+// Version : %version: 6 %
 
 
 // This file defines the API for VideoPlaybackView.dll
@@ -82,6 +83,8 @@
 
         TBool BringUpBrowserL();
 
+        void ClosePlaybackViewWithErrorL();
+
     private: // data
 
         TMPXPlaybackPdDownloadState         iPdlState;
--- a/videoplayback/inc/mpxvideoplaybackcontainer.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/inc/mpxvideoplaybackcontainer.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,9 +15,8 @@
 *
 */
 
-// Version : %version: 6 %
 
-
+// Version : %version: 8 %
 
 
 #ifndef __CMPXVIDEOPLAYBACKCONTAINER_H__
@@ -158,6 +157,8 @@
 
         void AddFileDetailsL( CMPXVideoPlaybackViewFileDetails* aDetails );
 
+        TBool IsRealOneBitmapTimerActive();
+
     private:
 
         /**
@@ -214,6 +215,12 @@
         */
         void HandleSeekBackL(TEventCode aType);
 
+        /*
+        *  Handles the Controls Timer Timout
+        */
+        static TInt HandleRealOneBitmapTimeout( TAny* aPtr );
+
+        void DoHandleRealOneBitmapTimeout();
 
     protected:   // data
         CMPXVideoBasePlaybackView*              iView;
@@ -232,6 +239,13 @@
         TKeyResponse                            iKeyResponse;
 
         CMPXVideoPlaybackUserInputHandler*      iUserInputHandler;  // owned
+
+        //
+        //  Members to control Real One Bitmap
+        //  iDelayedFileDetails is not owned
+        //
+        CPeriodic*                              iRealOneBitmapTimer;
+        CMPXVideoPlaybackViewFileDetails*       iDelayedFileDetails;
 };
 
 #endif  // __CMPXVIDEOPLAYBACKCONTAINER_H__
--- a/videoplayback/inc/mpxvideoplaybackcontrol.hrh	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/inc/mpxvideoplaybackcontrol.hrh	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 8 %
+
+// Version : %version: 9 %
 
 
 #ifndef MPXVIDEOPLAYBACKCONTROL_HRH_
@@ -98,7 +99,8 @@
     EMPXControlCmdShowFileDetailsViewer,
     EMPXControlCmdCloseFileDetailsViewer,
     EMPXControlCmdHideControls,
-    EMPXControlCmdSurfaceCreated
+    EMPXControlCmdSurfaceCreated,
+    EMPXControlCmdSurfaceRemoved
 };
 
 enum TMPXVideoSeekingType
--- a/videoplayback/inc/mpxvideoplaybackcontrolscontroller.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/inc/mpxvideoplaybackcontrolscontroller.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 8 %
+
+// Version : %version: e003sa33#11 %
 
 
 #ifndef MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_
@@ -135,6 +136,13 @@
 
         TBool SetBackgroundBlack();
 
+        inline TBool IsRealMediaFormat();
+
+        /**
+         *  Check if video clip's aspect ratio is equal to screen display aspect ratio
+         */
+        TBool IsSameAspectRatio();
+
     private:
         /**
         * Create controls
@@ -354,6 +362,7 @@
 
         TBool                                   iSurfaceCreated;
         TBool                                   iTvOutConnected;
+        TBool                                   iRNFormat;
 
 #ifdef RD_TACTILE_FEEDBACK
         MTouchFeedback*                         iFeedback;
@@ -394,6 +403,13 @@
     return playable;
 }
 
+inline
+TBool CMPXVideoPlaybackControlsController::IsRealMediaFormat()
+{
+    MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::IsRealFormat() [%d]"), iRNFormat);
+    return iRNFormat;
+}
+
 #endif /*MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_*/
 
 // End of File
--- a/videoplayback/inc/mpxvideoplaybackdisplayhandler.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/inc/mpxvideoplaybackdisplayhandler.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 7 %
+
+// Version : %version: 8 %
 
 
 #ifndef __CMPXVIDEOPLAYBACKDISPLAYHANDLER_H__
@@ -36,6 +37,7 @@
 //  CLASS DECLARATION
 //
 class MMPXPlaybackUtility;
+class CMPXVideoPlaybackContainer;
 class CMPXVideoPlaybackViewFileDetails;
 
 /*
@@ -58,13 +60,14 @@
 
         ~CMPXVideoPlaybackDisplayHandler();
 
-        static CMPXVideoPlaybackDisplayHandler* NewL( MMPXPlaybackUtility* aPlayUtil );
+        static CMPXVideoPlaybackDisplayHandler* NewL( MMPXPlaybackUtility* aPlayUtil,
+                                                      CMPXVideoPlaybackContainer* aContainer );
 
         void CreateDisplayWindowL( CWsScreenDevice& aScreenDevice, RWindow& aWin );
 
-        void RemoveDisplayWindow();
+        void RemoveDisplayWindow( TBool aSignalPlaybackPlugin = ETrue );
 
-        TMPXVideoDisplayCommand HandleVideoDisplayMessageL( CMPXMessage* aMessage );
+        void HandleVideoDisplaySyncMessageL( CMPXMessage* aMessage );
 
         TInt SetAspectRatioL( TMPXVideoPlaybackCommand aCmd );
 
@@ -73,7 +76,8 @@
 
     private:
 
-        CMPXVideoPlaybackDisplayHandler( MMPXPlaybackUtility* aPlayUtil );
+        CMPXVideoPlaybackDisplayHandler( MMPXPlaybackUtility* aPlayUtil,
+                                         CMPXVideoPlaybackContainer* aContainer );
 
         void ConstructL();
 
@@ -100,6 +104,7 @@
 
     private:
         MMPXPlaybackUtility*                iPlaybackUtility;
+        CMPXVideoPlaybackContainer*         iContainer;
 
         RArray<TMPXAspectRatio>             iAspectRatioArray;
         TInt                                iCurrentIndexForAspectRatio;
--- a/videoplayback/inc/mpxvideoplaybackmediadetailsviewer.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/inc/mpxvideoplaybackmediadetailsviewer.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  e003sa33#4 %
+// Version : %version:  e003sa33#5 %
 
 #ifndef MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
 #define MPXVIDEOPLAYBACKMEDIADETAILSVIEWER_H_
@@ -172,6 +172,7 @@
         TBool                                iShouldPauseScrolling;
         TRect                                iViewerRect;
         HBufC*                               iAdditionalString;
+        TUint32                              iScrollTimerDelayBeginningTick;
 };
 
 
--- a/videoplayback/inc/mpxvideoplaybackuserinputhandler.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/inc/mpxvideoplaybackuserinputhandler.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  6 %
+// Version : %version:  ou1cpsw#7 %
 
 
 
@@ -37,7 +37,7 @@
 class CRemConInterfaceSelector; // Side volume key
 class CRemConCoreApiTarget;
 class CMPXVideoPlaybackContainer;
-class CHWRMLight;
+
 
 // CLASS DECLARATION
 
@@ -50,7 +50,7 @@
         /**
         * Two-phased constructor.
         */
-        IMPORT_C static CMPXVideoPlaybackUserInputHandler* NewL(CMPXVideoPlaybackContainer* iContainer, TBool aTvOutConnected);
+        IMPORT_C static CMPXVideoPlaybackUserInputHandler* NewL(CMPXVideoPlaybackContainer* iContainer );
 
         /**
         * Destructor.
@@ -67,7 +67,7 @@
         /**
         * Symbian 2nd phase constructor.
         */
-        void ConstructL( TBool aTvOutConnected );
+        void ConstructL( );
 
     public:
 
@@ -104,7 +104,7 @@
         */
         void SetForeground(TBool aForeground);
  
-        void HandleTVOutEvent(TBool aTVOutConnected);
+  
                 
 	private:
         /**
@@ -131,18 +131,7 @@
                                   const TPointerEvent& aPointerEvent,
                                   TMPXVideoControlType aMPXControl);
         
-        // Handles the Display light timer timeout
-        static TInt  HandleDisplayTimeout( TAny* aPtr );
-        
-        // Disable the display backlight
-        void DisableBacklight();
-        
-        // Enable the display backlight
-        void EnableBacklight();
-        
-        // Restarts the timer for display light time-out
-        void RestartDisplayTimer();
-
+       
     private:
 
         TMPXVideoUserInputType                  iProcessingInputType; 	// the type of input being processed
@@ -156,11 +145,7 @@
         CPeriodic*                              iVolumeRepeatTimer;     // owned
         TBool                                   iVolumeRepeatUp;
         TBool                                   iForeground;
-        TBool                                   iTVOutConnected;        // Flag to indicate if TV is connected
-        CPeriodic*                              iDisplayTimer;          // Timer to timeout the lights time-out
-        TInt                                    iDisplayTimeOut;        // Value of the lights time-out
-
-        CHWRMLight*                             iLight;
+        
         CMPXVideoPlaybackContainer*             iContainer;	  // not owned
 
 
--- a/videoplayback/inc/mpxvideoplaybackviewfiledetails.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/inc/mpxvideoplaybackviewfiledetails.h	Mon Mar 15 12:40:47 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -15,50 +15,50 @@
 *
 */
 
-// Version : %version: e003sa33#11 %
 
-
+// Version : %version: 12 %
 
 
 #ifndef __MPXVIDEOPLAYBACKVIEWFILEDETAILS__
 #define __MPXVIDEOPLAYBACKVIEWFILEDETAILS__
 
 #include "mpxhelixplaybackplugindefs.h"
-// 
+
+//
 //  CLASS DECLARATION
 //
 NONSHARABLE_CLASS( CMPXVideoPlaybackViewFileDetails ) : public CBase
 {
-    public:  
+    public:
         //
         //  Constructors and destructor
         //
         static CMPXVideoPlaybackViewFileDetails* NewL();
-        
+
         //
         //  Destructor.
         //
         virtual ~CMPXVideoPlaybackViewFileDetails();
-        
+
         //
         //  Clear all file details
         //
         void ClearFileDetails();
 
-        /** 
+        /**
         * Generate file name, remove all file path
-        * 
-        * @return generated file name, ownership is transferred 
+        *
+        * @return generated file name, ownership is transferred
         */
         IMPORT_C HBufC* GenerateFileNameL();
-        
+
     private:
         //
         //  By default Symbian 2nd phase constructor is private.
         //
         void ConstructL();
 
-    public:    
+    public:
         //
         // Data
         //
@@ -73,7 +73,6 @@
         TBool          iAudioEnabled;
         TBool          iVideoEnabled;
         TBool          iPartialPlayback;
-        TBool          iRNFormat;
         TBool          iTvOutConnected;
         TBool          iTvOutPlayAllowed;
         TBool          iDrmProtected;
@@ -86,7 +85,7 @@
         TInt           iDuration;
 };
 
-#endif      // __MPXVIDEOPLAYBACKVIEWFILEDETAILS__  
+#endif      // __MPXVIDEOPLAYBACKVIEWFILEDETAILS__
 
-            
+
 // EOF
\ No newline at end of file
--- a/videoplayback/videohelix/group/mpxvideohelixplayback.mmp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/group/mpxvideohelixplayback.mmp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 13 %
+// Version : %version: ou1cpsw#14 %
 
 
 
@@ -74,6 +74,8 @@
 LIBRARY  drmutility.lib
 LIBRARY  caf.lib
 LIBRARY  mmcommon.lib 
+LIBRARY  hwrmlightclient.lib   // Lights control
+LIBRARY  centralrepository.lib // For display backlight timeout value
 
 #ifdef __ACCESSORY_FW
 LIBRARY accclient.lib
--- a/videoplayback/videohelix/inc/mpxvideohelixplayback.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/inc/mpxvideohelixplayback.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 8 %
+// Version : %version: 10 %
 
 
 
@@ -162,8 +162,9 @@
         * @param aUri URI of the item
         * @param aType the mime type of the item
         * @param aAccessPoint the access point
+        * @param aPosition the starting position
         */
-        void InitStreamingL(const TDesC& aUri, const TDesC8& aType, TInt aAccessPoint);
+        void InitStreamingL(const TDesC& aUri, const TDesC8& aType, TInt aAccessPoint, TInt aPosition); 
 
         /**
         * Initializes a file handle for playback.
@@ -171,8 +172,9 @@
         * @since S60 9.2
         * @param aFile file handle of a file
         * @param aAccessPoint the access point
+        * @param aPosition the starting position
         */
-        void InitStreamingL(RFile& aFile, TInt aAccessPoint);
+        void InitStreamingL(RFile& aFile, TInt aAccessPoint, TInt aPosition);  
 
         /**
         * Initializes filename and handle
@@ -181,7 +183,7 @@
         * @param aUri URI of the item
         */
         RFile& OpenFileHandleL( const TDesC& aUri );
-        
+
         /**
         * Open file handle
         *
@@ -192,20 +194,21 @@
         void OpenFileHandleL( const TDesC& aUri, RFile& aFile );
 
         /**
-        * Handle open file handle
+        *  Checks if the Uri is a streaming link
         *
         * @since S60 9.2
-        * @param aError open file error
+        * @param aUri URL or file name
         */
-        void HandleOpenFileHandleL( TInt aError );
-        
+        void CheckForStreamingUrlL( const TDesC& aUri );
+
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
         /*
          *  Initializes a song for playback
          *  @param aFile RFile64 of a song
+         *  @param aPosition the starting position
          */
-        void Initialise64L( RFile64& aFile );
+        void Initialise64L( RFile64& aFile, TInt aPosition ); 
 
         /**
         * Initializes a file handle for playback.
@@ -213,8 +216,9 @@
         * @since S60 9.2
         * @param aFile RFile64 of a file
         * @param aAccessPoint the access point
+        * @param aPosition the starting position
         */
-        void InitStreaming64L(RFile64& aFile, TInt aAccessPoint);
+        void InitStreaming64L( RFile64& aFile, TInt aAccessPoint, TInt aPosition ); 
 
         /**
         * Initializes filename and handle
@@ -232,8 +236,27 @@
         * @param aFile a 64-bit file handle
         */
         void OpenFileHandle64L( const TDesC& aUri, RFile64& aFile );
-        
-#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API        
+
+#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+
+
+        /*
+        *  Initializes a clip for playback
+        *  @since S60 9.2
+        *  
+        *  @param aSong the song path, 
+        *  @param aPosition the starting position 
+        */
+        void InitialiseWithPositionL( const TDesC& aSong, TInt aPosition = 0 );     
+                
+        /**
+        * Initializes a song for playback.
+        *
+        * @since S60 9.2
+        * @param aFile file handle of a song
+        * @param aPosition the starting position
+        */
+        void InitialiseWithPositionL(RFile& aSong, TInt aPosition = 0 );        
 
 
     private:
@@ -247,7 +270,7 @@
          *  that can leave
          */
         void ConstructL();
-        
+
     private:
         //
         //  Data
--- a/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 19 %
+// Version : %version: ou1cpsw#21 %
 
 
 #ifndef _CMPXVIDEOPLAYBACKCONTROLLER_H_
@@ -51,7 +51,7 @@
 class CMediaRecognizer;
 class CMPXVideoSeeker;
 class CMpxVideoDrmHelper;
-
+class CHWRMLight;
 //
 //  CLASS DECLARATION
 //
@@ -94,7 +94,7 @@
         void HandleSettingChange( const TUid& aRepositoryUid,
                                   TUint32 aSettingId );
 
-        void OpenFileL( const TDesC& aMediaFile, RFile& aFile, TInt aAccessPointId = -1 );
+        void OpenFileL( const TDesC& aMediaFile, RFile& aFile, TInt aPosition, TInt aAccessPointId = KUseDefaultIap );  
 
         void HandleGeneralPlaybackCommandL( CMPXCommand& aCmd );
 
@@ -125,16 +125,15 @@
         TBool IsVoiceCall();
 
         void HandleTvOutEventL( TBool aConnected );
-        static TInt HandleBackLightTimout( TAny* aPtr );
-        void DoHandleBackLightTimout();
-        void StartBackLightTimer();
-        void CancelBackLightTimer();
+
         void HandleError(TInt error);
         void SetVolumeSteps( TInt aVolumeSteps );
         void HandleVolumeL( TBool aIncrease );
 
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
-        void OpenFile64L( const TDesC& aMediaFile, RFile64& aFile, TInt aAccessPointId = -1 );
+
+        void OpenFile64L( const TDesC& aMediaFile, RFile64& aFile, TInt aPosition, TInt aAccessPointId = KUseDefaultIap ); 
+
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
 
@@ -144,7 +143,7 @@
         void RestartDSA( CMPXCommand& aCmd );
         inline void AbortDSA();
 
-        void InitVolumeWatchers();
+        void InitVolumeWatchersL();
 
         void ChangeState(TMPXVideoPlaybackState aChangeToState);
 
@@ -156,6 +155,32 @@
         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();
 
     protected:
 
@@ -217,10 +242,23 @@
         // Video seeker
         CMPXVideoSeeker*                        iVideoSeeker;
 
-        CPeriodic*                              iBackLightTimer;
+        // Timer for calling User::ResetInactivityTime() periodicallly while playing.
+        // This keeps backligth on and screensaver off.
+        CPeriodic*                              iBackLightTimer;        
+                                                                        
+        // Timer to turn display lights off when playing to TV-out
+        CPeriodic*                              iDisplayTimer;         
+        TTimeIntervalMicroSeconds32             iDisplayTimerTimeout;
+        // Timer monitoring user activity when TV-out is connected
+        CPeriodic*                              iUserActivityTimer;     
+
+        
         TBool                                   iSeekable;
 
         CMpxVideoDrmHelper*                     iDrmHelper;
+        CHWRMLight*                             iLight;
+        TInt                                    iLightStatus;
+        TInt                                    iSavedPosition;
 
     public:     // Friend classes
 
--- a/videoplayback/videohelix/src/mpxvideohelixplayback.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/src/mpxvideohelixplayback.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 12 %
+// Version : %version: 14 %
 
 
 //
@@ -114,7 +114,11 @@
     }
 
     TInt err = aFile.Open( iFs, aUri, EFileRead | EFileShareReadersOrWriters );
-    HandleOpenFileHandleL( err );
+
+    if ( err != KErrNone )
+    {
+        CheckForStreamingUrlL( aUri );
+    }
 }
 
 //  ----------------------------------------------------------------------------
@@ -124,7 +128,20 @@
 void CMPXVideoHelixPlayback::InitialiseL( const TDesC& aSong )
 {
     MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::InitialiseL()"),
-                   _L("aSong %S"), &aSong );
+                  _L("aSong %S"), &aSong );
+    
+    InitialiseWithPositionL( aSong );
+}
+
+
+//  ----------------------------------------------------------------------------
+//    Initializes a clip for playback from a file name with position
+//  ----------------------------------------------------------------------------
+//
+void CMPXVideoHelixPlayback::InitialiseWithPositionL( const TDesC& aSong, TInt aPosition )
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::InitialiseL()"),
+                   _L("aSong %S, aPosition %d"), &aSong, aPosition );
 
     RFile fileHandle;
 
@@ -134,17 +151,17 @@
 
     if ( err == KErrNone )
     {
-        iVideoPlaybackCtlr->OpenFileL( aSong, fileHandle );
+        iVideoPlaybackCtlr->OpenFileL( aSong, fileHandle, aPosition ); 
     }   
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
     else if ( err == KErrTooBig )
     {
-        // 
+        //
         // use RFile64 handle
         //
         RFile64 fileHandle64;
         CleanupClosePushL( fileHandle64 );
-        
+
         MPX_TRAPD( err, OpenFileHandle64L( aSong, fileHandle64 ));
 
         if ( err != KErrNone )
@@ -154,18 +171,18 @@
         }
         else
         {
-            iVideoPlaybackCtlr->OpenFile64L( aSong, fileHandle64 );
+                iVideoPlaybackCtlr->OpenFile64L( aSong, fileHandle64, aPosition ); 
         }
-        
-        CleanupStack::PopAndDestroy(); // fileHandle64        
+
+        CleanupStack::PopAndDestroy(); // fileHandle64
     }
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
     else
     {
         // Handle error
-        iVideoPlaybackCtlr->HandleError( err );        
+        iVideoPlaybackCtlr->HandleError( err );
     }
-    
+
     CleanupStack::PopAndDestroy(); // fileHandle
 }
 
@@ -176,11 +193,23 @@
 void CMPXVideoHelixPlayback::InitialiseL( RFile& aSong )
 {
     MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::InitialiseL( RFile )"));
+        
+    InitialiseWithPositionL( aSong );
+}
 
+//  ----------------------------------------------------------------------------
+//    Initializes a clip for playback from a file handle with position
+//  ----------------------------------------------------------------------------
+//
+void CMPXVideoHelixPlayback::InitialiseWithPositionL( RFile& aSong, TInt aPosition )
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::InitialiseWithPositionL( RFile )"),
+                   _L("aPosition %d"), aPosition );
+    
     TFileName filename;
     aSong.FullName( filename );
 
-    iVideoPlaybackCtlr->OpenFileL( filename, aSong );
+    iVideoPlaybackCtlr->OpenFileL( filename, aSong, aPosition ); 
 }
 
 
@@ -190,10 +219,11 @@
 //
 void CMPXVideoHelixPlayback::InitStreamingL( const TDesC& aUri,
                                              const TDesC8& /*aType*/,
-                                             TInt aAccessPoint )
+                                             TInt aAccessPoint, 
+                                             TInt aPosition ) 
 {
     MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::InitStreamingL()"),
-                   _L("aUri %S, aAccessPoint %d"), &aUri, aAccessPoint );
+                   _L("aUri %S, aAccessPoint %d, aPosition %d"), &aUri, aAccessPoint, aPosition );
 
     RFile fileHandle;
 
@@ -208,7 +238,7 @@
     }
     else
     {
-        iVideoPlaybackCtlr->OpenFileL( aUri, fileHandle, aAccessPoint );
+        iVideoPlaybackCtlr->OpenFileL( aUri, fileHandle, aPosition, aAccessPoint );  
     }
 
     CleanupStack::PopAndDestroy();
@@ -218,15 +248,15 @@
 //    Initializes a clip for playback from a file handle
 //  ----------------------------------------------------------------------------
 //
-void CMPXVideoHelixPlayback::InitStreamingL( RFile& aFile, TInt aAccessPoint  )
+void CMPXVideoHelixPlayback::InitStreamingL( RFile& aFile, TInt aAccessPoint, TInt aPosition  ) 
 {
     MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::InitStreamingL( RFile )"),
-                   _L("aAccessPoint = %d"), aAccessPoint );
+                   _L("aAccessPoint = %d, aPosition = %d"), aAccessPoint, aPosition );
 
     TFileName filename;
     aFile.FullName( filename );
 
-    iVideoPlaybackCtlr->OpenFileL( filename, aFile, aAccessPoint );
+    iVideoPlaybackCtlr->OpenFileL( filename, aFile, aPosition, aAccessPoint );
 }
 
 //  ----------------------------------------------------------------------------
@@ -316,34 +346,23 @@
     MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::CancelRequest()"));
 }
 
-//  ----------------------------------------------------------------------------
-//    Handle Open File Handle
-//  ----------------------------------------------------------------------------
+//  ------------------------------------------------------------------------------------------------
+//    CMPXVideoHelixPlayback::CheckForStreamingUrlL()
+//  ------------------------------------------------------------------------------------------------
 //
-void CMPXVideoHelixPlayback::HandleOpenFileHandleL( TInt aError )
+void CMPXVideoHelixPlayback::CheckForStreamingUrlL( const TDesC& aUri )
 {
-    MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::HandleOpenFileHandleL()"));
-    
-    //
-    //  Remap KErrNotReady to KErrNotFound, because it is referencing a drive
-    //  that is not existent
-    //
-    if ( aError == KErrNotReady )
+    MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::CMPXVideoHelixPlayback::CheckForStreamingUrlL()"));
+
+    CMediaRecognizer* recognizer = CMediaRecognizer::NewL();
+    CleanupStack::PushL( recognizer );
+
+    if ( ! recognizer->IsValidStreamingPrefix( aUri ) )
     {
-        aError = KErrNotFound;
+        User::LeaveIfError( KErrNotFound );
     }
-    
-    MPX_DEBUG(_L("CMPXVideoHelixPlayback::HandleOpenFileHandleL() Open error = %d"), aError);
-    
-    //
-    //  if aSong is an streaming link and contains one of the streaming schemas
-    //  eg. rtsp:// , http:// etc. then a file handle can not be opened
-    //  ignore KErrBadName
-    //
-    if ( aError != KErrBadName )
-    {
-        User::LeaveIfError( aError );
-    }
+
+    CleanupStack::PopAndDestroy( recognizer );
 }
 
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
@@ -364,36 +383,40 @@
     }
 
     TInt err = aFile.Open( iFs, aUri, EFileRead | EFileShareReadersOrWriters );
-    HandleOpenFileHandleL( err );
+
+    if ( err != KErrNone )
+    {
+        CheckForStreamingUrlL( aUri );
+    }
 }
 
 //  ----------------------------------------------------------------------------
 //    Initializes a clip for playback from a 64-bit file handle
 //  ----------------------------------------------------------------------------
 //
-void CMPXVideoHelixPlayback::Initialise64L( RFile64& aSong )
+void CMPXVideoHelixPlayback::Initialise64L( RFile64& aSong, TInt aPosition ) 
 {
-    MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::Initialise64L( RFile64 )"));
-
+    MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::Initialise64L( RFile64 )"),
+                   _L("aPosition %d"), aPosition );
     TFileName filename;
     aSong.FullName( filename );
 
-    iVideoPlaybackCtlr->OpenFile64L( filename, aSong );
+    iVideoPlaybackCtlr->OpenFile64L( filename, aSong, aPosition );   
 }
 
 //  ----------------------------------------------------------------------------
 //    Initializes a clip for playback from a 64-bit file handle
 //  ----------------------------------------------------------------------------
 //
-void CMPXVideoHelixPlayback::InitStreaming64L( RFile64& aFile, TInt aAccessPoint  )
+void CMPXVideoHelixPlayback::InitStreaming64L( RFile64& aFile, TInt aAccessPoint, TInt aPosition ) 
 {
     MPX_ENTER_EXIT(_L("CMPXVideoHelixPlayback::InitStreaming64L( RFile64 )"),
-                   _L("aAccessPoint = %d"), aAccessPoint );
+                   _L("aAccessPoint = %d, aPosition %d"), aAccessPoint, aPosition );
 
     TFileName filename;
     aFile.FullName( filename );
 
-    iVideoPlaybackCtlr->OpenFile64L( filename, aFile, aAccessPoint );
+    iVideoPlaybackCtlr->OpenFile64L( filename, aFile, aPosition, aAccessPoint ); 
 }
 
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
--- a/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 47 %
+// Version : %version: ou1cpsw#49 %
 
 
 //
@@ -41,6 +41,9 @@
 #include <e32std.h>
 #include <devsoundif.h>
 #include <avkondomainpskeys.h>
+#include <hwrmlight.h>  
+#include <centralrepository.h>  // For display timeout setting
+#include <hwrmlightdomaincrkeys.h>
 
 #include "mpxvideoregion.h"
 #include "mpxvideoplaybackcontroller.h"
@@ -61,7 +64,9 @@
 //
 //  Backlight Timeout in Micro Seconds
 //
-#define KMPXBackLightTimeOut 3500000
+const TInt KMPXBackLightTimeOut = 3500000;
+const TInt KMPXInactivityTimeout  = 3 * KMPXBackLightTimeOut;
+const TInt KMPXMicroSecondsInASecond = 1000000;
 
 #define KOneKilobyte 1024
 
@@ -150,7 +155,7 @@
     // Initiliaze to True
     iSeekable = ETrue;
 
-    InitVolumeWatchers();
+    InitVolumeWatchersL();
 
     CreatePreInitStatesL();
 
@@ -159,6 +164,8 @@
     iBackLightTimer = CPeriodic::NewL( CActive::EPriorityStandard );
 
     iDrmHelper = CMpxVideoDrmHelper::NewL();
+    
+    iSavedPosition = 0;
 }
 
 //  ----------------------------------------------------------------------------
@@ -168,7 +175,6 @@
 void CMPXVideoPlaybackController::CloseController()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::CloseController()"));
-
     ChangeState( EMPXVideoNotInitialized );
 }
 
@@ -178,7 +184,8 @@
 //
 void CMPXVideoPlaybackController::OpenFileL( const TDesC& aMediaFile,
                                              RFile& aFile,
-                                             TInt aAccessPointId )
+                                             TInt aPosition,
+                                             TInt aAccessPointId ) 
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::OpenFileL()"),
                    _L("file = %S"), &aMediaFile );
@@ -208,6 +215,8 @@
     DetermineMediaTypeL();
     SetPlaybackModeL();
 
+    iSavedPosition = aPosition;
+    
     //
     //  Create accessory monitor to search for TV-Out events
     //
@@ -257,6 +266,7 @@
     , iForegroundPause(EFalse)
     , iAllowAutoPlay(ETrue)
     , iHelixLoadingStarted(EFalse)
+    , iLightStatus(CHWRMLight::ELightStatusUnknown)
 {
 }
 
@@ -339,6 +349,17 @@
         delete iPlayer;
         iPlayer = NULL;
     }
+   
+    if ( iUserActivityTimer )
+    {
+        iUserActivityTimer->Cancel();
+        delete iUserActivityTimer;
+        iUserActivityTimer = NULL;
+    }
+    
+    ReleaseLights();
+    
+    CancelDisplayTimer();
 
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
@@ -979,8 +1000,12 @@
         {
             case KMPXVideoPlaybackMute:
             {
+                TInt muteValue( EFalse );
+
+                TRAP_IGNORE( muteValue = iMuteWatcher->CurrentValueL() );
+
                 iMPXPluginObs->HandlePluginEvent( MMPXPlaybackPluginObserver::EPMuteChanged,
-                                                  iMuteWatcher->CurrentValueL(),
+                                                  muteValue,
                                                   KErrNone );
                 // fall through
             }
@@ -993,10 +1018,6 @@
                 iState->HandleVolumeChange();
                 break;
             }
-            default:
-            {
-                break;
-            }
         }
     }
 }
@@ -1190,11 +1211,11 @@
                 //
                 if ( iFileDetails->iVideoEnabled )
                 {
-                    StartBackLightTimer();
+                    StartLightsControl();
                 }
                 else
                 {
-                    CancelBackLightTimer();
+                    CancelLightsControl();
                 }
                 
                 break;
@@ -1202,42 +1223,44 @@
             case EMPXVideoPaused:
             {
                 iState = iPausedState;
-                CancelBackLightTimer();
+                CancelLightsControl();
                 break;
             }
             case EMPXVideoInitializing:
             {
                 iState = iInitialisingState;
-                StartBackLightTimer();
+                StartLightsControl();
                 break;
             }
             case EMPXVideoInitialized:
             {
                 iState = iInitialisedState;
+                StartLightsControl();
                 break;
             }
             case EMPXVideoBuffering:
             {
                 iState = iBufferingState;
-                StartBackLightTimer();
+                StartLightsControl();
                 break;
             }
             case EMPXVideoSeeking:
             {
                 iState = iSeekingState;
+                StartLightsControl();
                 break;
             }
             case EMPXVideoStopped:
             {
                 iState = iStoppedState;
-                CancelBackLightTimer();
+                CancelLightsControl();
                 break;
             }
             case EMPXVideoNotInitialized:
             {
                 ResetMemberVariables();
                 iState = iNotIntialisedState;
-                CancelBackLightTimer();
+                CancelLightsControl();
                 break;
             }
         }
@@ -1308,11 +1331,11 @@
     //
     iFileDetails->iMaxVolume = iPlayer->MaxVolume();
 
-    // 
+    //
     //  FourCC Code
     //
-    iFileDetails->iFourCCCode  = iPlayer->FourCCCode();    
-    
+    iFileDetails->iFourCCCode  = iPlayer->FourCCCode();
+
     //
     //  Mime Type
     //
@@ -1427,7 +1450,7 @@
             {
                 iFileDetails->iKeywords = metaData->Value().AllocL();
             }
-            
+
             CleanupStack::PopAndDestroy( metaData );
         }
 
@@ -1770,6 +1793,22 @@
 
             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();
     }
 
     //
@@ -1801,6 +1840,7 @@
     {
         iBackLightTimer->Cancel();
     }
+    
 }
 
 //  ------------------------------------------------------------------------------------------------
@@ -1815,17 +1855,18 @@
         iBackLightTimer->Start(
             0,
             KMPXBackLightTimeOut,
-            TCallBack( CMPXVideoPlaybackController::HandleBackLightTimout, this ));
+            TCallBack( CMPXVideoPlaybackController::HandleBackLightTimeout, this ));
     }
+    
 }
 
 // -------------------------------------------------------------------------------------------------
 // Handle back light timer timeout callback
 // -------------------------------------------------------------------------------------------------
 //
-TInt CMPXVideoPlaybackController::HandleBackLightTimout( TAny* aPtr )
+TInt CMPXVideoPlaybackController::HandleBackLightTimeout( TAny* aPtr )
 {
-    static_cast<CMPXVideoPlaybackController*>(aPtr)->DoHandleBackLightTimout();
+    static_cast<CMPXVideoPlaybackController*>(aPtr)->DoHandleBackLightTimeout();
     return KErrNone;
 }
 
@@ -1833,35 +1874,419 @@
 // Handle back light timer timeout
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackController::DoHandleBackLightTimout()
+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 )
+    {
+        MPX_DEBUG ( _L("CMPXVideoPlaybackController::DoHandleBackLightTimeout() inactivity time = %d"), User::InactivityTime().Int() );
+        // 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
+        // can be turned on if user activity is detected.
+        RestartUserActivityTimer();
+    }
+}
+
+// -----------------------------------------------------------------------------
+// CMPXVideoPlaybackController::StartLightsControl
+// -----------------------------------------------------------------------------
+//
+void CMPXVideoPlaybackController::StartLightsControl()
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::StartLightsControl()"));
+
+    StartBackLightTimer();
+             
+    if (iAccessoryMonitor )
+    {
+        if ( iAccessoryMonitor->IsTvOutConnected() )
+        {
+            RestartDisplayTimer();
+        }
+    }
+}
+
+// -----------------------------------------------------------------------------
+// CMPXVideoPlaybackController::CancelLightsControl
+// -----------------------------------------------------------------------------
+//
+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 method is not correct place for these calls
+    CancelBackLightTimer();
+   
+    CancelUserActivityTimer();
+    
+    CancelDisplayTimer();
+	
+    // Ensure that lights are on
+    EnableDisplayBacklight();
+    
+	// Release lights if releserved
+    ReleaseLights();  
+}
+
+
+// -----------------------------------------------------------------------------
+// CMPXVideoPlaybackController::InitDisplayTimerL
+// -----------------------------------------------------------------------------
+//
+TTimeIntervalMicroSeconds32 CMPXVideoPlaybackController::InitDisplayTimerL()
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::InitDisplayTimerL()"));
+	
+    if ( !iDisplayTimer )
+    {
+        iDisplayTimer = CPeriodic::NewL( CPeriodic::EPriorityStandard );
+		
+        MPX_DEBUG(_L("CMPXVideoPlaybackController::InitDisplayTimerL() - created") );	
+        
+    }
+   
+    if ( iDisplayTimerTimeout.Int() == 0 )
+    {
+        // Get the display light time-out value from CenRep
+        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;
+        }
+        else
+        {
+            iDisplayTimerTimeout = displayTimeOut * KMPXMicroSecondsInASecond;
+        }
+        
+        CleanupStack::PopAndDestroy( repository );
+    }     
+    
+    
+    MPX_DEBUG( _L("CMPXVideoPlaybackController::InitDisplayTimerL Timeout(%d)"), iDisplayTimerTimeout.Int() );
+	
+    // Convert the timeout value to microseconds
+    return iDisplayTimerTimeout;   
+}
+
+// -----------------------------------------------------------------------------
+// CMPXVideoPlaybackController::RestartDisplayTimer
+// -----------------------------------------------------------------------------
+//
+void CMPXVideoPlaybackController::RestartDisplayTimer()
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::RestartDisplayTimer"));
+
+    TTimeIntervalMicroSeconds32 displayTimeOut(0);
+    // 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() 
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::CancelDisplayTimer"));
+    
+    if ( iDisplayTimer )
+    {
+        if ( iDisplayTimer->IsActive() )
+        {
+            iDisplayTimer->Cancel();
+        }
+        delete iDisplayTimer;
+        iDisplayTimer = NULL;
+    }
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackUserInputHandler::HandleDisplayTimeout
+// -------------------------------------------------------------------------------------------------
+//
+TInt CMPXVideoPlaybackController::HandleDisplayTimeout( TAny* aPtr )
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::HandleDisplayTimeout"));
+
+    static_cast<CMPXVideoPlaybackController*>(aPtr)->DoHandleDisplayTimeout();
+
+    return KErrNone;
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackUserInputHandler::DoHandleDisplayTimeout
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPlaybackController::DoHandleDisplayTimeout( )
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::DoHandleDisplayTimeout"));
+
+    DisableDisplayBacklight();
+    // Avoid missing user activity immediately after lights are turned off
+    RestartUserActivityTimer();
+}
+
+
+
+//  ------------------------------------------------------------------------------------------------
+//  CMPXVideoPlaybackController::EnableDisplayBacklight
+//  ------------------------------------------------------------------------------------------------
+// 
+void CMPXVideoPlaybackController::EnableDisplayBacklight()
 {
-    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::DoHandleBackLightTimout()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::EnableDisplayBacklight()"));
+    
+    // ELightStatusUnknown - We are not controlling lights and we don't care about lights
+    // 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.
+            CHWRMLight* lights= GetLightsL();
+            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.    
+    iUserActivityTimer->Start(
+        0,
+        KMPXInactivityTimeout,
+        TCallBack( CMPXVideoPlaybackController::HandleUserActivityTimeout, this ));
+    
+}
 
-    User::ResetInactivityTime();
+//  ------------------------------------------------------------------------------------------------
+//  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. 
+       // Leave lights on.
+       if ( err != KErrNone )
+       { 
+           EnableDisplayBacklight(); 
+       }  
+    }
+      
+    if ( iUserActivityTimer )
+    {
+        if ( iUserActivityTimer->IsActive() )
+        {
+            iUserActivityTimer->Cancel();
+        }            
+        // Not interested about inactivity callback, only activity
+        // 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() 
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::CancelUserActivityTimer()"));
+	
+    if  ( iUserActivityTimer ) 
+    {   
+        if ( iUserActivityTimer->IsActive() )
+        {
+            iUserActivityTimer->Cancel();
+        }
+    }
+}
+
+//  ------------------------------------------------------------------------------------------------
+//  CMPXVideoPlaybackController::HandleUserActivityTimeout
+//  ------------------------------------------------------------------------------------------------
+// 
+TInt CMPXVideoPlaybackController::HandleUserActivityTimeout( TAny* aPtr )
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::HandleUserActivityTimeout()"));
+	
+    static_cast<CMPXVideoPlaybackController*>(aPtr)->DoHandleUserActivityTimeout();
+    return KErrNone;     
+}
+
+//  ------------------------------------------------------------------------------------------------
+//  CMPXVideoPlaybackController::DoHandleUserActivityTimeout
+//  ------------------------------------------------------------------------------------------------
+// 
+void CMPXVideoPlaybackController::DoHandleUserActivityTimeout()
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::DoHandleUserActivityTimeout()"));
+    
+    // Act only once for detected activity.
+    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. 
+    // 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();
+}
+
+//  ------------------------------------------------------------------------------------------------
+//  CMPXVideoPlaybackController::GetLightsL
+//  ------------------------------------------------------------------------------------------------
+//
+CHWRMLight* CMPXVideoPlaybackController::GetLightsL()
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::GetLightsL()"));
+	
+    if ( !iLight ) 
+    {
+        MPX_DEBUG( _L("CMPXVideoPlaybackController::GetLightsL() - creating") );
+        iLight = CHWRMLight::NewL();
+    }
+    return iLight;
+}
+
+//  ------------------------------------------------------------------------------------------------
+//  CMPXVideoPlaybackController::ReleaseLights
+//  ------------------------------------------------------------------------------------------------
+//
+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. 
+        // This call ensures that lights are on again.
+        EnableDisplayBacklight();
+		
+        MPX_DEBUG( _L("CMPXVideoPlaybackController::ReleaseLights() - deleting") );
+        delete iLight;
+        iLight = NULL;
+    }
 }
 
 // -------------------------------------------------------------------------------------------------
 // CMPXVideoPlaybackController::InitVolumeWatchers()
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackController::InitVolumeWatchers()
+void CMPXVideoPlaybackController::InitVolumeWatchersL()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::InitVolumeWatchers()"));
 
     if ( ! iVolumeWatcher )
     {
-        MPX_TRAPD( err,
-                iVolumeWatcher = CMPXCenRepWatcher::NewL( KCRUidMPXVideoSettings,
-                                                          KMPXVideoPlaybackVolume,
-                                                          this ) );
+        iVolumeWatcher = CMPXCenRepWatcher::NewL( KCRUidMPXVideoSettings,
+                                                  KMPXVideoPlaybackVolume,
+                                                  this );
     }
 
     if ( ! iMuteWatcher )
     {
-        MPX_TRAPD( err,
-                iMuteWatcher = CMPXCenRepWatcher::NewL( KCRUidMPXVideoSettings,
-                                                        KMPXVideoPlaybackMute,
-                                                        this ) );
+        iMuteWatcher = CMPXCenRepWatcher::NewL( KCRUidMPXVideoSettings,
+                                                KMPXVideoPlaybackMute,
+                                                this );
     }
 
     //
@@ -1916,7 +2341,7 @@
     // goes back to Not Initialised state.
     //
     if ( iAccessoryMonitor )
-    {    
+    {
         delete iAccessoryMonitor;
         iAccessoryMonitor = NULL;
     }
@@ -1965,6 +2390,8 @@
     //  Reset the flag to retrieve the Buffering percentage from Helix
     //
     iHelixLoadingStarted = EFalse;
+
+    iSavedPosition = 0;
 }
 
 //  ------------------------------------------------------------------------------------------------
@@ -2022,10 +2449,11 @@
 //
 void CMPXVideoPlaybackController::OpenFile64L( const TDesC& aMediaFile,
                                                RFile64& aFile,
+                                               TInt aPosition,
                                                TInt aAccessPointId )
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::OpenFile64L( RFile64 )"),
-                   _L("file = %S"), &aMediaFile );
+                   _L("file = %S, position = %d"), &aMediaFile, aPosition );
 
     TBool fileExists = EFalse;
 
@@ -2052,6 +2480,8 @@
     DetermineMediaTypeL();
     SetPlaybackModeL();
 
+    iSavedPosition = aPosition; 
+    
     //
     //  Create accessory monitor to search for TV-Out events
     //
--- a/videoplayback/videohelix/src/mpxvideoplaybackmode.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/src/mpxvideoplaybackmode.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 19 %
+// Version : %version: 20 %
 
 
 
@@ -446,7 +446,8 @@
             TRAP_IGNORE( iVideoPlaybackCtlr->iState->SendErrorToViewL( err ) );
         }
     }
-    else
+    // Streaming link is non-pausable and no alarm stop playback
+    else if ( !iVideoPlaybackCtlr->IsAlarm() )
     {
         iVideoPlaybackCtlr->iPlayer->Stop();
 
--- a/videoplayback/videohelix/src/mpxvideoplaybackstate.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/src/mpxvideoplaybackstate.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 33 %
+// Version : %version: 35 %
 
 
 //
@@ -979,7 +979,20 @@
     if ( aError == KErrNone )
     {
         iVideoPlaybackCtlr->iPlaybackMode->HandleOpenComplete();
-
+		
+        //
+		//  call setposition with converted value saved in openfile
+        //
+		if ( iVideoPlaybackCtlr->iSavedPosition > 0 )
+        {    
+            MPX_DEBUG(_L("CMPXInitialisingState::HandleOpenComplete()  iSavedPosition %d"), iVideoPlaybackCtlr->iSavedPosition );
+                
+            TInt64 pos( iVideoPlaybackCtlr->iSavedPosition );
+            pos *= KPbMilliMultiplier;
+            
+            iVideoPlaybackCtlr->iPlayer->SetPositionL( pos );
+        }
+               
         MPX_DEBUG(_L("CMPXInitialisingState::HandleOpenComplete()  Sending Prepare()"));
 
         iVideoPlaybackCtlr->iPlayer->Prepare();
@@ -1876,7 +1889,7 @@
 void CMPXSeekingState::HandleBackground()
 {
     MPX_DEBUG(_L("CMPXSeekingState::HandleBackground()"));
-    MPX_TRAPD( err, iVideoPlaybackCtlr->iState->HandleStopSeekL() );
+    MPX_TRAPD( err, HandleStopSeekL() );
     iVideoPlaybackCtlr->iPlaybackMode->HandleBackground();
 }
 
@@ -1886,6 +1899,7 @@
 void CMPXSeekingState::HandlePause()
 {
     MPX_DEBUG(_L("CMPXSeekingState::HandlePause()"));
+    MPX_TRAPD( err, HandleStopSeekL() );
     iVideoPlaybackCtlr->iPlaybackMode->HandlePause();
 }
 
--- a/videoplayback/videohelix/src/mpxvideoplayerutility.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/src/mpxvideoplayerutility.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 16 %
+// Version : %version: 18 %
 
 
 #include <AudioPreference.h>
@@ -288,7 +288,7 @@
 void CMpxVideoPlayerUtility::SurfaceRemovedFromView()
 {
     MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::SurfaceRemovedFromView()"));
-    
+
     if ( ! iSurfaceId.IsNull() )
     {
         iSurfaceId = TSurfaceId::CreateNullId();
@@ -590,19 +590,17 @@
 {
     TInt error = KErrNone;
 
-    if ( iSurfaceId.IsNull() )
+    if ( !iSurfaceId.IsNull() )
     {
-        error = KErrNotFound;
-    }
+        //
+        //  Send command to view to remove the surface
+        //
+        MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceRemoved ) );
 
-    //
-    //  Send command to view to remove the surface
-    //
-    MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceRemoved ) );
+        error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved( iSurfaceId );
 
-    error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved( iSurfaceId );
-
-    iSurfaceId = TSurfaceId::CreateNullId();
+        iSurfaceId = TSurfaceId::CreateNullId();
+    }
 
     return error;
 }
--- a/videoplayback/videohelix/src/mpxvideoseeker.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/src/mpxvideoseeker.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 7 %
+// Version : %version: 8 %
 
 
 // INCLUDE FILES
@@ -128,7 +128,7 @@
 
     TInt trickplaySpeed = KDefaultTrickPlaySpeed;
 
-    if ( !iForward )
+    if ( ! iForward )
     {
         trickplaySpeed *= -1;
     }
@@ -152,16 +152,22 @@
         iIncrements *= -1;
     }
 
-    iSeekTimer->Start( 0,
-                       interval,
-                       TCallBack( CMPXVideoSeeker::UpdatePosition, this ) );
+    if ( ! iSeekTimer->IsActive() )
+    {
+        iSeekTimer->Start( 0,
+                           interval,
+                           TCallBack( CMPXVideoSeeker::UpdatePosition, this ) );
+    }
 #endif
 
     if ( err == KErrNone )
     {
-        iTrickPlayTimer->Start( KTrickPlayTimeout,
-                                0,
-                                TCallBack( CMPXVideoSeeker::StopTrickPlay, this ) );
+        if ( ! iTrickPlayTimer->IsActive() )
+        {
+            iTrickPlayTimer->Start( KTrickPlayTimeout,
+                                    0,
+                                    TCallBack( CMPXVideoSeeker::StopTrickPlay, this ) );
+        }
     }
 }
 
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg	Mon Mar 15 12:40:47 2010 +0200
@@ -835,3 +835,70 @@
 [Endtest]
 
 
+[Test]
+title 55.  InitialiseWithPositionL with file missing
+create videohelixtest test
+test InitializeWithPositionL 0 10 6575 vhpp_nofile.3gp KErrNotFound KErrNone KErrNone
+waittestclass test
+test GetMedia 
+waittestclass test
+delete test
+pause 1000
+[Endtest] 
+
+[Test]
+title 56.  InitialiseL with 32-bit file handle
+create videohelixtest test
+test InitializeHandleWithPositionL ERFile 60000 10 6575 vhpp_test.3gp KErrNone KErrNone KErrNone
+waittestclass test
+delete test
+pause 1000
+[Endtest] 
+
+[Test]
+title 57.  Initialise with rtsp link & AP
+create videohelixtest test
+test InitializeLinkWithPositionL 0 10 6575 rtsp:\/\/link.3gp KErrNone KErrNone KErrNone
+waittestclass test
+delete test
+pause 1000
+[Endtest]
+
+[Test]
+title 58.  Play rtsp link (forces buffering state)
+create videohelixtest test
+test InitializeLinkWithPositionL 0 10 6575 rtsp:\/\/link.3gp KErrNone KErrNone KErrNone
+waittestclass test
+test IssueGeneralCommand EPbCmdPlay KErrNone ECallbackBuffering
+waittestclass test
+delete test
+pause 1000
+[Endtest]
+
+[Test]
+title 59.  Initialise with SDP file via 32-bit file handle
+create videohelixtest test
+test InitializeHandleWithPositionL ERFile 60000 10 6575 sdp_test.sdp KErrNone KErrNone KErrNone
+waittestclass test
+delete test
+pause 1000
+[Endtest]
+
+[Test]
+title 60.  InitialiseL with 64-bit file handle
+create videohelixtest test
+test InitializeHandleWithPositionL ERFile64 60000 10 6575 vhpp_test.3gp KErrNone KErrNone KErrNone
+waittestclass test
+delete test
+pause 1000
+[Endtest] 
+
+[Test]
+title 61.  Initialise with SDP file via 64-bit file handle
+create videohelixtest test
+test InitializeHandleWithPositionL ERFile64 60000 10 6575 sdp_test.sdp KErrNone KErrNone KErrNone
+waittestclass test
+delete test
+pause 1000
+[Endtest]
+
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/group/videohelixtest.mmp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/group/videohelixtest.mmp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 7 %
+// Version : %version: ou1cpsw#8 %
 
 
 
@@ -88,5 +88,6 @@
 LIBRARY         centralrepository.lib
 LIBRARY         flogger.lib
 LIBRARY         playbackhelper.lib
+LIBRARY         hwrmlightclient.lib   // Lights control
 
 // End of File
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/videohelixtest.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/videohelixtest.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 11 %
+// Version : %version: 12 %
 
 
 #ifndef __VHPPTESTCASE_H__
@@ -173,6 +173,9 @@
         virtual TInt ConnectHDMITvOutL();
         virtual TInt DisconnectHDMITvOutL();
         virtual TInt SetHDMITvOutConnectedL();
+        virtual TInt InitializeWithPositionL( CStifItemParser& aItem );
+        virtual TInt InitializeLinkWithPositionL( CStifItemParser& aItem );
+        virtual TInt InitializeHandleWithPositionL( CStifItemParser& aItem );
 
         // ---------------------------------------------------------------------
         //  Helper Functions
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 17 %
+// Version : %version: 18 %
 
 
 // [INCLUDE FILES] - do not remove
@@ -118,8 +118,11 @@
         ENTRY( "HandleVolume", CVHPPTestClass::HandleVolumeL ),
         ENTRY( "ConnectHDMITvOut", CVHPPTestClass::ConnectHDMITvOutL ),
         ENTRY( "DisconnectHDMITvOut", CVHPPTestClass::DisconnectHDMITvOutL ),
-        ENTRY( "SetHDMITvOutConnected", CVHPPTestClass::SetHDMITvOutConnectedL )
-
+        ENTRY( "SetHDMITvOutConnected", CVHPPTestClass::SetHDMITvOutConnectedL ),
+
+        ENTRY ("InitializeWithPositionL", CVHPPTestClass::InitializeWithPositionL),
+        ENTRY ("InitializeLinkWithPositionL", CVHPPTestClass::InitializeLinkWithPositionL),
+        ENTRY ("InitializeHandleWithPositionL", CVHPPTestClass::InitializeHandleWithPositionL)
 
         //
         //  ADD NEW ENTRIES HERE
@@ -2229,4 +2232,247 @@
     return KErrNone;
 }
 
+TInt
+CVHPPTestClass::InitializeWithPositionL( CStifItemParser& aItem )
+{
+    MPX_ENTER_EXIT(_L("CVHPPTestClass::InitializeL()"));
+    iLog->Log(_L("CVHPPTestClass::InitializeL()"));
+
+    TInt duration;
+    TInt volumeSteps;
+    TInt position;
+    
+    TInt err = aItem.GetNextInt( duration );
+
+    if ( err == KErrNone )
+    {
+        //
+        //  We will always get an Init Complete message out
+        //
+        TCallbackEvent* event = new TCallbackEvent;
+
+        event->iEvent = EPInitialised;
+        event->iData  = duration;
+        event->iError = KErrNone;
+
+        AddExpectedEvent( event );
+
+        // 
+        // read number of volume steps
+        //
+        err = aItem.GetNextInt( volumeSteps );
+        
+        if ( err == KErrNone )
+        {        
+            //
+            // set volume steps
+            //
+            SetVolumeSteps( volumeSteps );
+            
+            err = aItem.GetNextInt( position );
+            
+            if (err == KErrNone )
+            {
+                TBuf<120> fullPath;    
+
+                err = ReadFileInitializationParameters( aItem, fullPath );
+                
+                if ( err == KErrNone )
+                {
+                    PreparePluginL();
+        
+                    //
+                    //  Initalize the Plugin with a file name
+                    //
+                    MPX_DEBUG(_L("Initialize the Plugin:  filename = %S, position = %d"), &fullPath, position);
+                    iLog->Log(_L("Initialize the Plugin:  filename = %S, position = %d"), &fullPath, position);
+        
+                    iPlaybackPlugin->InitialiseWithPositionL( fullPath, position );
+                }
+
+            }
+        }
+    }
+
+    return err;
+}
+
+
+TInt
+CVHPPTestClass::InitializeLinkWithPositionL( CStifItemParser& aItem )
+{
+    MPX_ENTER_EXIT(_L("CVHPPTestClass::InitializeLinkL()"));
+    iLog->Log(_L("CVHPPTestClass::InitializeLinkL()"));
+
+    TInt duration;
+    TInt volumeSteps;
+    TInt position;
+    
+    TInt err = aItem.GetNextInt( duration );
+
+    if ( err == KErrNone )
+    {
+        //
+        //  We will always get an Init Complete message out
+        //
+        TCallbackEvent* event = new TCallbackEvent;
+
+        event->iEvent = EPInitialised;
+        event->iData  = duration;
+        event->iError = KErrNone;
+
+        AddExpectedEvent( event );
+
+        // 
+        // read number of volume steps
+        //
+        err = aItem.GetNextInt( volumeSteps );
+        
+        if ( err == KErrNone )
+        {        
+            //
+            // set volume steps
+            //
+            SetVolumeSteps( volumeSteps );
+            
+            err = aItem.GetNextInt( position );
+            
+            if ( err == KErrNone )
+            {
+                TPtrC  link;
+    
+                //
+                //  Read in the link from the config file
+                //
+                TInt err = aItem.GetNextString( link );
+    
+                if ( err == KErrNone )
+                {
+                    TInt err = ReadInitializationErrors( aItem );
+    
+                    if ( err == KErrNone )
+                    {
+                        PreparePluginL();
+    
+                        //
+                        //  Extract the streaming link from the ram file and
+                        //  Initalize the Plugin with the link and an access point
+                        //
+                        MPX_DEBUG(_L("Initialize the Plugin:  link = %S, position = %d"), &link, position);
+                        iLog->Log(_L("Initialize the Plugin:  link = %S, position = %d"), &link, position);
+    
+                        iPlaybackPlugin->InitStreamingL( link, KNullDesC8, 11, position );
+                    }
+                }
+            }
+        }
+    }
+
+    return err;
+}
+
+
+TInt
+CVHPPTestClass::InitializeHandleWithPositionL( CStifItemParser& aItem  )
+{
+    MPX_ENTER_EXIT(_L("CVHPPTestClass::InitializeHandleL()"));
+    iLog->Log(_L("CVHPPTestClass::InitializeHandleL()"));
+
+    TInt duration;
+    TInt volumeSteps;
+    TInt position;
+    TInt fileHandle32;
+    
+    TInt err = aItem.GetNextInt( fileHandle32 );
+    
+    if ( err == KErrNone )
+    {        
+    
+#ifndef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+        //
+        // set RFile as default if the 64-bit flag is not defined
+        //
+        fileHandle32 = ETrue;
+#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+        
+        err = aItem.GetNextInt( duration );
+    
+        if ( err == KErrNone )
+        {
+            //
+            //  We will always get an Init Complete message out
+            //
+            TCallbackEvent* event = new TCallbackEvent;
+    
+            event->iEvent = EPInitialised;
+            event->iData  = duration;
+            event->iError = KErrNone;
+    
+            AddExpectedEvent( event );
+    
+            // 
+            // read number of volume steps
+            //
+            err = aItem.GetNextInt( volumeSteps );
+            
+            if ( err == KErrNone )
+            {        
+                //
+                // set volume steps
+                //
+                SetVolumeSteps( volumeSteps );
+
+                err = aItem.GetNextInt( position );
+
+                if (err == KErrNone )
+                {
+                    TBuf<120> fullPath;
+                    
+                    err = ReadFileInitializationParameters( aItem, fullPath );
+        
+                    if ( err == KErrNone )
+                    {
+                        PreparePluginL();
+        
+                        RFs fs;
+                        TInt error = fs.Connect();
+                        TInt fileError = KErrNone;
+                    
+                        //
+                        //  Open a file handle to the clip
+                        //
+                        if ( fileHandle32 )
+                        {
+                            RFile file;
+                            fileError = file.Open( fs, fullPath, EFileRead );
+                            iPlaybackPlugin->InitialiseWithPositionL( file, position );
+                            file.Close();
+                        }
+#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+                        else
+                        {
+                            RFile64 file64;
+                            fileError = file64.Open( fs, fullPath, EFileRead );
+                            iPlaybackPlugin->Initialise64L( file64, position );
+                            file64.Close();
+                        }
+#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+                            
+                        //
+                        //  Initalize the Plugin with a file name
+                        //
+                        MPX_DEBUG(_L("Initialize the Plugin with File Handle:  filename = %S, position = %d"), &fullPath, position);
+                        iLog->Log(_L("Initialize the Plugin with File Handle:  filename = %S, position = %d"), &fullPath, position);
+            
+                        fs.Close();
+                    }
+                }            
+
+            } 
+        } 
+    } 
+
+    return err;
+}
+
 //  EOF
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolconfiguration.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolconfiguration.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 11 %
+
+// Version : %version: e003sa33#13 %
 
 
 // INCLUDE FILES
@@ -98,17 +99,10 @@
     if ( fileDetails->iPlaybackMode == EMPXVideoStreaming )
     {
         //
-        // streaming mode, add branding animation control to show while initializing
+        //  streaming mode, add branding animation control to show while initializing
         //
         iControlsList.AppendL( EMPXBrandingAnimation );
     }
-    else if ( fileDetails->iRNFormat )
-    {
-        //
-        // RN clip and local mode, add RN logo bitmap to show while initializing
-        //
-        iControlsController->SetRealOneBitmapVisibility( ETrue );
-    }
 
     iControlsList.AppendL( EMPXSoftkeyDetails );
     iControlsList.AppendL( EMPXSoftkeyBack );
@@ -298,11 +292,14 @@
             }
 
             //
-            //  If video is enabled, add aspect ratio icon
+            //  If video is enabled, 
+            //  if video has not same aspect ratio with phone screenadd then
+            //  add aspect ratio icon
             //
             if ( ! iAspectRatioIconAdded &&
                    fileDetails->iVideoHeight > 0 &&
                    fileDetails->iVideoWidth > 0 &&
+                   ! ( iControlsController->IsSameAspectRatio() ) &&
                    AknLayoutUtils::PenEnabled() )
             {
                 iControlsList.AppendL( EMPXAspectRatioIcon );
@@ -315,7 +312,7 @@
         //
         //  No video for this clip
         //
-    
+
         //
         //  Remove the Real One bitmap and show the audio only bitmaps
         //
@@ -323,7 +320,7 @@
 
         if ( ! iAudioOnlyIndicatorsAdded )
         {
-            if ( fileDetails->iRNFormat )
+            if ( iControlsController->IsRealMediaFormat() )
             {
                 iControlsList.AppendL( EMPXRealAudioBitmap );
             }
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 27 %
+
+// Version : %version: e003sa33#30 %
 
 
 // INCLUDE FILES
@@ -66,6 +67,7 @@
 const TInt KMPXControlsTimeOut = 4000000;
 
 const TInt KMP4LayoutSet = 6;
+
 // ================= MEMBER FUNCTIONS ==============================================================
 
 // -------------------------------------------------------------------------------------------------
@@ -77,8 +79,8 @@
     CMPXVideoPlaybackContainer* aContainer, TRect aRect )
     : iControls( EMPXControlsCount ),
       iRect( aRect ),
-      iContainer( aContainer ),
-      iSurfaceCreated(EFalse)
+      iSurfaceCreated( EFalse ),
+      iContainer( aContainer )
 {
 }
 
@@ -115,12 +117,7 @@
     iFileDetails = aDetails;
     iTvOutConnected = iFileDetails->iTvOutConnected;
 
-    iFileDetails->iRNFormat = IsRealFormatL( iFileDetails->iClipName->Des() );
-
-    if ( iFileDetails->iRNFormat )
-    {
-    	CreateRealOneBitmapL();
-    }
+    iRNFormat = IsRealFormatL( iFileDetails->iClipName->Des() );
 
     iControlsPolicy = CMPXVideoPlaybackControlPolicy::NewL();
     iControlsConfig = CMPXVideoPlaybackControlConfiguration::NewL( this );
@@ -167,9 +164,8 @@
 
     iFs.Close();
 
-
 #ifdef RD_TACTILE_FEEDBACK
-    if (iFeedback)
+    if ( iFeedback )
     {
         iFeedback->RemoveFeedbackForControl( iContainer );
     }
@@ -225,8 +221,6 @@
 
     iFileDetails = aDetails;
 
-    iFileDetails->iRNFormat = IsRealFormatL( iFileDetails->iClipName->Des() );
-
     iControlsConfig->UpdateControlsWithFileDetailsL();
 
     ControlsListUpdatedL();
@@ -377,14 +371,16 @@
             break;
         }
         case EMPXControlCmdSurfaceCreated:
-		{
-			//
-			//  When surface is created, remove the Real One Bitmap
-			//
-			iSurfaceCreated = ETrue;
-			SetRealOneBitmapVisibility( EFalse );
-			break;
-		}
+        {
+            iSurfaceCreated = ETrue;
+            SetRealOneBitmapVisibility( EFalse );
+            break;
+        }
+        case EMPXControlCmdSurfaceRemoved:
+        {
+            iSurfaceCreated = EFalse;
+            break;
+        }
     }
 }
 
@@ -402,8 +398,8 @@
     //
     if ( aNewState != iState )
     {
-    	TBool hideControls( EFalse );
-    	
+        TBool hideControls( EFalse );
+
         iState = aNewState;
 
         switch ( aNewState )
@@ -416,8 +412,10 @@
                 if ( iFileDetails->iPlaybackMode == EMPXVideoStreaming ||
                      iFileDetails->iPlaybackMode == EMPXVideoLiveStreaming )
                 {
-                    iControlsConfig->UpdateControlListL( EMPXControlCmdPluginInitialized );
-                    ControlsListUpdatedL();
+                    TRAP_IGNORE(
+                        iControlsConfig->UpdateControlListL( EMPXControlCmdPluginInitialized );
+                        ControlsListUpdatedL();
+                        );
                 }
 
                 break;
@@ -453,7 +451,7 @@
                 }
                 else
                 {
-                	UpdateControlsVisibility();
+                    UpdateControlsVisibility();
                 }
 
                 break;
@@ -497,7 +495,6 @@
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::CreateRealOneBitmapL()"));
 
-
     TFileName iconsPath;
     LocateBitmapFileL( iconsPath );
 
@@ -880,7 +877,7 @@
             CMPXVideoPlaybackBrandingAnimation* brandingAnimation =
                 CMPXVideoPlaybackBrandingAnimation::NewL( this,
                                                           brandingLogoRect,
-                                                          iFileDetails->iRNFormat );
+                                                          iRNFormat );
 
             CleanupStack::PushL( brandingAnimation );
 
@@ -1084,7 +1081,7 @@
             label->SetAlignment( EHRightVBottom );
         }
     }
-    
+
     skRect = label->Rect();
 
     // Enlarge the button region to make it easy to be touched.
@@ -1583,13 +1580,18 @@
     _LIT(KMPXReal, "real" );
     _LIT(KMPXRN, "rn" );
 
-    if (iFileDetails->iMimeType)
+    if ( iFileDetails->iMimeType )
     {
         iFileDetails->iMimeType->Des().LowerCase();
 
         if ( iFileDetails->iMimeType->Find( KMPXReal ) >= 0 ||
              iFileDetails->iMimeType->Find( KMPXRN ) >= 0 )
         {
+            //
+            // RN clip and local mode, add RN logo bitmap to show while initializing
+            //
+            CreateRealOneBitmapL();
+            SetRealOneBitmapVisibility( ETrue );
             realFormat = ETrue;
         }
     }
@@ -1719,7 +1721,7 @@
 
     if ( iRealOneBitmap )
     {
-    	iRealOneBitmap->MakeVisible( aVisible );
+        iRealOneBitmap->MakeVisible( aVisible );
     }
 }
 
@@ -1744,10 +1746,6 @@
 
             break;
         }
-        default :
-        {
-            break;
-        }
     }
 }
 
@@ -1925,13 +1923,46 @@
     }
 }
 
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackControlsController::SetBackgroundBlack
+// -------------------------------------------------------------------------------------------------
+//
 TBool CMPXVideoPlaybackControlsController::SetBackgroundBlack()
 {
-    TBool backgroundBlack = iSurfaceCreated && !iTvOutConnected;
+    TBool backgroundBlack = iSurfaceCreated && ! iTvOutConnected;
 
     MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::SetBackgroundBlack(%d)"), backgroundBlack);
     return backgroundBlack;
 }
 
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackControlsController::IsSameAspectRatio
+// -------------------------------------------------------------------------------------------------
+//
+TBool CMPXVideoPlaybackControlsController::IsSameAspectRatio()
+{
+	MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackControlsController::IsSameAspectRatio()" ) );
+	
+    TBool retVal = EFalse;
+
+    if ( iFileDetails->iVideoEnabled &&
+    	 iFileDetails->iVideoHeight > 0 &&
+  	     iFileDetails->iVideoWidth > 0 )
+    {
+        TRect displayRect = iContainer->Rect();
+        TReal displayAspectRatio = ( TReal32 )displayRect.Width() / ( TReal32 )displayRect.Height();
+        TReal videoAspectRatio = ( TReal32 )iFileDetails->iVideoWidth / 
+        		                 ( TReal32 )iFileDetails->iVideoHeight;
+
+        if ( displayAspectRatio == videoAspectRatio )
+        {
+            retVal = ETrue;
+        }
+    }
+
+    MPX_DEBUG( _L( "CMPXVideoPlaybackControlsController::IsSameAspectRatio(%d)" ), retVal );
+    
+    return retVal;
+}
 
 // End of File
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackmediadetailsviewer.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackmediadetailsviewer.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version:  e003sa33#14 %
+
+// Version : %version:  e003sa33#16 %
 
 
 // INCLUDE FILES
@@ -55,23 +56,16 @@
 
 // UID of this interface
 const TUid KFileDetailsCntlPluginUid = {0x2002A59D};
-const TUid KFileDetailsInterfaceUid = {0x2002A5A0};
-// ---------------------------------------------------------------------------
-// Local function to cleanup an array
-// ---------------------------------------------------------------------------
-//
 
-static void CleanupEcomArray( TAny* aArray )
-{
-  ( static_cast<RImplInfoPtrArray*>( aArray ) )->ResetAndDestroy();
-  ( static_cast<RImplInfoPtrArray*>( aArray ) )->Close();
-}
+const TUint32 KScrollTimerDelayTickCounts = 2000;   // 2000 milliseconds
+const TUint32 KInvalidTick = 0;
 
 // ============================ MEMBER FUNCTIONS ===================================================
 
 CMPXVideoPlaybackMediaDetailsViewer::CMPXVideoPlaybackMediaDetailsViewer(
     CMPXVideoPlaybackControlsController* aController )
     : iController( aController )
+    , iScrollTimerDelayBeginningTick( KInvalidTick )
 {
 }
 
@@ -83,26 +77,25 @@
 void CMPXVideoPlaybackMediaDetailsViewer::ConstructL()
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackMediaDetailsViewer::ConstructL()"));
-   
+
     iViewerRect = CalculateViewerRectL();
     SetRect( TRect(0, 0, iViewerRect.Width(), iViewerRect.Height()) );
-        
+
     CreateLabelsL();
     SkinChangeL();
-    
+
     iBackgroundBitmap = new ( ELeave ) CFbsBitmap();
     TSize bitmapSize = Rect().Size();
     User::LeaveIfError( iBackgroundBitmap->Create( bitmapSize, EColor16MA ) );
-    
+
     iScrollPosition = 0;
-    iScrollingTextTimer = CPeriodic::NewL( CActive::EPriorityStandard );     
-    iScrollingTextTimer->Start( 
+    iScrollingTextTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+    iScrollingTextTimer->Start(
                 0,
                 175000,
-                TCallBack( CMPXVideoPlaybackMediaDetailsViewer::ScrollFilenameTimer, this ) );  
-    
+                TCallBack( CMPXVideoPlaybackMediaDetailsViewer::ScrollFilenameTimer, this ) );
+
     iShouldPauseScrolling = EFalse;
-           
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -131,79 +124,79 @@
 CMPXVideoPlaybackMediaDetailsViewer::~CMPXVideoPlaybackMediaDetailsViewer()
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackMediaDetailsViewer::~CMPXVideoPlaybackMediaDetailsViewer()"));
-    
+
     if ( iClipnameLabel )
     {
         delete iClipnameLabel;
         iClipnameLabel = NULL;
     }
-    
+
     if ( iTitleLabel )
     {
         delete iTitleLabel;
         iTitleLabel = NULL;
-    }    
-    
+    }
+
     if ( iArtistLabel )
     {
         delete iArtistLabel;
         iArtistLabel = NULL;
-    }           
-    
+    }
+
     if ( iFormatLabel )
     {
         delete iFormatLabel;
         iFormatLabel = NULL;
     }
-    
+
     if ( iResolutionLabel )
     {
         delete iResolutionLabel;
         iResolutionLabel = NULL;
-    }    
-    
+    }
+
     if ( iDurationLabel )
     {
         delete iDurationLabel;
         iDurationLabel = NULL;
-    }    
-  
+    }
+
     if ( iBitrateLabel )
     {
         delete iBitrateLabel;
         iBitrateLabel = NULL;
-    }     
-    
+    }
+
     if ( iLicenseLabel )
     {
         delete iLicenseLabel;
         iLicenseLabel = NULL;
-    }     
-    
+    }
+
     if ( iBackgroundBitmap )
     {
         delete iBackgroundBitmap;
         iBackgroundBitmap = NULL;
-    }          
-    
+    }
+
     if ( iScrollingTextTimer )
     {
         iScrollingTextTimer->Cancel();
         delete iScrollingTextTimer;
         iScrollingTextTimer = NULL;
-    }        
-    
+    }
+
     if ( iAdditionalLabel )
     {
         delete iAdditionalLabel;
         iAdditionalLabel = NULL;
-    }   
-    
+    }
+
     if ( iAdditionalString )
     {
         delete iAdditionalString;
         iAdditionalString = NULL;
-    }          
+    }
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -223,12 +216,12 @@
         case TPointerEvent::EButton1Up:
         {
             TRect expandedRect;  //make it a bit easier to click the License label
-            
+
             if ( iLicenseLabel )
             {
-                expandedRect = TRect(iLicenseLabel->Rect().iTl, 
-                                     TPoint(iLicenseLabel->Rect().iBr.iX, 
-                                            iLicenseLabel->Rect().iBr.iY * 2 ) );                
+                expandedRect = TRect(iLicenseLabel->Rect().iTl,
+                                     TPoint(iLicenseLabel->Rect().iBr.iX,
+                                            iLicenseLabel->Rect().iBr.iY * 2 ) );
             }
 
             if ( iLicenseLabel && expandedRect.Contains(aPointerEvent.iPosition) )
@@ -236,9 +229,9 @@
                 LaunchDRMDetailsL();
             }
             else
-            { 
-                iController->HandleEventL( EMPXControlCmdCloseFileDetailsViewer );   
-            }             
+            {
+                iController->HandleEventL( EMPXControlCmdCloseFileDetailsViewer );
+            }
         }
     }
 }
@@ -248,7 +241,7 @@
 // -------------------------------------------------------------------------------------------------
 //
 void CMPXVideoPlaybackMediaDetailsViewer::LaunchDRMDetailsL()
-{      
+{
     iController->iContainer->HandleCommandL(EMPXPbvLaunchDRMDetails);
 }
 
@@ -257,10 +250,9 @@
 // -------------------------------------------------------------------------------------------------
 //
 void CMPXVideoPlaybackMediaDetailsViewer::SkinChangeL()
-{   
+{
 }
 
-
 // -------------------------------------------------------------------------------------------------
 //   CMPXVideoPlaybackMediaDetailsViewer::Draw()
 // -------------------------------------------------------------------------------------------------
@@ -271,16 +263,16 @@
 
     CWindowGc& gc = SystemGc();
     gc.SetClippingRect( aRect );
-    
+
     this->DrawableWindow()->SetCornerType(EWindowCorner5);
-    
+
     TRAP_IGNORE( UpdateBackgroundBitmapL() );
     gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
     gc.BitBlt( Rect().iTl, iBackgroundBitmap );
-                    
-    TRAP_IGNORE( FormatLabelsL() );    
-    
-    gc.SetBrushStyle( CGraphicsContext::ENullBrush );       
+
+    TRAP_IGNORE( FormatLabelsL() );
+
+    gc.SetBrushStyle( CGraphicsContext::ENullBrush );
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -290,7 +282,7 @@
 void CMPXVideoPlaybackMediaDetailsViewer::FormatLabelsL() const
 {
     // FORMAT LABELS
-    
+
 
     TInt labelWidth = Rect().iBr.iX;
     TInt labelHeight = iController->iContainer->Rect().iBr.iY / KMediaDetailsViewerMaxItems;
@@ -299,114 +291,114 @@
     // License
     if ( iController->FileDetails()->iDrmProtected )
     {
-        iLicenseLabel->SetExtent( 
-        		             TPoint(Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded) ) , 
-                             TSize( labelWidth, labelHeight ) 
-                             );  
-        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_LICENSE_HEADING );     
+        iLicenseLabel->SetExtent(
+                             TPoint(Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded) ) ,
+                             TSize( labelWidth, labelHeight )
+                             );
+        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_LICENSE_HEADING );
         CleanupStack::PushL( heading );
-        
+
         TBuf<KMediaDetailsViewerMaxBufLen> licenseField;
         licenseField.Append(KLeftMargin);
         licenseField.Append( *heading );
         iLicenseLabel->OverrideColorL(EColorLabelText, KRgbDarkBlue);
         iLicenseLabel->SetTextL(licenseField);
-        iLicenseLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin); 
+        iLicenseLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
         iLicenseLabel->SetLabelAlignment(ELayoutAlignCenter);
         iLicenseLabel->SetUnderlining(ETrue);
         iLicenseLabel->MakeVisible( ETrue );
         rowsAdded++;
-        
+
         CleanupStack::PopAndDestroy( heading );
-    }    
+    }
 
     // Filename
     HBufC* fileName = iController->FileDetails()->GenerateFileNameL();
+
     if ( fileName && fileName->Length() )
-    {   
-        // file name gets populated by HandleScrollFilenameTimer method         
-        iClipnameLabel->SetExtent( 
-        		             TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) , 
+    {
+        // file name gets populated by HandleScrollFilenameTimer 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;
-    }    
+    }
 
     // Mime Type (Format)
-    if ( iController->FileDetails()->iMimeType 
-    		&& iController->FileDetails()->iMimeType->Length() )
+    if ( iController->FileDetails()->iMimeType && iController->FileDetails()->iMimeType->Length() )
     {
-        iFormatLabel->SetExtent( 
-        		          TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) , 
+        iFormatLabel->SetExtent(
+                          TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) ,
                           TSize( labelWidth, labelHeight )
                           );
-        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_FORMAT_HEADING );     
+        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_FORMAT_HEADING );
         CleanupStack::PushL( heading );
-        
+
         TBuf<KMediaDetailsViewerMaxBufLen> formatField;
         formatField.Append(KLeftMargin);
         formatField.Append( *heading );
         formatField.Append( KHeadingValueSeperator );
         TInt allowLen = KMediaDetailsViewerMaxBufLen-formatField.Length();
-        formatField.Append( (iController->FileDetails()->iMimeType)->Left(allowLen) );        
+        formatField.Append( (iController->FileDetails()->iMimeType)->Left(allowLen) );
         iFormatLabel->SetTextL(formatField);
         iFormatLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
-        iFormatLabel->MakeVisible( ETrue ); 
+        iFormatLabel->MakeVisible( ETrue );
         rowsAdded++;
-        
+
         CleanupStack::PopAndDestroy( heading );
-    }    
+    }
 
     // Resolution
-    if ( iController->FileDetails()->iVideoHeight &&  
-         iController->FileDetails()->iVideoWidth )
+    if ( iController->FileDetails()->iVideoHeight &&  iController->FileDetails()->iVideoWidth )
     {
-        iResolutionLabel->SetExtent( 
-        		               TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) , 
+        iResolutionLabel->SetExtent(
+                               TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) ,
                                TSize( labelWidth, labelHeight )
                                );
-        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_RESOLUTION_HEADING );     
+        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_RESOLUTION_HEADING );
         CleanupStack::PushL( heading );
-        
+
         TBuf<KMediaDetailsViewerMaxBufLen> resolutionField;
         resolutionField.Append(KLeftMargin);
         resolutionField.Append( *heading );
         resolutionField.Append( KHeadingValueSeperator );
-        resolutionField.AppendNum( iController->FileDetails()->iVideoWidth );   
+        resolutionField.AppendNum( iController->FileDetails()->iVideoWidth );
         resolutionField.Append( KWidthHeightSeparator );
         resolutionField.AppendNum( iController->FileDetails()->iVideoHeight);
         AknTextUtils::DisplayTextLanguageSpecificNumberConversion( resolutionField );
-        
+
         iResolutionLabel->SetTextL(resolutionField);
         iResolutionLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
-        iResolutionLabel->MakeVisible( ETrue ); 
+        iResolutionLabel->MakeVisible( ETrue );
         rowsAdded++;
-        
+
         CleanupStack::PopAndDestroy( heading );
-    } 
+    }
 
     // Duration
     if ( iController->FileDetails()->iDuration > 0 )
     {
         iDurationLabel->SetExtent(
-        		             TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded) ) , 
+                             TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded) ) ,
                              TSize( labelWidth, labelHeight )
                              );
-        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_DURATION_HEADING );     
+        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_DURATION_HEADING );
         CleanupStack::PushL( heading );
-        
+
         TBuf<KMediaDetailsViewerMaxBufLen> durationField;
         durationField.Append(KLeftMargin);
         durationField.Append( *heading );
         durationField.Append( KHeadingValueSeperator );
-        
+
         TInt64 durationInSeconds =  iController->FileDetails()->iDuration / 1000;
-        
+
         HBufC* unitFormatString;
+
         if ( durationInSeconds < 3600 )  // one hour
         {
             unitFormatString = StringLoader::LoadLC(R_QTN_TIME_DURAT_MIN_SEC);
@@ -415,88 +407,84 @@
         {
             unitFormatString = StringLoader::LoadLC(R_QTN_TIME_DURAT_LONG);
         }
-        
+
         TBuf<64> dur;
         TTime durTime = TTime(durationInSeconds * 1000000);
         durTime.FormatL(dur, *unitFormatString);
-        AknTextUtils::DisplayTextLanguageSpecificNumberConversion( dur );        
-        
+        AknTextUtils::DisplayTextLanguageSpecificNumberConversion( dur );
+
         durationField.Append( dur );
         iDurationLabel->SetTextL(durationField);
         iDurationLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
-        iDurationLabel->MakeVisible( ETrue ); 
+        iDurationLabel->MakeVisible( ETrue );
         rowsAdded++;
-        
+
         CleanupStack::PopAndDestroy( unitFormatString ); // unitFormatString
         CleanupStack::PopAndDestroy( heading );
-
-    }     
-    
+    }
 
     // Bitrate
     if ( iController->FileDetails()->iBitRate > 0 )
     {
-        iBitrateLabel->SetExtent( 
-        		          TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) , 
+        iBitrateLabel->SetExtent(
+                          TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) ,
                           TSize( labelWidth, labelHeight )
                           );
-        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_BITRATE_HEADING );     
+        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_BITRATE_HEADING );
         CleanupStack::PushL( heading );
-        
+
         TBuf<KMediaDetailsViewerMaxBufLen> bitrateField;
         bitrateField.Append(KLeftMargin);
         bitrateField.Append( *heading );
         bitrateField.Append( KHeadingValueSeperator );
-                
-        HBufC* formattedBitrate = 
+
+        HBufC* formattedBitrate =
              StringLoader::LoadLC(R_MPX_BITRATE_UNITS,iController->FileDetails()->iBitRate / 1000 );
-                
+
         bitrateField.Append( *formattedBitrate );
         iBitrateLabel->SetTextL(bitrateField);
         iBitrateLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
-        iBitrateLabel->MakeVisible( ETrue ); 
+        iBitrateLabel->MakeVisible( ETrue );
         rowsAdded++;
 
         CleanupStack::PopAndDestroy( formattedBitrate ); // formattedBitrate
         CleanupStack::PopAndDestroy( heading );
-    }         
+    }
 
     // Title
-    if ( iController->FileDetails()->iTitle 
-    		&& iController->FileDetails()->iTitle->Length() )
+    if ( iController->FileDetails()->iTitle && iController->FileDetails()->iTitle->Length() )
     {
-        iTitleLabel->SetExtent( 
-        		          TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) , 
-                          TSize( labelWidth, labelHeight ) 
+        iTitleLabel->SetExtent(
+                          TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) ,
+                          TSize( labelWidth, labelHeight )
                           );
-        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_TITLE_HEADING );     
+        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) );        
+        titleField.Append( (iController->FileDetails()->iTitle)->Left(allowLen) );
         iTitleLabel->SetTextL(titleField);
         iTitleLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
         iTitleLabel->MakeVisible( ETrue );
         rowsAdded++;
-        
-        CleanupStack::PopAndDestroy( heading );        
-    }    
+
+        CleanupStack::PopAndDestroy( heading );
+    }
 
     // Artist
-    if ( iController->FileDetails()->iArtist 
-    		&& iController->FileDetails()->iArtist->Length() )
+    if ( iController->FileDetails()->iArtist && iController->FileDetails()->iArtist->Length() )
     {
-        iArtistLabel->SetExtent( 
-        		          TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) , 
+        iArtistLabel->SetExtent(
+                          TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) ,
                           TSize( labelWidth, labelHeight )
                           );
-        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_ARTIST_HEADING );     
+        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_ARTIST_HEADING );
         CleanupStack::PushL( heading );
-        
+
         TBuf<KMediaDetailsViewerMaxBufLen> artistField;
         artistField.Append(KLeftMargin);
         artistField.Append( *heading );
@@ -507,19 +495,18 @@
         iArtistLabel->SetAllMarginsTo(KMediaDetailsViewerItemMargin);
         iArtistLabel->MakeVisible( ETrue );
         rowsAdded++;
-        
-        CleanupStack::PopAndDestroy( heading );       
-    } 
- 
-    
+
+        CleanupStack::PopAndDestroy( heading );
+    }
+
     // Additional Label
-    if ( iAdditionalString && iAdditionalString->Length() ) 
-    {    
+    if ( iAdditionalString && iAdditionalString->Length() )
+    {
         iAdditionalLabel->SetExtent(
-        		               TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) , 
+                               TPoint( Rect().iTl.iX, Rect().iTl.iY + ( labelHeight * rowsAdded ) ) ,
                                TSize( labelWidth, labelHeight )
-                               );  
-        
+                               );
+
         TBuf<KMediaDetailsViewerMaxBufLen> titleField;
         titleField.Append(KLeftMargin);
         TInt allowLen = KMediaDetailsViewerMaxBufLen-titleField.Length();
@@ -545,9 +532,9 @@
 // -------------------------------------------------------------------------------------------------
 //
 CCoeControl* CMPXVideoPlaybackMediaDetailsViewer::ComponentControl(TInt aIndex) const
-{    
+{
     CCoeControl* control = NULL;
-    
+
     switch ( aIndex )
     {
         case 0:
@@ -580,7 +567,7 @@
         default:
             break;
     }
-    
+
     return control;
 }
 
@@ -598,60 +585,59 @@
 //
 void CMPXVideoPlaybackMediaDetailsViewer::CreateLabelsL()
 {
-    // Licence / DRM    
+    // Licence / DRM
     iLicenseLabel = new (ELeave) CEikLabel;
-    iLicenseLabel->SetContainerWindowL( *this );     
+    iLicenseLabel->SetContainerWindowL( *this );
     iLicenseLabel->SetTextL( KNullDesC );
 
     // Filename
     iClipnameLabel = new (ELeave) CEikLabel;
-    iClipnameLabel->SetContainerWindowL( *this );     
-    iClipnameLabel->SetTextL( KNullDesC ); 
+    iClipnameLabel->SetContainerWindowL( *this );
+    iClipnameLabel->SetTextL( KNullDesC );
     iClipnameLabel->SetLabelAlignment( ELayoutAlignBidi );
-    
+
     // Title
     iTitleLabel = new (ELeave) CEikLabel;
-    iTitleLabel->SetContainerWindowL( *this );     
-    iTitleLabel->SetTextL( KNullDesC );     
+    iTitleLabel->SetContainerWindowL( *this );
+    iTitleLabel->SetTextL( KNullDesC );
     iTitleLabel->SetLabelAlignment( ELayoutAlignBidi );
-    
+
     // Artist
     iArtistLabel = new (ELeave) CEikLabel;
-    iArtistLabel->SetContainerWindowL( *this );     
-    iArtistLabel->SetTextL( KNullDesC );        
+    iArtistLabel->SetContainerWindowL( *this );
+    iArtistLabel->SetTextL( KNullDesC );
     iArtistLabel->SetLabelAlignment( ELayoutAlignBidi );
-    
+
     // Format
     iFormatLabel = new (ELeave) CEikLabel;
-    iFormatLabel->SetContainerWindowL( *this );     
+    iFormatLabel->SetContainerWindowL( *this );
     iFormatLabel->SetTextL( KNullDesC );
     iFormatLabel->SetLabelAlignment( ELayoutAlignBidi );
-    
+
     // Resolution
     iResolutionLabel = new (ELeave) CEikLabel;
-    iResolutionLabel->SetContainerWindowL( *this );     
-    iResolutionLabel->SetTextL( KNullDesC );    
+    iResolutionLabel->SetContainerWindowL( *this );
+    iResolutionLabel->SetTextL( KNullDesC );
     iResolutionLabel->SetLabelAlignment( ELayoutAlignBidi );
-    
+
     // Duration
     iDurationLabel = new (ELeave) CEikLabel;
-    iDurationLabel->SetContainerWindowL( *this );     
-    iDurationLabel->SetTextL( KNullDesC );    
+    iDurationLabel->SetContainerWindowL( *this );
+    iDurationLabel->SetTextL( KNullDesC );
     iDurationLabel->SetLabelAlignment( ELayoutAlignBidi );
-    
+
     // Bitrate
     iBitrateLabel = new (ELeave) CEikLabel;
-    iBitrateLabel->SetContainerWindowL( *this );     
-    iBitrateLabel->SetTextL( KNullDesC );   
+    iBitrateLabel->SetContainerWindowL( *this );
+    iBitrateLabel->SetTextL( KNullDesC );
     iBitrateLabel->SetLabelAlignment( ELayoutAlignBidi );
 
     // Additional Labels
     iAdditionalLabel = new (ELeave) CEikLabel;
-    iAdditionalLabel->SetContainerWindowL( *this );     
-    iAdditionalLabel->SetTextL( KNullDesC );   
+    iAdditionalLabel->SetContainerWindowL( *this );
+    iAdditionalLabel->SetTextL( KNullDesC );
     iAdditionalLabel->SetLabelAlignment( ELayoutAlignBidi );
-
-} 
+}
 
 // -----------------------------------------------------------------------------
 // CMPXVideoPlaybackMediaDetailsViewer::UpdateBackgroundBitmapL
@@ -662,16 +648,15 @@
 {
     TSize bitmapSize = Rect().Size();
 
-    CFbsBitmapDevice* bgBitmapDevice = 
-                    CFbsBitmapDevice::NewL( iBackgroundBitmap );
+    CFbsBitmapDevice* bgBitmapDevice = CFbsBitmapDevice::NewL( iBackgroundBitmap );
     CleanupStack::PushL( bgBitmapDevice );
-                    
+
     CFbsBitGc* bgBitGc( NULL );
     User::LeaveIfError( bgBitmapDevice->CreateContext( bgBitGc ) );
     CleanupStack::PushL( bgBitGc );
 
     bgBitGc->SetBrushColor( TRgb(0x708090) );  // slate gray
-    bgBitGc->Clear(); 
+    bgBitGc->Clear();
 
     CleanupStack::PopAndDestroy( bgBitGc );
     CleanupStack::PopAndDestroy( bgBitmapDevice );
@@ -680,22 +665,22 @@
     //
     // Scan line length in 32-bit words
     TInt scanLineLengthWord = CFbsBitmap::ScanLineLength( bitmapSize.iWidth, EColor16MA) / 4;
-    
+
     iBackgroundBitmap->LockHeap();
-    TUint32* dataAddr = 
-                reinterpret_cast<TUint32*>( iBackgroundBitmap->DataAddress() );
+    TUint32* dataAddr = reinterpret_cast<TUint32*>( iBackgroundBitmap->DataAddress() );
+
     for ( TInt y = 0; y < bitmapSize.iHeight; y++ )
+    {
+        for ( TInt x = 0; x < bitmapSize.iWidth; x++ )
+        {
+            if ( ( y + x ) & 1 )
             {
-            for ( TInt x = 0; x < bitmapSize.iWidth; x++ )
-                {
-                if ( ( y + x ) & 1 )
-                    {
-                    // Make this pixel transparent
-                    dataAddr[y * scanLineLengthWord + x] = 0x00000000; 
-                    }
-                }
+                // Make this pixel transparent
+                dataAddr[y * scanLineLengthWord + x] = 0x00000000;
             }
-    
+        }
+    }
+
     iBackgroundBitmap->UnlockHeap();
 }
 
@@ -705,9 +690,9 @@
 //
 TInt CMPXVideoPlaybackMediaDetailsViewer::ScrollFilenameTimer( TAny* aPtr )
 {
-	TRAP_IGNORE( 
-			static_cast<CMPXVideoPlaybackMediaDetailsViewer*>(aPtr)->HandleScrollFilenameTimerL()
-			);
+    TRAP_IGNORE(
+            static_cast<CMPXVideoPlaybackMediaDetailsViewer*>(aPtr)->HandleScrollFilenameTimerL()
+            );
     return KErrNone;
 }
 
@@ -716,55 +701,79 @@
 // -------------------------------------------------------------------------------------------------
 //
 void CMPXVideoPlaybackMediaDetailsViewer::HandleScrollFilenameTimerL()
-{   
-    HBufC* fileName = iController->FileDetails()->GenerateFileNameL();
-    
-	if ( fileName && fileName->Length() )
+{
+    MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackMediaDetailsViewer::HandleScrollFilenameTimerL" ) );
+
+    TBool skipForTimerDelay = EFalse;
+
+    // add a delay after each complete scrolling
+    if ( iScrollTimerDelayBeginningTick != KInvalidTick )
     {
-        CleanupStack::PushL( fileName );
-        if ( iShouldPauseScrolling )
+        if ( ( User::NTickCount() - iScrollTimerDelayBeginningTick ) >= KScrollTimerDelayTickCounts )
+        {
+            iScrollTimerDelayBeginningTick = KInvalidTick;
+        }
+        else
         {
-            iShouldPauseScrolling = EFalse;
-            User::After( 2000000 );  // add a 2 second delay after each complete scrolling
-        }    
-    
-        TInt length = fileName->Length();                
-                        
-        HBufC* heading  = iEikonEnv->AllocReadResourceL( R_MPX_FILENAME_HEADING );     
-        CleanupStack::PushL( heading );
+            skipForTimerDelay = ETrue;
+        }
+    }
+
+    if ( !skipForTimerDelay && iShouldPauseScrolling )
+    {
+        iShouldPauseScrolling = EFalse;
+        iScrollTimerDelayBeginningTick = User::NTickCount();
+        skipForTimerDelay = ETrue;
+    }
+
+    // skip the scrolling operation if the loop for delay is going on
+    if ( !skipForTimerDelay )
+    {
+        HBufC* fileName = iController->FileDetails()->GenerateFileNameL();
+
+        
+        if ( fileName && fileName->Length() )
+        {
+            CleanupStack::PushL( fileName );
         
-        TBuf<KMediaDetailsViewerMaxBufLen> filenameField;
-        filenameField.Append(KLeftMargin);
-        filenameField.Append( *heading );
-        filenameField.Append( KHeadingValueSeperator );           
-        
-        if ( length >= KMediaDetailsViewerVisibleCharacters )
-        {  
-            filenameField.Append( fileName->Mid( iScrollPosition,
-            		KMediaDetailsViewerVisibleCharacters ) );
+            TInt length = 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 );
             
-            if ( iScrollPosition ==  (length - KMediaDetailsViewerVisibleCharacters) )
+            if ( length >= KMediaDetailsViewerVisibleCharacters )
             {
-                iScrollPosition = 0;    
-                iShouldPauseScrolling = ETrue;
+                filenameField.Append( fileName->Mid( iScrollPosition,
+                        KMediaDetailsViewerVisibleCharacters ) );
+
+                if ( iScrollPosition ==  (length - KMediaDetailsViewerVisibleCharacters) )
+                {
+                    iScrollPosition = 0;
+                    iShouldPauseScrolling = ETrue;
+                }
+                else
+                {
+                    iScrollPosition++;
+                }
             }
             else
             {
-                iScrollPosition++;
+                filenameField.Append( *fileName );
+                iScrollingTextTimer->Cancel();   // no need to keep the timer active
             }
-        }
-        else
-        {
-            filenameField.Append( *fileName );
-            iScrollingTextTimer->Cancel();   // no need to keep the timer active
+
+            iClipnameLabel->SetTextL(filenameField);
+            DrawNow();
+
+            CleanupStack::PopAndDestroy( heading );
+            CleanupStack::PopAndDestroy( fileName );
         }
-                    
-        iClipnameLabel->SetTextL(filenameField);    
-        DrawNow();
-        
-        CleanupStack::PopAndDestroy( heading );        
-        CleanupStack::PopAndDestroy( fileName );                  
-    }           
+    }
 }
 
 
@@ -775,43 +784,43 @@
 TInt CMPXVideoPlaybackMediaDetailsViewer::NumOfItemsShownInViewerL()
 {
     TInt numOfItems = 0;
-    
+
     if ( iController->FileDetails()->iDrmProtected )
     {
         numOfItems++;
     }
-    
+
     if ( iController->FileDetails()->iClipName )
     {
         numOfItems++;
     }
-    
+
     if ( iController->FileDetails()->iMimeType )
     {
         numOfItems++;
     }
-    
-    if ( iController->FileDetails()->iVideoHeight && 
+
+    if ( iController->FileDetails()->iVideoHeight &&
          iController->FileDetails()->iVideoWidth )
     {
         numOfItems++;
     }
-    
+
     if ( iController->FileDetails()->iDuration > 0 )
     {
-        numOfItems++;    
+        numOfItems++;
     }
-    
+
     if ( iController->FileDetails()->iBitRate > 0 )
     {
-        numOfItems++;  
+        numOfItems++;
     }
-    
+
     if ( iController->FileDetails()->iTitle )
     {
         numOfItems++;
     }
-    
+
     if ( iController->FileDetails()->iArtist )
     {
         numOfItems++;
@@ -819,27 +828,27 @@
 
     // Additional File Details
     CMPXFileDetailsPlugin* addPlugin( NULL );
-    
+
     // Use the interface to load the ecom plugin
     TRAPD ( err, addPlugin = CMPXFileDetailsPlugin::NewL( KFileDetailsCntlPluginUid ) );
 
     // If plugin loaded successfully
-    if (!err )
+    if ( ! err )
     {
         TPtrC addLabel;
         addLabel.Set( addPlugin->GetAdditionalLabelLC( iController->FileDetails()->iFourCCCode ) );
         iAdditionalString = addLabel.AllocL();
 
-        if ( iAdditionalString->Length() ) 
-        {   
+        if ( iAdditionalString->Length() )
+        {
             numOfItems++;
         }
 
         CleanupStack::PopAndDestroy();  // addLabel
     }
-    
+
     delete addPlugin;
-    
+
     return numOfItems;
 }
 
@@ -850,38 +859,38 @@
 TRect CMPXVideoPlaybackMediaDetailsViewer::CalculateViewerRectL()
 {
     TInt numOfItems = NumOfItemsShownInViewerL();
-    TRect viewerRect;    
-    
-    // optimize viewer's width for the clipname 
+    TRect viewerRect;
+
+    // optimize viewer's width for the clipname
     TInt horizontalOffset = 0;
     TInt filenameLength = iController->FileDetails()->iClipName->Des().Length();
 
-    if ( filenameLength <= KMediaDetailsViewerFilenameMedium  )    
+    if ( filenameLength <= KMediaDetailsViewerFilenameMedium )
     {
-        horizontalOffset = 
+        horizontalOffset =
             iController->iContainer->Rect().iBr.iX / KMediaDetailsViewerOffsetDivisorMedium;
-    }        
+    }
     else
     {
-        horizontalOffset = 
+        horizontalOffset =
             iController->iContainer->Rect().iBr.iX / KMediaDetailsViewerOffsetDivisorMax;
     }
-            
-    TInt eachItemHeight = 
-            iController->iContainer->Rect().iBr.iY / KMediaDetailsViewerMaxItems;
-    
-    TInt verticalHalf = iController->iContainer->Rect().iBr.iY / 2;        
-    
+
+    TInt eachItemHeight = iController->iContainer->Rect().iBr.iY / KMediaDetailsViewerMaxItems;
+
+    TInt verticalHalf = iController->iContainer->Rect().iBr.iY / 2;
+
     TInt tLX = (iController->iContainer->Rect().iTl.iX) + horizontalOffset;
-    TInt bRX = (iController->iContainer->Rect().iBr.iX) - horizontalOffset; 
-    
+    TInt bRX = (iController->iContainer->Rect().iBr.iX) - horizontalOffset;
+
     TInt tLY = verticalHalf - ( eachItemHeight * numOfItems/2 );
-    
-    // pad for the margins on top and bottom of viewer      
-    TInt bRY = verticalHalf + ( eachItemHeight * numOfItems/2 ) + (KMediaDetailsViewerItemMargin * 2); 
-    
+
+    // pad for the margins on top and bottom of viewer
+    TInt bRY =
+        verticalHalf + ( eachItemHeight * numOfItems/2 ) + ( KMediaDetailsViewerItemMargin * 2 );
+
     viewerRect = TRect( tLX, tLY, bRX, bRY );
-    
+
     return viewerRect;
 }
 
@@ -895,5 +904,4 @@
 }
 
 
-
 //  End of File
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/conf/ui_videoplaybackcontrolstest.cfg	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/conf/ui_videoplaybackcontrolstest.cfg	Mon Mar 15 12:40:47 2010 +0200
@@ -835,4 +835,26 @@
 pause 2000
 [Endtest]
 
+[Test]
+title [35] Hide aspect ratio
+bringtoforeground
+create ui_videoplaybackcontrolstest ControlsTest
+ControlsTest CreateControls test.3gp EMPXVideoLocal
+pause 100
+ControlsTest AddSameARFileDetails
+pause 100
+ControlsTest SetState EPbStatePlaying
+pause 100
+ControlsTest ShowControls
+pause 3000
+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/inc/mpxvpbc_stub.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/inc/mpxvpbc_stub.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 9 %
+// Version : %version: e003sa33#10 %
 
 
 
@@ -111,6 +111,12 @@
         */
         void AddLongFileDetailsL( TBool aHasVideoTrack = ETrue );
 
+        /**
+        * Add file details 
+        * and make sure aspect ratio equal to screen aspect ratio 
+        */
+        void AddSameARFileDetailsL( TBool aHasVideoTrack = ETrue );
+        
     private:    
         // Data
         TInt                                 iCommand;
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/inc/videoplaybackcontrolstest.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/inc/videoplaybackcontrolstest.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 9 %
+// Version : %version: e003sa33#10 %
 
 
 
@@ -209,6 +209,12 @@
     virtual TInt AddLongFileDetails();
     
     /**
+     * Add same AR file details
+     * @return symbian OS error code.
+     */
+    virtual TInt AddSameARFileDetails();
+    
+    /**
     * Create controller
     */
     void CreateController( const TDesC& aFileName, TInt aMode );
--- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/mpxvpbc_stub.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/mpxvpbc_stub.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 13 %
+// Version : %version: e003sa33#14 %
 
 
 // INCLUDES
@@ -198,7 +198,6 @@
 
     iFileDetails->iAudioEnabled = ETrue;
     iFileDetails->iVideoEnabled = aHasVideoTrack;
-    iFileDetails->iVideoEnabled = aHasVideoTrack;
     iFileDetails->iSeekable = ETrue;
     
     iFileDetails->iTitle    = _L("Test Title").Alloc();
@@ -380,4 +379,33 @@
        aPointerEvent.iType, aPointerEvent.iPosition.iX, aPointerEvent.iPosition.iY );
 }
 
+// -------------------------------------------------------------------------------------------------
+// CMPXVideoPlaybackContainer::AddSameARFileDetailsL()
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPlaybackContainer::AddSameARFileDetailsL( TBool aHasVideoTrack )
+{
+	MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackContainer::AddSameARFileDetailsL() ") );
+
+    iFileDetails->iAudioEnabled = ETrue;
+    iFileDetails->iVideoEnabled = aHasVideoTrack;
+    iFileDetails->iSeekable = ETrue;
+
+    if ( iFileDetails->iVideoEnabled )
+    {        
+        iFileDetails->iVideoHeight = this->Rect().Height();
+        iFileDetails->iVideoWidth = this->Rect().Width();
+        
+        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/videoplaybackcontrolstestblocks.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/src/videoplaybackcontrolstestblocks.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 10 %
+// Version : %version: e003sa33#11 %
 
 
 // [INCLUDE FILES] - do not remove
@@ -71,6 +71,7 @@
         ENTRY( "AddDefaultFileDetails", CVideoPlaybackControlsTest::AddDefaultFileDetails ),
         ENTRY( "AddLongFileDetails", CVideoPlaybackControlsTest::AddLongFileDetails ),
         ENTRY( "AddAudioOnlyFileDetails", CVideoPlaybackControlsTest::AddAudioOnlyFileDetails ),
+        ENTRY( "AddSameARFileDetails", CVideoPlaybackControlsTest::AddSameARFileDetails ),
         ENTRY( "SetDuration", CVideoPlaybackControlsTest::SetDuration ),
         ENTRY( "SoftkeyPressed", CVideoPlaybackControlsTest::SoftkeyPressed ),
         ENTRY( "ShowControls", CVideoPlaybackControlsTest::ShowControls ),
@@ -498,6 +499,19 @@
 }
 
 // -------------------------------------------------------------------------------------------------
+// CVideoPlaybackControlsTest::AddSameARFileDetails
+// -------------------------------------------------------------------------------------------------
+//
+TInt CVideoPlaybackControlsTest::AddSameARFileDetails()
+{
+	MPX_ENTER_EXIT( _L( "CVideoPlaybackControlsTest::AddSameARFileDetails()" ) );
+
+    MPX_TRAPD( result, iContainer->AddSameARFileDetailsL() );
+
+    return result;
+}
+
+// -------------------------------------------------------------------------------------------------
 // CVideoPlaybackControlsTest::ParseType
 // -------------------------------------------------------------------------------------------------
 //
--- a/videoplayback/videoplaybackviews/bwins/mpxvideoplaybackviewsu.def	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/bwins/mpxvideoplaybackviewsu.def	Mon Mar 15 12:40:47 2010 +0200
@@ -1,14 +1,14 @@
 EXPORTS
-	??1CMPXVideoPlaybackUserInputHandler@@UAE@XZ @ 1 NONAME ; CMPXVideoPlaybackUserInputHandler::~CMPXVideoPlaybackUserInputHandler(void)
-	?DoHandleKeyEventL@CMPXVideoPlaybackContainer@@QAEXABUTKeyEvent@@W4TEventCode@@@Z @ 2 NONAME ; void CMPXVideoPlaybackContainer::DoHandleKeyEventL(struct TKeyEvent const &, enum TEventCode)
-	?DoHandlePointerEventL@CMPXVideoPlaybackContainer@@QAEXABUTPointerEvent@@@Z @ 3 NONAME ; void CMPXVideoPlaybackContainer::DoHandlePointerEventL(struct TPointerEvent const &)
-	?HandleCommandL@CMPXVideoPlaybackContainer@@QAEXHH@Z @ 4 NONAME ; void CMPXVideoPlaybackContainer::HandleCommandL(int, int)
-	?NewL@CMPXVideoPdlPlaybackView@@SAPAV1@XZ @ 5 NONAME ; class CMPXVideoPdlPlaybackView * CMPXVideoPdlPlaybackView::NewL(void)
-	?NewL@CMPXVideoPlaybackUserInputHandler@@SAPAV1@PAVCMPXVideoPlaybackContainer@@H@Z @ 6 NONAME ; class CMPXVideoPlaybackUserInputHandler * CMPXVideoPlaybackUserInputHandler::NewL(class CMPXVideoPlaybackContainer *, int)
-	?NewL@CMPXVideoPlaybackView@@SAPAV1@XZ @ 7 NONAME ; class CMPXVideoPlaybackView * CMPXVideoPlaybackView::NewL(void)
-	?NewLC@CMPXVideoPdlPlaybackView@@SAPAV1@XZ @ 8 NONAME ; class CMPXVideoPdlPlaybackView * CMPXVideoPdlPlaybackView::NewLC(void)
-	?NewLC@CMPXVideoPlaybackView@@SAPAV1@XZ @ 9 NONAME ; class CMPXVideoPlaybackView * CMPXVideoPlaybackView::NewLC(void)
-	?ProcessPointerEventL@CMPXVideoPlaybackUserInputHandler@@QAEXPAVCCoeControl@@ABUTPointerEvent@@W4TMPXVideoControlType@@@Z @ 10 NONAME ; void CMPXVideoPlaybackUserInputHandler::ProcessPointerEventL(class CCoeControl *, struct TPointerEvent const &, enum TMPXVideoControlType)
-	?UserInputHandler@CMPXVideoPlaybackContainer@@QAEPAVCMPXVideoPlaybackUserInputHandler@@XZ @ 11 NONAME ; class CMPXVideoPlaybackUserInputHandler * CMPXVideoPlaybackContainer::UserInputHandler(void)
+	?ProcessPointerEventL@CMPXVideoPlaybackUserInputHandler@@QAEXPAVCCoeControl@@ABUTPointerEvent@@W4TMPXVideoControlType@@@Z @ 1 NONAME ; void CMPXVideoPlaybackUserInputHandler::ProcessPointerEventL(class CCoeControl *, struct TPointerEvent const &, enum TMPXVideoControlType)
+	??1CMPXVideoPlaybackUserInputHandler@@UAE@XZ @ 2 NONAME ; CMPXVideoPlaybackUserInputHandler::~CMPXVideoPlaybackUserInputHandler(void)
+	?UserInputHandler@CMPXVideoPlaybackContainer@@QAEPAVCMPXVideoPlaybackUserInputHandler@@XZ @ 3 NONAME ; class CMPXVideoPlaybackUserInputHandler * CMPXVideoPlaybackContainer::UserInputHandler(void)
+	?NewL@CMPXVideoPdlPlaybackView@@SAPAV1@XZ @ 4 NONAME ; class CMPXVideoPdlPlaybackView * CMPXVideoPdlPlaybackView::NewL(void)
+	?DoHandlePointerEventL@CMPXVideoPlaybackContainer@@QAEXABUTPointerEvent@@@Z @ 5 NONAME ; void CMPXVideoPlaybackContainer::DoHandlePointerEventL(struct TPointerEvent const &)
+	?HandleCommandL@CMPXVideoPlaybackContainer@@QAEXHH@Z @ 6 NONAME ; void CMPXVideoPlaybackContainer::HandleCommandL(int, int)
+	?NewL@CMPXVideoPlaybackUserInputHandler@@SAPAV1@PAVCMPXVideoPlaybackContainer@@@Z @ 7 NONAME ; class CMPXVideoPlaybackUserInputHandler * CMPXVideoPlaybackUserInputHandler::NewL(class CMPXVideoPlaybackContainer *)
+	?NewLC@CMPXVideoPlaybackView@@SAPAV1@XZ @ 8 NONAME ; class CMPXVideoPlaybackView * CMPXVideoPlaybackView::NewLC(void)
+	?NewLC@CMPXVideoPdlPlaybackView@@SAPAV1@XZ @ 9 NONAME ; class CMPXVideoPdlPlaybackView * CMPXVideoPdlPlaybackView::NewLC(void)
+	?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)
 
--- a/videoplayback/videoplaybackviews/group/mpxvideoplaybackviews.mmp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/group/mpxvideoplaybackviews.mmp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 14 %
+// Version : %version: ou1cpsw#15 %
 
 
 #include <data_caging_paths.hrh>
@@ -82,8 +82,7 @@
 LIBRARY             mpfiledetailsdialog.lib
 LIBRARY             sysutil.lib 
 LIBRARY             drmuihandling.lib
-LIBRARY             centralrepository.lib // for backlight timeout value
-LIBRARY             hwrmlightclient.lib   // light status
+
 
 #ifdef SYMBIAN_BUILD_GCE
 LIBRARY             mediaclientvideodisplay.lib
--- a/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 63 %
+
+// Version : %version: 66 %
 
 
 //  Include Files
@@ -229,13 +230,7 @@
             //
             //  The display window must be removed before closing the playback plugin
             //
-            if ( iDisplayHandler )
-            {
-                //
-                //  Remove the display window so the surface can be released
-                //
-                iDisplayHandler->RemoveDisplayWindow();
-            }
+            RemoveBackgroundSurfaceL();
 
             CreateGeneralPlaybackCommandL( EPbCmdClose );
             break;
@@ -337,7 +332,7 @@
         {
             if ( AknLayoutUtils::PenEnabled() )
             {
-                iContainer->HandleEventL(EMPXControlCmdShowFileDetailsViewer);
+                iContainer->HandleEventL( EMPXControlCmdShowFileDetailsViewer );
             }
             else
             {
@@ -370,6 +365,11 @@
             iPdlReloading = ETrue;
             break;
         }
+        case EMPXPbvCmdRealOneBitmapTimeout:
+        {
+            HandleRealOneBitmapTimeoutL();
+            break;
+        }
     }
 }
 
@@ -433,11 +433,6 @@
     iViewUtility->AddObserverL( this );
 
     //
-    //  Create Video Playback Display Handler
-    //
-    iDisplayHandler = CMPXVideoPlaybackDisplayHandler::NewL( iPlaybackUtility );
-
-    //
     //  Disable tool bar in playback view
     //
     AppUi()->CurrentFixedToolbar()->SetToolbarVisibility( EFalse );
@@ -451,10 +446,29 @@
         AppUi()->AddToStackL( *this, iContainer );
 
         iContainer->GetWindow().SetVisible( ETrue );
+
+        //
+        //  Create Video Playback Display Handler
+        //
+        iDisplayHandler = CMPXVideoPlaybackDisplayHandler::NewL( iPlaybackUtility, iContainer );
+
+        //
+        //  Delay the adding of the display window while the Real One Bitmap is being shown
+        //
+        if ( ! iContainer->IsRealOneBitmapTimerActive() )
+        {
+            //
+            //  Setup the display window
+            //
+            iDisplayHandler->CreateDisplayWindowL( *(CCoeEnv::Static()->ScreenDevice()),
+                                                   iContainer->GetWindow() );
+        }
     }
 
-    // Deactivate the CBA set the LSK&RSK to empty
-    Cba()->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY);
+    //
+    //  Deactivate the CBA set the LSK & RSK to empty
+    //
+    Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_EMPTY );
 
     //
     //  Determine if the playback is from a playlist on view activation
@@ -543,11 +557,11 @@
     if ( aForeground )
     {
         videoCmd = EPbCmdHandleForeground;
-        iContainer->HandleEventL(EMPXControlCmdHandleForegroundEvent);
+        iContainer->HandleEventL( EMPXControlCmdHandleForegroundEvent );
     }
     else
     {
-        iContainer->HandleEventL(EMPXControlCmdHandleBackgroundEvent);
+        iContainer->HandleEventL( EMPXControlCmdHandleBackgroundEvent );
     }
 
     //
@@ -759,26 +773,7 @@
     }
     else if ( KMPXMediaIdVideoDisplaySyncMessage == id )
     {
-        if ( iDisplayHandler )
-        {
-            TMPXVideoDisplayCommand cmdId = iDisplayHandler->HandleVideoDisplayMessageL( aMessage );
-
-            if ( cmdId == EPbMsgVideoSurfaceCreated )
-            {
-                //
-                //  Notify container that surface has been created to make window transparent
-                //
-                if ( iContainer )
-                {
-                    iContainer->HandleCommandL( EMPXPbvSurfaceCreated );
-                }
-            }
-        }
-
-        //
-        //  Signal Sync Message handling is complete
-        //
-        iPlaybackUtility->CommandL( EPbCmdSyncMsgComplete );
+        iDisplayHandler->HandleVideoDisplaySyncMessageL( aMessage );
     }
 }
 
@@ -792,9 +787,8 @@
     TInt type( *aMessage->Value<TInt>( KMPXMessageGeneralType ) );
     TInt data( *aMessage->Value<TInt>( KMPXMessageGeneralData ) );
 
-    MPX_DEBUG(
-      _L("CMPXVideoBasePlaybackView::HandleGeneralPlaybackMessageL() event = %d type = %d  value = %d"),
-      event, type, data );
+    MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::HandleGeneralPlaybackMessageL()"),
+                   _L("event = %d type = %d  value = %d"), event, type, data );
 
     switch ( event )
     {
@@ -806,8 +800,7 @@
         }
         case TMPXPlaybackMessage::EPropertyChanged:
         {
-            TMPXPlaybackProperty property(
-                 static_cast<TMPXPlaybackProperty>( type ) );
+            TMPXPlaybackProperty property( static_cast<TMPXPlaybackProperty>( type ) );
 
             HandlePropertyL( property, data, KErrNone );
             break;
@@ -827,19 +820,11 @@
 
             break;
         }
-        case TMPXPlaybackMessage::ECommandReceived:
-        {
-            break;
-        }
         case TMPXPlaybackMessage::EReachedEndOfPlaylist:
         {
             HandleCommandL( EAknSoftkeyBack );
             break;
         }
-        case TMPXPlaybackMessage::ESongChanged:
-        {
-            break;
-        }
     }
 }
 
@@ -897,13 +882,7 @@
 
     if ( IsMultiItemPlaylist() )
     {
-        if ( iDisplayHandler )
-        {
-            //
-            //  Remove the display window so the surface can be released
-            //
-            iDisplayHandler->RemoveDisplayWindow();
-        }
+        RemoveBackgroundSurfaceL();
 
         iPlaybackUtility->CommandL( EPbCmdNext );
     }
@@ -1006,10 +985,10 @@
             case EPbStateInitialising:
             {
                 //
-                //  Get playlist information
-                //  Source if available once the plugin is initializing
+                //  For multi item playlists, reset the container and controls for next
+                //  item in playlist
                 //
-                if ( iContainer )
+                if ( IsMultiItemPlaylist() && iContainer )
                 {
                     //
                     //  If transitioning from Not Initialized to Initialising there is
@@ -1019,8 +998,23 @@
                     if ( oldState != EPbStateNotInitialised )
                     {
                         iMediaRequested = EFalse;
+
                         iContainer->HandleCommandL( EMPXPbvCmdResetControls );
 
+                        //
+                        //  Delay the adding of the display window while the Real One Bitmap
+                        //  is being shown
+                        //
+                        if ( ! iContainer->IsRealOneBitmapTimerActive() && iDisplayHandler )
+                        {
+                            //
+                            //  Setup the display window since it was destroyed to free the surface
+                            //
+                            iDisplayHandler->CreateDisplayWindowL(
+                                                 *(CCoeEnv::Static()->ScreenDevice()),
+                                                 iContainer->GetWindow() );
+                        }
+
                         if ( iFileDetails )
                         {
                             if ( iFileDetailsDialog )
@@ -1094,7 +1088,7 @@
                     _L("aError = %d"), aError );
 
     iContainer->HandleCommandL( EMPXPbvCmdResetControls );
-    HandlePluginErrorL(aError);
+    HandlePluginErrorL( aError );
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -1308,16 +1302,20 @@
             TInt newAspectRatio = iDisplayHandler->SetDefaultAspectRatioL( iFileDetails,
                                                                            displayAspectRatio );
 
-            //
-            //  Setup the display window and issue play command
-            //
-            iDisplayHandler->CreateDisplayWindowL( *(CCoeEnv::Static()->ScreenDevice()),
-                                                   iContainer->GetWindow() );
-
             iContainer->HandleEventL( EMPXControlCmdSetAspectRatio, newAspectRatio );
         }
 
-        CreateGeneralPlaybackCommandL( EPbCmdPlay );
+        //
+        //  Delay the play command while the Real One Bitmap is being shown
+        //
+        if ( iContainer->IsRealOneBitmapTimerActive() )
+        {
+            iRealOneDelayedPlay = ETrue;
+        }
+        else
+        {
+            CreateGeneralPlaybackCommandL( EPbCmdPlay );
+        }
     }
 }
 
@@ -1530,9 +1528,7 @@
     //  set attributes on the command
     //
     aCmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue );
-
     aCmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId, KMPXMediaIdVideoPlayback );
-
     aCmd->SetTObjectValueL<TMPXVideoPlaybackCommand>( KMPXMediaVideoPlaybackCommand,
                                                       EPbCmdInitView );
 
@@ -1712,7 +1708,6 @@
             //  This prevents black boxes on the view switching
             //
             iContainer->HandleEventL( EMPXControlCmdHideControls );
-            iContainer->GetWindow().SetVisible( EFalse );
         }
         else
         {
@@ -1804,30 +1799,43 @@
     CMPFileDetails* fileDetailsDialogParams = new (ELeave) CMPFileDetails();
     CleanupStack::PushL( fileDetailsDialogParams );
 
-    if ( iFileDetails->iClipName )
+    HBufC* fileName = iFileDetails->GenerateFileNameL();
+
+    if ( fileName && fileName->Length() )
     {
-        fileDetailsDialogParams->iFileName = iFileDetails->iClipName->AllocL();
+        fileDetailsDialogParams->iFileName = fileName;
     }
 
-    if ( iFileDetails->iTitle )
+    if ( iFileDetails->iTitle && iFileDetails->iTitle->Length() )
     {
         fileDetailsDialogParams->iTitle = iFileDetails->iTitle->AllocL();
     }
 
-    if ( iFileDetails->iArtist )
+    if ( iFileDetails->iArtist && iFileDetails->iArtist->Length() )
     {
         fileDetailsDialogParams->iArtist = iFileDetails->iArtist->AllocL();
     }
 
-    if ( iFileDetails->iMimeType )
+    if ( iFileDetails->iMimeType && iFileDetails->iMimeType->Length() )
     {
         fileDetailsDialogParams->iFormat = iFileDetails->iMimeType->AllocL();
     }
 
-    fileDetailsDialogParams->iResolutionHeight = iFileDetails->iVideoHeight;
-    fileDetailsDialogParams->iResolutionWidth = iFileDetails->iVideoWidth;
-    fileDetailsDialogParams->iDurationInSeconds = iFileDetails->iDuration / KPbMilliMultiplier;
-    fileDetailsDialogParams->iBitrate = iFileDetails->iBitRate;
+    if ( iFileDetails->iVideoHeight && iFileDetails->iVideoWidth )
+    {
+        fileDetailsDialogParams->iResolutionHeight = iFileDetails->iVideoHeight;
+        fileDetailsDialogParams->iResolutionWidth = iFileDetails->iVideoWidth;
+    }
+
+    if ( iFileDetails->iDuration > 0 )
+    {
+        fileDetailsDialogParams->iDurationInSeconds = iFileDetails->iDuration / KPbMilliMultiplier;
+    }
+
+    if (iFileDetails->iBitRate > 0 )
+    {
+        fileDetailsDialogParams->iBitrate = iFileDetails->iBitRate;
+    }
 
     if ( iFileDetails->iDrmProtected )
     {
@@ -2167,4 +2175,57 @@
 
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoBasePlaybackView::RemoveBackgroundSurfaceL()
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoBasePlaybackView::RemoveBackgroundSurfaceL()
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::RemoveBackgroundSurfaceL()"));
+
+    if ( iDisplayHandler )
+    {
+        //
+        //  Remove the display window so the surface can be released
+        //
+        iDisplayHandler->RemoveDisplayWindow();
+    }
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoBasePlaybackView::HandleRealOneBitmapTimeoutL()
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoBasePlaybackView::HandleRealOneBitmapTimeoutL()
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::HandleRealOneBitmapTimeoutL()"));
+
+    //
+    //  Check if this clip has video
+    //  If video exists, setup the display window
+    //  If the video is not enabled, redraw container to remove Real One Bitmap
+    //
+    if ( iFileDetails && iFileDetails->iVideoEnabled )
+    {
+        if ( iDisplayHandler )
+        {
+            //
+            //  Setup the display window
+            //
+            iDisplayHandler->CreateDisplayWindowL( *(CCoeEnv::Static()->ScreenDevice()),
+                                                   iContainer->GetWindow() );
+        }
+    }
+    else
+    {
+        iContainer->DrawNow();
+    }
+
+    if ( iRealOneDelayedPlay )
+    {
+        CreateGeneralPlaybackCommandL( EPbCmdPlay );
+        iRealOneDelayedPlay = EFalse;
+    }
+}
+
 // EOF
--- a/videoplayback/videoplaybackviews/src/mpxvideopdlplaybackview.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/src/mpxvideopdlplaybackview.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 22 %
+
+// Version : %version: 23 %
 
 
 //  Include Files
@@ -116,7 +117,8 @@
 //
 void CMPXVideoPdlPlaybackView::CloseEmbeddedPlaybackViewL()
 {
-    MPX_ENTER_EXIT(_L("CMPXVideoPdlPlaybackView::CloseEmbeddedPlaybackViewL()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPdlPlaybackView::CloseEmbeddedPlaybackViewL()"),
+                   _L("iPlaybackState = %d"), iPlaybackState );
 
     //
     //  If playback state is playing, pause playback
@@ -128,11 +130,7 @@
     }
     else if ( iPlaybackState == EPbStateStopped )
     {
-        //
-        //  Close the playback plugin and clear out the PDL data from the PDL Handler
-        //
-        HandleCommandL( EMPXPbvCmdClose );
-        AppUi()->HandleCommandL( EAknCmdHideInBackground );
+        ActivateClosePlayerActiveObject();
     }
 
     //
@@ -239,7 +237,7 @@
             //  could not be played until the entire file is downloaded.
             //
             DisplayErrorMessageL( R_MPX_VIDEO_PDL_WAIT_DL_COMPLETE_MSG );
-            ClosePlaybackViewL();
+            ClosePlaybackViewWithErrorL();
 
             break;
         }
@@ -250,7 +248,7 @@
             //  has timed out waiting for more data to be downloaded
             //
             DisplayErrorMessageL( R_MPX_VIDEO_PDL_ALL_CONTENT_PLAYED_MSG );
-            ClosePlaybackViewL();
+            ClosePlaybackViewWithErrorL();
 
             break;
         }
@@ -276,7 +274,7 @@
                 DisplayErrorMessageL( R_MPX_VIDEO_INVALID_CLIP );
             }
 
-            ClosePlaybackViewL();
+            ClosePlaybackViewWithErrorL();
 
             break;
         }
@@ -305,7 +303,7 @@
         case EPbDlStateDownloadCanceled:
         {
             HandleCommandL( EMPXPbvCmdStop );
-            ClosePlaybackViewL();
+            ClosePlaybackViewWithErrorL();
             break;
         }
         case EPbDlStateDownloading:
@@ -422,4 +420,20 @@
     CleanupStack::PopAndDestroy( cmd );
 }
 
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPdlPlaybackView::ClosePlaybackViewWithErrorL()
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPdlPlaybackView::ClosePlaybackViewWithErrorL()
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPdlPlaybackView::ClosePlaybackViewWithErrorL"));
+
+    //
+    //  An error has been processed, set the playback state to Stopped and close the view
+    //
+    iPlaybackState = EPbStateStopped;
+
+    ClosePlaybackViewL();
+}
+
 // EOF
--- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,8 +15,8 @@
 *
 */
 
-// Version : %version: 22 %
 
+// Version : %version: 25 %
 
 
 // INCLUDE FILES
@@ -48,7 +48,10 @@
 
 using namespace AknLayoutScalable_Apps;
 
-// CONSTANTS
+//
+//  CONSTANTS
+//
+const TInt KMPXRealOneLogoTimeOut = 600000;
 
 // ======== MEMBER FUNCTIONS =======================================================================
 
@@ -96,7 +99,7 @@
     CreateControlsL();
 
     iUserInputHandler =
-        CMPXVideoPlaybackUserInputHandler::NewL( this, iFileDetails->iTvOutConnected );
+        CMPXVideoPlaybackUserInputHandler::NewL( this );
 
     ActivateL();
 }
@@ -107,6 +110,13 @@
 //
 CMPXVideoPlaybackContainer::~CMPXVideoPlaybackContainer()
 {
+    if ( iRealOneBitmapTimer )
+    {
+        iRealOneBitmapTimer->Cancel();
+        delete iRealOneBitmapTimer;
+        iRealOneBitmapTimer = NULL;
+    }
+
     if ( iFileDetails )
     {
         delete iFileDetails;
@@ -134,15 +144,30 @@
 //
 void CMPXVideoPlaybackContainer::AddFileDetailsL( CMPXVideoPlaybackViewFileDetails* aDetails )
 {
-    iControlsController->AddFileDetailsL( aDetails );
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackContainer::AddFileDetailsL()"));
 
     //
-    //  Delete the temp file details since plugin initialization is complete
+    //  If clip is audio only Real Media, delay adding the file details until the
+    //  Real One bitmap has been shown.
     //
-    if ( iFileDetails )
+    if ( iRealOneBitmapTimer && iRealOneBitmapTimer->IsActive() && ! aDetails->iVideoEnabled )
+    {
+        MPX_DEBUG(_L("CMPXVideoPlaybackContainer::AddFileDetailsL() file details delayed"));
+
+        iDelayedFileDetails = aDetails;
+    }
+    else
     {
-        delete iFileDetails;
-        iFileDetails = NULL;
+        iControlsController->AddFileDetailsL( aDetails );
+
+        //
+        //  Delete the temp file details since plugin initialization is complete
+        //
+        if ( iFileDetails )
+        {
+            delete iFileDetails;
+            iFileDetails = NULL;
+        }
     }
 }
 
@@ -230,7 +255,7 @@
             if ( aType == EEventKeyUp )
             {
                 iControlsController->HandleEventL( EMPXControlCmdSoftKeyPressed,
-                		                           aKeyEvent.iScanCode );
+                                                   aKeyEvent.iScanCode );
             }
 
             iKeyResponse = EKeyWasConsumed;
@@ -243,8 +268,8 @@
 // Handles rocker's middle key =>  Toggles between play & pause
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackContainer::HandleRockerMiddleKeyL(const TKeyEvent& aKeyEvent,
-                                                       TEventCode aType)
+void CMPXVideoPlaybackContainer::HandleRockerMiddleKeyL( const TKeyEvent& aKeyEvent,
+                                                         TEventCode aType )
 {
     if ( aKeyEvent.iCode == EKeyNull && aType == EEventKeyDown  )
     {
@@ -256,15 +281,15 @@
 // Starts/Stops Seeking Forward
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackContainer::HandleSeekFwdL(TEventCode aType)
+void CMPXVideoPlaybackContainer::HandleSeekFwdL( TEventCode aType )
 {
-    if (aType == EEventKeyDown)
+    if ( aType == EEventKeyDown )
     {
-        iView->HandleCommandL(EMPXPbvCmdSeekForward);
+        iView->HandleCommandL( EMPXPbvCmdSeekForward );
     }
-    else if (aType == EEventKeyUp)
+    else if ( aType == EEventKeyUp )
     {
-        iView->HandleCommandL(EMPXPbvCmdEndSeek);
+        iView->HandleCommandL( EMPXPbvCmdEndSeek );
     }
 }
 
@@ -272,15 +297,15 @@
 // Starts/Stops Seeking Backward
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackContainer::HandleSeekBackL(TEventCode aType)
+void CMPXVideoPlaybackContainer::HandleSeekBackL( TEventCode aType )
 {
-    if (aType == EEventKeyDown)
+    if ( aType == EEventKeyDown )
     {
         iView->HandleCommandL(EMPXPbvCmdSeekBackward);
     }
-    else if (aType == EEventKeyUp)
+    else if ( aType == EEventKeyUp )
     {
-        iView->HandleCommandL(EMPXPbvCmdEndSeek);
+        iView->HandleCommandL( EMPXPbvCmdEndSeek );
     }
 }
 
@@ -301,7 +326,6 @@
 //
 void CMPXVideoPlaybackContainer::GetHelpContext( TCoeHelpContext& /*aContext*/ ) const
 {
-    //aContext.iMajor = KAppUidMusicPlayerX;
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -311,14 +335,14 @@
 //
 TInt CMPXVideoPlaybackContainer::CountComponentControls() const
 {
-	TInt count = 0;
+    TInt count = 0;
 
-	if ( iRealOneBitmap )
-	{
+    if ( iRealOneBitmap )
+    {
         count = 1;
-	}
+    }
 
-	return count;
+    return count;
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -350,7 +374,7 @@
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackContainer::HandlePointerEventL()"));
 
-    iUserInputHandler->ProcessPointerEventL(this, aPointerEvent, EMpxVideoPlaybackContainer);
+    iUserInputHandler->ProcessPointerEventL( this, aPointerEvent, EMpxVideoPlaybackContainer );
 }
 
 
@@ -380,7 +404,7 @@
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackContainer::Draw()"));
 
     CWindowGc& gc = SystemGc();
-    
+
     gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
 
     //
@@ -431,14 +455,12 @@
     }
     else if ( aEvent == EMPXControlCmdTvOutConnected )
     {
-    	iTvOutConnected = ETrue;
-        iUserInputHandler->HandleTVOutEvent(ETrue);
+        iTvOutConnected = ETrue;
         DrawNow();
     }
     else if ( aEvent == EMPXControlCmdTvOutDisconnected )
     {
-    	iTvOutConnected = EFalse;
-        iUserInputHandler->HandleTVOutEvent(EFalse);
+        iTvOutConnected = EFalse;
         DrawNow();
     }
 
@@ -473,8 +495,6 @@
             //
             iView->RetrievePdlInformationL();
 
-            iControlsController->HandleEventL( EMPXControlCmdCloseFileDetailsViewer );
-
             break;
         }
         case EAknSoftkeyOptions:
@@ -489,9 +509,16 @@
         }
         case EMPXPbvSurfaceCreated:
         {
-        	iSurfaceCreated = ETrue;
-			iControlsController->HandleEventL( EMPXControlCmdSurfaceCreated );
-        	DrawNow();
+            iSurfaceCreated = ETrue;
+            iControlsController->HandleEventL( EMPXControlCmdSurfaceCreated );
+            DrawNow();
+            break;
+        }
+        case EMPXPbvSurfaceRemoved:
+        {
+            iSurfaceCreated = EFalse;
+            iControlsController->HandleEventL( EMPXControlCmdSurfaceRemoved );
+            DrawNow();
             break;
         }
         default:
@@ -556,6 +583,22 @@
     //  Retrieve the Real One Logo bitmap
     //
     iRealOneBitmap = iControlsController->GetBitmap( EMPXRealLogoBitmap );
+
+    if ( iRealOneBitmap )
+    {
+        //
+        //  Start timer since Real One bitmap is created
+        //
+        iRealOneBitmapTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+
+        iRealOneBitmapTimer->Start(
+            KMPXRealOneLogoTimeOut,
+            0,
+            TCallBack( CMPXVideoPlaybackContainer::HandleRealOneBitmapTimeout, this ) );
+
+        DrawNow();
+    }
+
     iTvOutConnected = iFileDetails->iTvOutConnected;
 }
 
@@ -566,8 +609,71 @@
 EXPORT_C CMPXVideoPlaybackUserInputHandler* CMPXVideoPlaybackContainer::UserInputHandler()
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackContainer::UserInputHandler()"));
-
     return iUserInputHandler;
 }
 
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackContainer::IsRealOneBitmapTimerActive()
+// -------------------------------------------------------------------------------------------------
+//
+TBool CMPXVideoPlaybackContainer::IsRealOneBitmapTimerActive()
+{
+    TBool timerActive( EFalse );
+
+    if ( iRealOneBitmapTimer )
+    {
+        timerActive = iRealOneBitmapTimer->IsActive();
+    }
+
+    MPX_DEBUG(_L("CMPXVideoPlaybackContainer::IsRealOneBitmapTimerActive(%d)"), timerActive);
+
+    return timerActive;
+}
+
+
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackContainer::HandleRealOneBitmapTimeout
+// -------------------------------------------------------------------------------------------------
+//
+TInt CMPXVideoPlaybackContainer::HandleRealOneBitmapTimeout( TAny* aPtr )
+{
+    MPX_DEBUG(_L("CMPXVideoPlaybackContainer::HandleRealOneBitmapTimeout()"));
+    static_cast<CMPXVideoPlaybackContainer*>(aPtr)->DoHandleRealOneBitmapTimeout();
+    return KErrNone;
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CMPXVideoPlaybackContainer::DoHandleRealOneBitmapTimeout
+// -------------------------------------------------------------------------------------------------
+//
+void CMPXVideoPlaybackContainer::DoHandleRealOneBitmapTimeout()
+{
+    MPX_DEBUG(_L("CMPXVideoPlaybackContainer::DoHandleRealOneBitmapTimeout()"));
+
+    if ( iDelayedFileDetails )
+    {
+        iControlsController->AddFileDetailsL( iDelayedFileDetails );
+
+        //
+        //  Delete the temp file details since plugin initialization is complete
+        //
+        if ( iFileDetails )
+        {
+            delete iFileDetails;
+            iFileDetails = NULL;
+        }
+
+        iDelayedFileDetails = NULL;
+    }
+
+    if ( iRealOneBitmapTimer->IsActive() )
+    {
+        iRealOneBitmapTimer->Cancel();
+        delete iRealOneBitmapTimer;
+        iRealOneBitmapTimer = NULL;
+    }
+
+    iView->HandleCommandL( EMPXPbvCmdRealOneBitmapTimeout );
+}
+
 // EOF
--- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackdisplayhandler.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackdisplayhandler.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,9 @@
 *
 */
 
-// Version : %version: 10 %
+
+// Version : %version: 11 %
+
 
 #include <sysutil.h>
 #include <s32file.h>
@@ -26,14 +28,19 @@
 #include "mpxvideoplaybackdisplayhandler.h"
 #include "mpxvideoregion.h"
 #include "mpxvideoplaybackviewfiledetails.h"
+#include "mpxvideoplaybackcontainer.h"
+#include "mpxcommonvideoplaybackview.hrh"
 #include <mpxvideoplaybackdefs.h>
 
 
 _LIT( KAspectRatioFile, "c:\\private\\200159b2\\mpxvideoplayer_aspect_ratio.dat" );
 
 
-CMPXVideoPlaybackDisplayHandler::CMPXVideoPlaybackDisplayHandler( MMPXPlaybackUtility* aPlayUtil )
+CMPXVideoPlaybackDisplayHandler::CMPXVideoPlaybackDisplayHandler(
+                                     MMPXPlaybackUtility* aPlayUtil,
+                                     CMPXVideoPlaybackContainer* aContainer)
     : iPlaybackUtility( aPlayUtil )
+    , iContainer( aContainer )
 #ifdef SYMBIAN_BUILD_GCE
     , iScaleWidth( 100.0f )
     , iScaleHeight( 100.0f )
@@ -65,12 +72,13 @@
 }
 
 CMPXVideoPlaybackDisplayHandler*
-CMPXVideoPlaybackDisplayHandler::NewL( MMPXPlaybackUtility* aPlayUtil )
+CMPXVideoPlaybackDisplayHandler::NewL( MMPXPlaybackUtility* aPlayUtil,
+                                       CMPXVideoPlaybackContainer* aContainer )
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::NewL()"));
 
     CMPXVideoPlaybackDisplayHandler* self =
-        new(ELeave) CMPXVideoPlaybackDisplayHandler( aPlayUtil );
+        new(ELeave) CMPXVideoPlaybackDisplayHandler( aPlayUtil, aContainer );
 
     CleanupStack::PushL( self );
     self->ConstructL();
@@ -91,9 +99,8 @@
 //   CMPXVideoPlaybackDisplayHandler::CreateDisplayWindowL()
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackDisplayHandler::CreateDisplayWindowL(
-                                          CWsScreenDevice& aScreenDevice,
-                                          RWindow& aWin )
+void CMPXVideoPlaybackDisplayHandler::CreateDisplayWindowL( CWsScreenDevice& aScreenDevice,
+                                                            RWindow& aWin )
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::CreateDisplayWindowL()"));
 
@@ -114,6 +121,7 @@
     CleanupStack::PushL( cmd );
 
     cmd->SetTObjectValueL<TBool>( KMPXCommandGeneralDoSync, ETrue );
+    cmd->SetTObjectValueL<TBool>( KMPXCommandPlaybackGeneralNoBuffer, ETrue );
     cmd->SetTObjectValueL<TInt>( KMPXCommandGeneralId, KMPXMediaIdVideoPlayback );
     cmd->SetTObjectValueL<TMPXVideoPlaybackCommand>( KMPXMediaVideoPlaybackCommand,
                                                      EPbCmdSurfaceRemoved );
@@ -127,13 +135,22 @@
 //   CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow()
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow()
+void CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow( TBool aSignalPlaybackPlugin )
 {
-    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow()"),
+                   _L("aSignalPlaybackPlugin = %d"), aSignalPlaybackPlugin );
 
 #ifdef SYMBIAN_BUILD_GCE
     if ( iVideoDisplay )
     {
+        //
+        //  Surface is being removed, signal the container so it can reset the background
+        //
+        if ( iContainer )
+        {
+            iContainer->HandleCommandL( EMPXPbvSurfaceRemoved );
+        }
+
         delete iVideoDisplay;
         iVideoDisplay = NULL;
     }
@@ -141,29 +158,32 @@
 
     if ( ! iSurfaceId.IsNull() )
     {
-        //
-        //  Signal to the Playback Plugin that the surface has been removed
-        //
-        TRAP_IGNORE( SignalSurfaceRemovedL() );
+        if ( aSignalPlaybackPlugin )
+        {
+            //
+            //  Signal to the Playback Plugin that the surface has been removed
+            //
+            TRAP_IGNORE( SignalSurfaceRemovedL() );
+        }
 
         iSurfaceId = TSurfaceId::CreateNullId();
     }
 }
 
 // -------------------------------------------------------------------------------------------------
-//   CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL()
+//   CMPXVideoPlaybackDisplayHandler::HandleVideoDisplaySyncMessageL()
 // -------------------------------------------------------------------------------------------------
 //
-TMPXVideoDisplayCommand
-CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL( CMPXMessage* aMessage )
+void
+CMPXVideoPlaybackDisplayHandler::HandleVideoDisplaySyncMessageL( CMPXMessage* aMessage )
 {
-    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessage()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::HandleVideoDisplaySyncMessageL()"));
 
     TMPXVideoDisplayCommand message =
         ( *(aMessage->Value<TMPXVideoDisplayCommand>(KMPXMediaVideoDisplayCommand)) );
 
     MPX_DEBUG(
-      _L("CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL() message = %d"), message );
+      _L("CMPXVideoPlaybackDisplayHandler::HandleVideoDisplaySyncMessageL() message = %d"), message );
 
     switch ( message )
     {
@@ -185,23 +205,18 @@
         }
         case EPbMsgVideoRemoveDisplayWindow:
         {
-            if ( iVideoDisplay )
-            {
-                delete iVideoDisplay;
-                iVideoDisplay = NULL;
-            }
-
-            iSurfaceId = TSurfaceId::CreateNullId();
-
+            RemoveDisplayWindow( EFalse );
             break;
         }
 #endif
     }
 
-    return message;
+    //
+    //  Signal Sync Message handling is complete
+    //
+    iPlaybackUtility->CommandL( EPbCmdSyncMsgComplete );
 }
 
-
 // -------------------------------------------------------------------------------------------------
 //   CMPXVideoPlaybackDisplayHandler::SetAspectRatioL()
 // -------------------------------------------------------------------------------------------------
@@ -229,7 +244,6 @@
     return aspectRatio;
 }
 
-
 // -------------------------------------------------------------------------------------------------
 //   CMPXVideoPlaybackDisplayHandler::SetDefaultAspectRatioL
 // -------------------------------------------------------------------------------------------------
@@ -363,7 +377,6 @@
     CleanupStack::PopAndDestroy();
 }
 
-
 // -------------------------------------------------------------------------------------------------
 //   CMPXVideoPlaybackDisplayHandler::LoadAspectRatioL
 // -------------------------------------------------------------------------------------------------
@@ -427,7 +440,8 @@
 
     TRect cropRect = TRect( aWin->Size() );
 
-    MPX_DEBUG(_L("CMPXVideoPlaybackDisplayHandler::AddDisplayWindowL() cropRect (%d, %d), (%d, %d)"),
+    MPX_DEBUG(
+        _L("CMPXVideoPlaybackDisplayHandler::AddDisplayWindowL() cropRect (%d, %d), (%d, %d)"),
         cropRect.iTl.iX, cropRect.iTl.iY, cropRect.iBr.iX, cropRect.iBr.iY);
 
     MPX_TRAPD( dispError,
@@ -453,6 +467,11 @@
     {
         iVideoDisplay->SurfaceCreated( iSurfaceId, iCropRect, iAspectRatio, iCropRect );
 
+        if ( iContainer )
+        {
+            iContainer->HandleCommandL( EMPXPbvSurfaceCreated );
+        }
+
         iSurfaceCached = EFalse;
     }
 }
@@ -488,6 +507,11 @@
         //  Add new surface
         //
         iVideoDisplay->SurfaceCreated( iSurfaceId, iCropRect, iAspectRatio, iCropRect );
+
+        if ( iContainer )
+        {
+            iContainer->HandleCommandL( EMPXPbvSurfaceCreated );
+        }
     }
     else
     {
@@ -535,6 +559,11 @@
 
     if ( iVideoDisplay )
     {
+        if ( iContainer )
+        {
+            iContainer->HandleCommandL( EMPXPbvSurfaceRemoved );
+        }
+
         iVideoDisplay->RemoveSurface();
     }
 
--- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackuserinputhandler.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackuserinputhandler.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 15 %
+// Version : %version: ou1cpsw#16 %
 
 
 // INCLUDE FILES
@@ -31,9 +31,7 @@
 #include <remconcoreapitarget.h>
 #include <remconinterfaceselector.h> // Side volume key
 #include <mpxplaybackframeworkdefs.h>
-#include <centralrepository.h>  // for peripheral display timeout setting
-#include <settingsinternalcrkeys.h> // display timeout setting keys
-#include <hwrmlightdomaincrkeys.h>
+
 #include <e32std.h>
 
 #ifdef __USERINPUTHANDLERSTIF__
@@ -43,7 +41,6 @@
 #else
 #include "mpxvideoplaybackcontainer.h"
 #include "mpxvideoplaybackcontrol.h"
-#include <hwrmlight.h> //light status
 #endif
 
 #include "mpxvideoplaybackcontrol.hrh"
@@ -54,8 +51,6 @@
 #include "mpxvideo_debug.h"
 
 
-// CONSTANTS
-const TInt KMPXMicroSecondsInASecond = 1000000;
 
 
 // ======== MEMBER FUNCTIONS =======================================================================
@@ -75,14 +70,14 @@
 // -------------------------------------------------------------------------------------------------
 //
 CMPXVideoPlaybackUserInputHandler* CMPXVideoPlaybackUserInputHandler::NewL(
-        CMPXVideoPlaybackContainer* aContainer, TBool aTvOutConnected)
+        CMPXVideoPlaybackContainer* aContainer )
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackUserInputHandler::NewL()"));
 
     CMPXVideoPlaybackUserInputHandler* self =
         new (ELeave) CMPXVideoPlaybackUserInputHandler( aContainer );
     CleanupStack::PushL( self );
-    self->ConstructL(aTvOutConnected);
+    self->ConstructL();
     CleanupStack::Pop();
     return self;
 }
@@ -92,37 +87,15 @@
 // Symbian 2nd phase constructor can leave.
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackUserInputHandler::ConstructL( TBool aTvOutConnected )
+void CMPXVideoPlaybackUserInputHandler::ConstructL()
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::ConstructL()"));
 
     iVolumeRepeatTimer = CPeriodic::NewL( CActive::EPriorityStandard );
-    iDisplayTimer = CPeriodic::NewL( CPeriodic::EPriorityStandard );
+
     iInterfaceSelector = CRemConInterfaceSelector::NewL();
     iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector, *this );
 
-    iTVOutConnected = aTvOutConnected;
-
-    iLight = CHWRMLight::NewL();
-
-    // Start the timer if TV out is connected
-    if ( iTVOutConnected )
-    {
-        // Get the display light time-out value from CenRep
-        CRepository* repository = CRepository::NewLC( KCRUidLightSettings  );
-
-        // What's the timeout value (in seconds ) for the display light?
-        repository->Get( KDisplayLightsTimeout, iDisplayTimeOut );
-        MPX_DEBUG(_L("CMPXVideoPlaybackUserInputHandler::ConstructL Display Timeout( %d )"), iDisplayTimeOut);
-
-        CleanupStack::PopAndDestroy( repository );
-
-        // Convert the timeout value to microseconds
-        iDisplayTimeOut *= KMPXMicroSecondsInASecond;
-
-        RestartDisplayTimer();
-    }
-
     // not detrimental if Media Keys dont work - so ignore any errors here
     TRAP_IGNORE( iInterfaceSelector->OpenTargetL() );
 
@@ -142,11 +115,6 @@
         delete iVolumeRepeatTimer;
     }
 
-    if ( iDisplayTimer )
-    {
-        iDisplayTimer->Cancel();
-        delete iDisplayTimer;
-    }
 
     if ( iInterfaceSelector )
     {
@@ -155,15 +123,6 @@
         iInterfaceSelector = NULL;
     }
 
-    // make sure that backlight enabled when
-    // the view updates or deactivates
-    EnableBacklight();
-
-    if ( iLight )
-    {
-        delete iLight;
-        iLight = NULL;
-    }
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -398,10 +357,7 @@
             if (aPointerEvent.iType == TPointerEvent::EButton1Down && iForeground)
             {
                 iProcessingInputType = EMpxVideoTouch;
-                if ( iTVOutConnected )
-                {
-                    RestartDisplayTimer();
-                }
+
                 ReRoutePointerEventL(aControl, aPointerEvent, aMPXControl);
             }
             break;
@@ -447,10 +403,7 @@
                 iProcessingInputType = EMpxVideoKeyboard;
                 iLastPressedKeyCode = aKeyEvent.iCode;
                 iLastPressedKeyScanCode = aKeyEvent.iScanCode;
-                if ( iTVOutConnected )
-                {
-                    RestartDisplayTimer();
-                }
+
                 iContainer->DoHandleKeyEventL(aKeyEvent, aType);
             }
             break;
@@ -498,18 +451,10 @@
                 iProcessingInputType = EMpxVideoMediaKeys;
                 iLastMediaKeyPressed = aOperationId;
                 DoHandleMediaKey(aOperationId, aButtonAct);
-                if ( iTVOutConnected )
-                {
-                    RestartDisplayTimer();
-                }
             }
             else if (aButtonAct == ERemConCoreApiButtonClick && iForeground)
             {
                 DoHandleMediaKey(aOperationId, aButtonAct);
-                if ( iTVOutConnected )
-                {
-                    RestartDisplayTimer();
-                }
                 // reset on click AND/OR release
                 iProcessingInputType = EMpxVideoNone;
             }
@@ -606,111 +551,5 @@
     }
 }
 
-// -----------------------------------------------------------------------------
-// CMPXVideoPlaybackUserInputHandler::DisableBacklight()
-// -----------------------------------------------------------------------------
-//
-void CMPXVideoPlaybackUserInputHandler::DisableBacklight()
-{
-    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::DisableBacklight"));
-
-    // cancel the timer
-    iDisplayTimer->Cancel();
-
-    // disable the backlight
-    MPX_TRAPD( err, 
-    {
-        iLight->ReserveLightL( CHWRMLight::EPrimaryDisplay );
-        iLight->LightOffL( CHWRMLight::EPrimaryDisplay );
-    } );
-}
-
-// -----------------------------------------------------------------------------
-// CMPXVideoPlaybackUserInputHandler::EnableBacklight()
-// -----------------------------------------------------------------------------
-//
-void CMPXVideoPlaybackUserInputHandler::EnableBacklight()
-{
-    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::EnableBacklight"));
-
-    // enable the backlight
-    MPX_TRAPD( err,
-    {
-        iLight->LightOnL( CHWRMLight::EPrimaryDisplay );
-        iLight->ReleaseLight(CHWRMLight::EPrimaryDisplay );
-    } );
-}
-
-
-// -------------------------------------------------------------------------------------------------
-//   CMPXVideoPlaybackUserInputHandler::HandleTVOutEvent()
-// -------------------------------------------------------------------------------------------------
-//
-void CMPXVideoPlaybackUserInputHandler::HandleTVOutEvent(TBool aTVOutConnected)
-{
-    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::HandleTVOutEvent"));
-
-    iTVOutConnected = aTVOutConnected;
-
-    if ( iTVOutConnected )
-    {
-        // Get the display light time-out value from CenRep
-        CRepository* repository = CRepository::NewLC( KCRUidLightSettings );
-
-        // What's the timeout value (in seconds ) for the display light?
-        repository->Get( KDisplayLightsTimeout, iDisplayTimeOut );
-        MPX_DEBUG(_L("CMPXVideoPlaybackUserInputHandler::ConstructL Display Timeout( %d )"), iDisplayTimeOut);
-
-        CleanupStack::PopAndDestroy( repository );
-
-        // Convert the timeout value to microseconds
-        iDisplayTimeOut *= KMPXMicroSecondsInASecond;
-
-        RestartDisplayTimer();
-    }
-    else
-    {
-        iDisplayTimer->Cancel();
-        EnableBacklight();
-    }
-}
-
-// -------------------------------------------------------------------------------------------------
-//   CMPXVideoPlaybackUserInputHandler::HandleDisplayTimeout
-// -------------------------------------------------------------------------------------------------
-//
-TInt CMPXVideoPlaybackUserInputHandler::HandleDisplayTimeout( TAny* aPtr )
-{
-    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::HandleDisplayTimeout"));
-
-    static_cast<CMPXVideoPlaybackUserInputHandler*>(aPtr)->DisableBacklight();
-
-    return KErrNone;
-}
-
-// -----------------------------------------------------------------------------
-// CMPXVideoPlaybackUserInputHandler::RestartDisplayTimer
-// -----------------------------------------------------------------------------
-//
-void CMPXVideoPlaybackUserInputHandler::RestartDisplayTimer()
-{
-    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::RestartDisplayTimer"));
-
-    // check if the display timer is running if so cancelit
-    if ( iDisplayTimer->IsActive() )
-    {
-        iDisplayTimer->Cancel();
-    }
-    else
-    {
-        // timeout has happened and the backlight is disabled
-        // enable the backlight
-        EnableBacklight();
-    }
-
-    // Re start the display backlight timer
-    iDisplayTimer->Start( iDisplayTimeOut, iDisplayTimeOut,
-                          TCallBack( CMPXVideoPlaybackUserInputHandler::HandleDisplayTimeout, this ) );
-}
 
 // EOF
--- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackview.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackview.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 17 %
+
+// Version : %version: 18 %
 
 
 //  Include Files
@@ -227,12 +228,8 @@
     {
         //
         //  New item from the playlist clean up the view
-        //  Remove the Display Window
         //
-        if ( iDisplayHandler )
-        {
-            iDisplayHandler->RemoveDisplayWindow();
-        }
+        RemoveBackgroundSurfaceL();
     }
 }
 
--- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackviewfiledetails.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackviewfiledetails.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e003sa33#9 %
+// Version : %version: 10 %
 
 
 //
@@ -88,13 +88,12 @@
     iAudioEnabled = EFalse;
     iVideoEnabled = EFalse;
     iPartialPlayback = EFalse;
-    iRNFormat = EFalse;
 
     iDuration = 0;
     iTvOutConnected   = EFalse;
     iTvOutPlayAllowed = ETrue;
     iDrmProtected = EFalse;
-    
+
     iVideoHeight = 0;
     iVideoWidth  = 0;
     iBitRate = 0;
@@ -108,24 +107,22 @@
 EXPORT_C HBufC* CMPXVideoPlaybackViewFileDetails::GenerateFileNameL()
 {
     MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackViewFileDetails::GenerateFileNameL()" ) );
-    
-	HBufC* fileName = NULL;
+
+    HBufC* fileName = NULL;
 
-	if ( iClipName && iClipName->Length()
-			&& EMPXVideoStreaming != iPlaybackMode &&
-    		EMPXVideoLiveStreaming != iPlaybackMode )
-	{
+    if ( iClipName &&
+         iClipName->Length() &&
+         EMPXVideoStreaming != iPlaybackMode &&
+         EMPXVideoLiveStreaming != iPlaybackMode )
+    {
         //
-        // Get only file name for media details viewer 
+        //  Get only file name for media details viewer
         //
-        //TParsePtrC filePath( iClipName->Des() );
-        //fileName = ( filePath.Name() ).AllocL();
         TParse parse;
-        parse.Set( iClipName->Des(), NULL, NULL);
+        parse.Set( iClipName->Des(), NULL, NULL );
         fileName = ( parse.Name() ).AllocL();
+    }
 
-	}
-	
     return fileName;
 }
 
--- a/videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/bwins/ui_userinputhandlertestu.def	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/bwins/ui_userinputhandlertestu.def	Mon Mar 15 12:40:47 2010 +0200
@@ -1,6 +1,6 @@
 EXPORTS
-      	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
 	??1CMPXVideoPlaybackUserInputHandler@@UAE@XZ @ 2 NONAME ; CMPXVideoPlaybackUserInputHandler::~CMPXVideoPlaybackUserInputHandler(void)
-	?NewL@CMPXVideoPlaybackUserInputHandler@@SAPAV1@PAVCMPXVideoPlaybackContainer@@H@Z @ 3 NONAME ; class CMPXVideoPlaybackUserInputHandler * CMPXVideoPlaybackUserInputHandler::NewL(class CMPXVideoPlaybackContainer *, int)
+	?NewL@CMPXVideoPlaybackUserInputHandler@@SAPAV1@PAVCMPXVideoPlaybackContainer@@@Z @ 3 NONAME ; class CMPXVideoPlaybackUserInputHandler * CMPXVideoPlaybackUserInputHandler::NewL(class CMPXVideoPlaybackContainer *)
 	?ProcessPointerEventL@CMPXVideoPlaybackUserInputHandler@@QAEXPAVCCoeControl@@ABUTPointerEvent@@W4TMPXVideoControlType@@@Z @ 4 NONAME ; void CMPXVideoPlaybackUserInputHandler::ProcessPointerEventL(class CCoeControl *, struct TPointerEvent const &, enum TMPXVideoControlType)
 
--- a/videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/conf/ui_userinputhandlertest.cfg	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/conf/ui_userinputhandlertest.cfg	Mon Mar 15 12:40:47 2010 +0200
@@ -13,11 +13,7 @@
 
 EAknSoftkeyBack 3001
 
-ETvOutDisconnected 0
-ETvOutConnected 1
 
-EDisplayBacklightOff 2
-EDisplayBacklightOn 1
 
 [Enddefine]
 
@@ -33,7 +29,7 @@
 [Test]
 title A1. Click media key 'Stop'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=69 buttonaction=2
 pause 100
@@ -44,7 +40,7 @@
 [Test]
 title A2. Press media key 'Stop'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=69 buttonaction=0
 pause 1000
@@ -55,7 +51,7 @@
 [Test]
 title A3. Press & release media key 'Stop'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=69 buttonaction=0
 pause 1000
@@ -68,7 +64,7 @@
 [Test]
 title A4. Click & release media key 'Stop'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=69 buttonaction=2
 pause 1000
@@ -81,7 +77,7 @@
 [Test]
 title A5. Click media key 'Stop' while key event 'Seek Backward' is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=14 code=2 controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -96,7 +92,7 @@
 [Test]
 title A6. Click media key 'Stop' after key event 'Seek Backward' is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=14 code=1
 pause 100
@@ -111,7 +107,7 @@
 [Test]
 title A7. Click media key 'Stop' while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -126,7 +122,7 @@
 [Test]
 title A8. Click media key 'Stop' after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -150,7 +146,7 @@
 [Test]
 title B1. Click media key 'Rewind'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=72 buttonaction=2
 pause 100
@@ -161,7 +157,7 @@
 [Test]
 title B2. Press media key 'Rewind'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=72 buttonaction=0
 pause 1000
@@ -172,7 +168,7 @@
 [Test]
 title B3. Press & release media key 'Rewind'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=72 buttonaction=0
 pause 1000
@@ -185,7 +181,7 @@
 [Test]
 title B4. Click & release media key 'Rewind'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=72 buttonaction=2
 pause 1000
@@ -198,7 +194,7 @@
 [Test]
 title B5. Press media key 'Rewind' while key event 'Seek Forward' is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=3
 pause 100
@@ -213,7 +209,7 @@
 [Test]
 title B6. Press media key 'Rewind' after key event 'Seek Forward' is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=2
 pause 100
@@ -228,7 +224,7 @@
 [Test]
 title B7. Press media key 'Rewind' while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -243,7 +239,7 @@
 [Test]
 title B8. Press media key 'Rewind' after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -267,7 +263,7 @@
 [Test]
 title C1. Click media key 'Fast Forward'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=73 buttonaction=2
 pause 100
@@ -278,7 +274,7 @@
 [Test]
 title C2. Press media key 'Fast Forward'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=73 buttonaction=0
 pause 1000
@@ -289,7 +285,7 @@
 [Test]
 title C3. Press & release media key 'Fast Forward'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=73 buttonaction=0
 pause 1000
@@ -302,7 +298,7 @@
 [Test]
 title C4. Click & release media key 'Fast Forward'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=73 buttonaction=2
 pause 1000
@@ -315,7 +311,7 @@
 [Test]
 title C5. Press media key 'Fast Forward' while key event 'Seek Backward' is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=14 code=4
 pause 100
@@ -330,7 +326,7 @@
 [Test]
 title C6. Press media key 'Fast Forward' after key event 'Seek Backward' is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=14 code=3
 pause 100
@@ -345,7 +341,7 @@
 [Test]
 title C7. Press media key 'Fast Forward' while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -360,7 +356,7 @@
 [Test]
 title C8. Press media key 'Fast Forward' after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -382,7 +378,7 @@
 [Test]
 title D1. Click media key 'Volume Up'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=65 buttonaction=2
 pause 100
@@ -393,7 +389,7 @@
 [Test]
 title D2. Press media key 'Volume Up'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=65 buttonaction=0
 pause 1000
@@ -404,7 +400,7 @@
 [Test]
 title D3. Press & release media key 'Volume Up'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=65 buttonaction=0
 pause 1000
@@ -417,7 +413,7 @@
 [Test]
 title D4. Click & release media key 'Volume Up'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=65 buttonaction=2
 pause 1000
@@ -430,7 +426,7 @@
 [Test]
 title D5. Press media key 'Volume Up' while key event 'Seek Backward' is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=14 code=5
 pause 100
@@ -445,7 +441,7 @@
 [Test]
 title D6. Press media key 'Volume Up' after key event 'Seek Backward' is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=14 code=4
 pause 100
@@ -460,7 +456,7 @@
 [Test]
 title D7. Press media key 'Volume Up' while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -475,7 +471,7 @@
 [Test]
 title D8. Press media key 'Volume Up' after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -498,7 +494,7 @@
 [Test]
 title E1. Click media key 'Volume Down'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=66 buttonaction=2
 pause 100
@@ -509,7 +505,7 @@
 [Test]
 title E2. Press media key 'Volume Down'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=66 buttonaction=0
 pause 1000
@@ -520,7 +516,7 @@
 [Test]
 title E3. Press & release media key 'Volume Down'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=66 buttonaction=0
 pause 1000
@@ -533,7 +529,7 @@
 [Test]
 title E4. Click & release media key 'Volume Down'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=66 buttonaction=2
 pause 1000
@@ -546,7 +542,7 @@
 [Test]
 title E5. Press media key 'Volume Down' while key event 'Seek Forward' is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=6
 pause 100
@@ -561,7 +557,7 @@
 [Test]
 title E6. Press media key 'Volume Down' after key event 'Seek Forward' is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=5
 pause 100
@@ -576,7 +572,7 @@
 [Test]
 title E7. Press media key 'Volume Down' while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -591,7 +587,7 @@
 [Test]
 title E8. Press media key 'Volume Down' after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -616,7 +612,7 @@
 [Test]
 title F1. Click media key 'PausePlay'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=97 buttonaction=2
 pause 100
@@ -627,7 +623,7 @@
 [Test]
 title F2. Press media key 'PausePlay'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=97 buttonaction=0
 pause 1000
@@ -638,7 +634,7 @@
 [Test]
 title F3. Press & release media key 'PausePlay'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=97 buttonaction=0
 pause 1000
@@ -651,7 +647,7 @@
 [Test]
 title F4. Click & release media key 'PausePlay'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=97 buttonaction=2
 pause 1000
@@ -664,7 +660,7 @@
 [Test]
 title F5. Click media key 'PausePlay' while key event 'Volume Down' is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=17 code=7
 pause 100
@@ -679,7 +675,7 @@
 [Test]
 title F6. Click media key 'PausePlay' after key event 'Volume Down' is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=17 code=6
 pause 100
@@ -694,7 +690,7 @@
 [Test]
 title F7. Click media key 'PausePlay' while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -709,7 +705,7 @@
 [Test]
 title F8. Click media key 'PausePlay' after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -733,7 +729,7 @@
 [Test]
 title G1. Click media key 'Pause'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=70 buttonaction=2
 pause 100
@@ -744,7 +740,7 @@
 [Test]
 title G2. Press media key 'Pause'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=70 buttonaction=0
 pause 1000
@@ -755,7 +751,7 @@
 [Test]
 title G3. Press & release media key 'Pause'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=70 buttonaction=0
 pause 1000
@@ -768,7 +764,7 @@
 [Test]
 title G4. Click & release media key 'Pause'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=70 buttonaction=2
 pause 1000
@@ -781,7 +777,7 @@
 [Test]
 title G5. Click media key 'Pause' while key event 'Volume Up' is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=16 code=8
 pause 100
@@ -794,7 +790,7 @@
 [Test]
 title G6. Click media key 'Pause' after key event 'Volume Up' is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=16 code=7
 pause 100
@@ -809,7 +805,7 @@
 [Test]
 title G7. Click media key 'Pause' while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -824,7 +820,7 @@
 [Test]
 title G8. Click media key 'Pause' after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -848,7 +844,7 @@
 [Test]
 title H1. Click media key 'Play'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoPlay buttonaction=2
 pause 100
@@ -859,7 +855,7 @@
 [Test]
 title H2. Press media key 'Play'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoPlay buttonaction=0
 pause 1000
@@ -870,7 +866,7 @@
 [Test]
 title H3. Press & release media key 'Play'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoPlay buttonaction=0
 pause 1000
@@ -883,7 +879,7 @@
 [Test]
 title H4. Click & release media key 'Play'
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest MediaKeyEvent command=MrccatoPlay buttonaction=2
 pause 1000
@@ -896,7 +892,7 @@
 [Test]
 title H5. Click media key 'Play' while key event 'Volume Down' is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=17 code=9
 pause 100
@@ -911,7 +907,7 @@
 [Test]
 title H6. Click media key 'Play' after key event 'Volume Down' is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=17 code=8
 pause 100
@@ -926,7 +922,7 @@
 [Test]
 title H7. Click media key 'Play' while pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -941,7 +937,7 @@
 [Test]
 title H8. Click media key 'Play' after pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -965,7 +961,7 @@
 [Test]
 title I1. Container pointer (ButtonDown) input while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -978,7 +974,7 @@
 [Test]
 title I2. Container Pointer (Drag) input while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -991,7 +987,7 @@
 [Test]
 title I3. Control Pointer (ButtonDown) input while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1004,7 +1000,7 @@
 [Test]
 title I4. Control Pointer (Drag) input while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1017,7 +1013,7 @@
 [Test]
 title I5. Media key 'Stop' while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1030,7 +1026,7 @@
 [Test]
 title I6. Media key 'Rewind' while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1043,7 +1039,7 @@
 [Test]
 title I7. Media key 'Fast Forward' while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1056,7 +1052,7 @@
 [Test]
 title I8. Media key 'Volume Up' while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1069,7 +1065,7 @@
 [Test]
 title I9. Media key 'Volume Down' while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1082,7 +1078,7 @@
 [Test]
 title I10. Media key 'PausePlay' while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1095,7 +1091,7 @@
 [Test]
 title I10. Media key 'Pause' while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1108,7 +1104,7 @@
 [Test]
 title I11. Media key 'Play' while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1121,7 +1117,7 @@
 [Test]
 title I12. Key event 'PlayPause' input while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1134,7 +1130,7 @@
 [Test]
 title I13. Key event 'Enter Key' input while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1147,7 +1143,7 @@
 [Test]
 title I14. Key event 'Volume Up' input while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1160,7 +1156,7 @@
 [Test]
 title I15. Key event 'Volume Down' input while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1173,7 +1169,7 @@
 [Test]
 title I16. Key event 'Seek Backward' input while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1186,7 +1182,7 @@
 [Test]
 title I17. Key event 'Seek Forward' input while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1199,7 +1195,7 @@
 [Test]
 title I18. Key event 'Green/Send Key' input while UI in background
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest SetForeground foreground=0
 pause 100
@@ -1219,7 +1215,7 @@
 [Test]
 title J1. Key event 'Rocker Middle Key' input - valid iCode
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=167 code=0
 pause 100
@@ -1230,7 +1226,7 @@
 [Test]
 title J2. Key event 'Rocker Middle Key' input - invalid iCode
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=167 code=13
 pause 100
@@ -1241,7 +1237,7 @@
 [Test]
 title J3. Key event 'Enter Key' input 
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=3 code=0
 pause 100
@@ -1252,7 +1248,7 @@
 [Test]
 title J4. Key event 'Enter Key' input - invalid iCode
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=3 code=127
 pause 100
@@ -1263,7 +1259,7 @@
 [Test]
 title J5. Key event 'Volume Up' input
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=16 code=17
 pause 100
@@ -1274,7 +1270,7 @@
 [Test]
 title J6. Key event 'Volume Down' input
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=17
 pause 100
@@ -1285,7 +1281,7 @@
 [Test]
 title J7. Key event 'Seek Backward' input
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=14
 pause 100
@@ -1296,7 +1292,7 @@
 [Test]
 title J8. Key event 'Seek Backward & Release' input
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=14 code=9
 pause 100
@@ -1309,7 +1305,7 @@
 [Test]
 title J9. Key event 'Seek Forward' input
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=18
 pause 100
@@ -1320,7 +1316,7 @@
 [Test]
 title J10. Key event 'Seek Forward & Release' input
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=10
 pause 100
@@ -1333,7 +1329,7 @@
 [Test]
 title J11. Key event 'Green/Send Key' input
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=196 code=19
 pause 100
@@ -1344,7 +1340,7 @@
 [Test]
 title J12. Key event 'Enter Key' input  - invalid type
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyUp scancode=3 code=0
 pause 100
@@ -1354,7 +1350,7 @@
 [Test]
 title J13. Key event 'EStdKeyDevice0'  - valid type
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=164 code=25
 pause 100
@@ -1365,7 +1361,7 @@
 [Test]
 title J14. Key event 'EStdKeyDevice0'  - invalid type
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyUp scancode=164 code=25
 pause 100
@@ -1376,7 +1372,7 @@
 [Test]
 title J15. Key event 'EStdKeyDevice1'  - valid type
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=165 code=26
 pause 100
@@ -1387,7 +1383,7 @@
 [Test]
 title J16. Key event 'EStdKeyDevice1'  - invalid type
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyUp scancode=165 code=26
 pause 100
@@ -1404,7 +1400,7 @@
 [Test]
 title K1. Container Pointer Down input
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1415,7 +1411,7 @@
 [Test]
 title K2. Container Pointer Down & Up input
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1428,7 +1424,7 @@
 [Test]
 title K3. Container Pointer Drag input
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EDrag controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1439,7 +1435,7 @@
 [Test]
 title K4. Container Pointer Drag & Up input
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EDrag controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1458,7 +1454,7 @@
 [Test]
 title L1. Key input (Enter Key) while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1474,7 +1470,7 @@
 [Test]
 title L2. Key input (Enter Key) after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1491,7 +1487,7 @@
 [Test]
 title L3. Key input (Rocker Middle Key) while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1507,7 +1503,7 @@
 [Test]
 title L4. Key input (Rocker Middle Key) after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1524,7 +1520,7 @@
 [Test]
 title L5. Key input (Volume Up) while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1540,7 +1536,7 @@
 [Test]
 title L6. Key input (Volume Up) after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1557,7 +1553,7 @@
 [Test]
 title L7. Key input (Volume Down) while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1573,7 +1569,7 @@
 [Test]
 title L8. Key input (Volume Down) after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1590,7 +1586,7 @@
 [Test]
 title L9. Key input (Seek Backward) while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1606,7 +1602,7 @@
 [Test]
 title L10. Key input (Seek Backward) after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1623,7 +1619,7 @@
 [Test]
 title L11. Key input (Seek Backward) after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1643,7 +1639,7 @@
 [Test]
 title L12. Key input (Seek Forward) while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1659,7 +1655,7 @@
 [Test]
 title L13. Key input (Seek Forward) after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1676,7 +1672,7 @@
 [Test]
 title L14. Key input (Seek Forward) after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1695,7 +1691,7 @@
 [Test]
 title L15. Key input (Enter Key) while container pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1711,7 +1707,7 @@
 [Test]
 title L16. Key input (Green/Send Key) after container pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
 pause 100
@@ -1731,7 +1727,7 @@
 [Test]
 title L17. Key input (Enter Key) while control pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1747,7 +1743,7 @@
 [Test]
 title L18. Key input (Enter Key) after control pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1764,7 +1760,7 @@
 [Test]
 title L19. Key input (Rocker Middle Key) while control pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1780,7 +1776,7 @@
 [Test]
 title L20. Key input (Rocker Middle Key) after control pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1797,7 +1793,7 @@
 [Test]
 title L21. Key input (Volume Up) while control pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1814,7 +1810,7 @@
 [Test]
 title L22. Key input (Volume Up) after control pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1831,7 +1827,7 @@
 [Test]
 title L23. Key input (Volume Down) while control pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1847,7 +1843,7 @@
 [Test]
 title L24. Key input (Volume Down) after control pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1864,7 +1860,7 @@
 [Test]
 title L25. Key input (Seek Backward) while control pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1880,7 +1876,7 @@
 [Test]
 title L26. Key input (Seek Backward) after control pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1897,7 +1893,7 @@
 [Test]
 title L27. Key input (Seek Backward) after control pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1917,7 +1913,7 @@
 [Test]
 title L28. Key input (Seek Forward) while control pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1933,7 +1929,7 @@
 [Test]
 title L29. Key input (Seek Forward) after control pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1950,7 +1946,7 @@
 [Test]
 title L30. Key input (Seek Forward) after control pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1969,7 +1965,7 @@
 [Test]
 title L31. Key input (Enter Key) while control pointer event is in progress
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -1985,7 +1981,7 @@
 [Test]
 title L32. Key input (Green/Send Key) after control pointer event is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackControl
 pause 100
@@ -2004,7 +2000,7 @@
 [Test]
 title L33. Container pointer input while key event (Enter Key) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=3 code=0
 pause 100
@@ -2021,7 +2017,7 @@
 [Test]
 title L34. Container pointer input after key event (Enter Key) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=3 code=0
 pause 100
@@ -2036,7 +2032,7 @@
 [Test]
 title L35. Container pointer input while key event (Rocker Middle Key) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=167 code=0
 pause 100
@@ -2053,7 +2049,7 @@
 [Test]
 title L36. Container pointer input after key event (Rocker Middle Key) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=167 code=0
 pause 100
@@ -2068,7 +2064,7 @@
 [Test]
 title L37. Container pointer input while key event (Volume Up) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=16 code=9
 pause 100
@@ -2085,7 +2081,7 @@
 [Test]
 title L38. Container pointer input after key event (Volume Up) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=16 code=17
 pause 100
@@ -2100,7 +2096,7 @@
 [Test]
 title L39. Container pointer input while key event (Volume Down) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=17 code=10
 pause 100
@@ -2117,7 +2113,7 @@
 [Test]
 title L40. Container pointer input after key event (Volume Down) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=17 code=18
 pause 100
@@ -2132,7 +2128,7 @@
 [Test]
 title L41. Container pointer input while key event (Seek Backward) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=14 code=11
 pause 100
@@ -2149,7 +2145,7 @@
 [Test]
 title L42. Container pointer input after key event (Seek Backward) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=14 code=19
 pause 100
@@ -2164,7 +2160,7 @@
 [Test]
 title L43. Container pointer input while key event (Seek Forward) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=12
 pause 100
@@ -2181,7 +2177,7 @@
 [Test]
 title L44. Container pointer input after key event (Seek Forward) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=20
 pause 100
@@ -2196,7 +2192,7 @@
 [Test]
 title L45. Container pointer input while key event (Green/Send Key) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=196 code=13
 pause 100
@@ -2213,7 +2209,7 @@
 [Test]
 title L46. Container pointer input after key event (Green/Send Key) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=196 code=21
 pause 100
@@ -2228,7 +2224,7 @@
 [Test]
 title L47. Key input (Hash Key) while key event (Volume Up) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=16 code=14
 pause 100
@@ -2243,7 +2239,7 @@
 [Test]
 title L48. Key input (Rocker Middle Key) while key event (Volume Up) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=16 code=16
 pause 100
@@ -2258,7 +2254,7 @@
 [Test]
 title L49. Key input (Rocker Middle Key) after key event (Volume Up) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=16 code=22
 pause 100
@@ -2275,7 +2271,7 @@
 [Test]
 title L50. Key input (Seek Backward) while key event (Volume Down) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=17 code=18
 pause 100
@@ -2290,7 +2286,7 @@
 [Test]
 title L51. Key input (Seek Backward) after key event (Volume Down) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=17 code=23
 pause 100
@@ -2307,7 +2303,7 @@
 [Test]
 title L52. Key input (Volume Down) while key event (Seek Forward) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=25
 pause 100
@@ -2322,7 +2318,7 @@
 [Test]
 title L53. Key input (Volume Down) after key event (Seek Forward) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=24
 pause 100
@@ -2339,7 +2335,7 @@
 [Test]
 title L54. Key input (EStdKeyDevice0) while key event (Seek Forward) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=25
 pause 100
@@ -2354,7 +2350,7 @@
 [Test]
 title L55. Key input (EStdKeyDevice0) after key event (Seek Forward) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=25
 pause 100
@@ -2371,7 +2367,7 @@
 [Test]
 title L56. Key input (EStdKeyDevice1) while key event (Seek Forward) is being processed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=25
 pause 100
@@ -2386,7 +2382,7 @@
 [Test]
 title L57. Key input (EStdKeyDevice1) after key event (Seek Forward) is completed
 create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
+UserInputHandlerTest CreateStubsL
 pause 100
 UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=25
 pause 100
@@ -2400,99 +2396,3 @@
 delete UserInputHandlerTest
 [Endtest]
 
-
-///////////////////////////////////////////////////////////////////
-//
-// Backlight TV Out Events
-//
-///////////////////////////////////////////////////////////////////
-
-[Test]
-title Backlight1.  TvOut Connected
-create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutConnected
-pause 100
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOn
-pause 70000
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOff
-delete UserInputHandlerTest
-[Endtest]
-
-[Test]
-title Backlight2.  TvOut Disconnected
-create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
-pause 100
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOn
-delete UserInputHandlerTest
-[Endtest]
-
-[Test]
-title Backlight3.  Event TvOut Connected
-create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutDisconnected
-pause 100
-UserInputHandlerTest TvOutEvent ETvOutConnected
-pause 100
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOn
-pause 70000
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOff
-delete UserInputHandlerTest
-[Endtest]
-
-[Test]
-title Backlight4.  Event TvOut Disconnected
-create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutConnected
-pause 100
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOn
-pause 70000
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOff
-pause 100
-UserInputHandlerTest TvOutEvent ETvOutConnected
-pause 100
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOn
-delete UserInputHandlerTest
-[Endtest]
-
-[Test]
-title Backlight5.  Backlight off MediaKey Event 
-create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutConnected
-pause 70000
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOff
-pause 100
-UserInputHandlerTest MediaKeyEvent command=MrccatoCommand operationid=73 buttonaction=2
-pause 100
-UserInputHandlerTest CheckExpectedCommand EMPCmdNone
-pause 100
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOn
-delete UserInputHandlerTest
-[Endtest]
-
-[Test]
-title Backlight6.  Backlight off Pointer Event
-create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutConnected
-pause 70000
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOff
-pause 100
-UserInputHandlerTest PointerEvent ptrtype=EButton1Down controltype=EMpxVideoPlaybackContainer
-pause 100
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOn
-delete UserInputHandlerTest
-[Endtest]
-
-
-[Test]
-title Backlight7.  Backlight off  Event Key
-create ui_userinputhandlertest UserInputHandlerTest
-UserInputHandlerTest CreateStubsL ETvOutConnected
-pause 70000
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOff
-pause 100
-UserInputHandlerTest KeyEvent keytype=EEventKeyDown scancode=15 code=25
-pause 100
-UserInputHandlerTest CheckBacklightState EDisplayBacklightOn
-delete UserInputHandlerTest
-[Endtest]
--- a/videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/eabi/ui_userinputhandlertestu.def	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/eabi/ui_userinputhandlertestu.def	Mon Mar 15 12:40:47 2010 +0200
@@ -1,10 +1,12 @@
 EXPORTS
 	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
 	_ZN33CMPXVideoPlaybackUserInputHandler20ProcessPointerEventLEP11CCoeControlRK13TPointerEvent20TMPXVideoControlType @ 2 NONAME
-	_ZTI24CMPXVideoPlaybackControl @ 3 NONAME ; #<TI>#
-	_ZTI26CMPXVideoPlaybackContainer @ 4 NONAME ; #<TI>#
-	_ZTI33CMPXVideoPlaybackUserInputHandler @ 5 NONAME ; #<TI>#
-	_ZTV24CMPXVideoPlaybackControl @ 6 NONAME ; #<VT>#
-	_ZTV26CMPXVideoPlaybackContainer @ 7 NONAME ; #<VT>#
-	_ZTV33CMPXVideoPlaybackUserInputHandler @ 8 NONAME ; #<VT>#
+	_ZTI10CHWRMLight @ 3 NONAME
+	_ZTI24CMPXVideoPlaybackControl @ 4 NONAME
+	_ZTI26CMPXVideoPlaybackContainer @ 5 NONAME
+	_ZTI33CMPXVideoPlaybackUserInputHandler @ 6 NONAME
+	_ZTV10CHWRMLight @ 7 NONAME
+	_ZTV24CMPXVideoPlaybackControl @ 8 NONAME
+	_ZTV26CMPXVideoPlaybackContainer @ 9 NONAME
+	_ZTV33CMPXVideoPlaybackUserInputHandler @ 10 NONAME
 
--- a/videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/inc/userinputhandlertest.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/inc/userinputhandlertest.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: ou1cpsw#3 %
+// Version : %version: ou1cpsw#4 %
 
 #ifndef USERINPUTHANDLER_TEST_H
 #define USERINPUTHANDLER_TEST_H
@@ -162,18 +162,7 @@
         */
         TInt CheckExpectedCommand( CStifItemParser&  aItem );
  
-        /**
-        * Check the HAL backlight state
-        * @return Symbian OS error code.
-        */
-        TInt CheckBacklightState( CStifItemParser&  aItem );
         
-        /**
-        * Issue TVOut Connect/Disconnect event
-        * @return Symbian OS error code.
-        */
-        TInt TvOutEvent( CStifItemParser& aItem );
-
     private:    
 
         CMPXVideoPlaybackContainer*          iContainer; 
--- a/videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/src/userinputhandlertestBlocks.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayback/videoplaybackviews/tsrc/ut_userinputhandlertest/src/userinputhandlertestBlocks.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 6 %
+// Version : %version: ou1cpsw#7 %
 
 
 // [INCLUDE FILES] - do not remove
@@ -112,9 +112,7 @@
         ENTRY( "MediaKeyEvent", CUserinputhandlertest::MediaKeyEvent ),
         ENTRY( "SetForeground", CUserinputhandlertest::SetForeground ),
         ENTRY( "CheckExpectedResult",CUserinputhandlertest::CheckExpectedResult ),
-        ENTRY( "CheckExpectedCommand",CUserinputhandlertest::CheckExpectedCommand ),
-        ENTRY( "TvOutEvent",CUserinputhandlertest::TvOutEvent ),
-        ENTRY( "CheckBacklightState",CUserinputhandlertest::CheckBacklightState ),        
+        ENTRY( "CheckExpectedCommand",CUserinputhandlertest::CheckExpectedCommand ),      
     };
 
     const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo );
@@ -128,8 +126,7 @@
 //
 TInt CUserinputhandlertest::CreateStubsL( CStifItemParser&  aItem )
 {
-    TInt tvOutConnected;
-    TInt err = aItem.GetNextInt( tvOutConnected );
+
     //
     // Stubs
     //
@@ -139,11 +136,9 @@
     //
     // Class to be unit-tested
     //
-	if ( err == KErrNone )
-	{
-        iUserInputHandler = CMPXVideoPlaybackUserInputHandler::NewL( iContainer, tvOutConnected );
-    }
-	
+
+    iUserInputHandler = CMPXVideoPlaybackUserInputHandler::NewL( iContainer );
+
     return KErrNone;
 }
 
@@ -553,54 +548,6 @@
     return result;
 }
 
-// -------------------------------------------------------------------------------------------------
-// CUserinputhandlertest::TvOutEvent
-// -------------------------------------------------------------------------------------------------
-//
-TInt CUserinputhandlertest::TvOutEvent( CStifItemParser& aItem )
-{
-    MPX_DEBUG(_L("CUserinputhandlertest::CheckBacklightState()"));
 
-    TInt tvOutEvent;
-    
-    TInt result = aItem.GetNextInt( tvOutEvent );
-
-    iUserInputHandler->HandleTVOutEvent( tvOutEvent );
-    
-    return result;
-}
-
-// -------------------------------------------------------------------------------------------------
-// CUserinputhandlertest::CheckBacklightState
-// -------------------------------------------------------------------------------------------------
-//
-TInt CUserinputhandlertest::CheckBacklightState( CStifItemParser& aItem )
-{
-    MPX_DEBUG(_L("CUserinputhandlertest::CheckBacklightState()"));
-
-    TLightStatus backlightState = ELightStatusUnknown;
-    TInt status;
-    
-    CHWRMLight* light = NULL;
-    MPX_TRAPD( err, light = CHWRMLight::NewL() );
-    backlightState = light->LightStatus( CHWRMLight::EPrimaryDisplay );
-    delete light;
-
-    TInt result = aItem.GetNextInt( status );
-
-    if ( result == KErrNone && status == backlightState )
-    {
-        result = KErrNone;
-    }
-    else
-    {
-        MPX_DEBUG(_L("CheckBacklightState FAILED: expectedState=%d, actualState=%d]"),
-                backlightState, status );
-
-        result = KErrArgument;
-    }
-
-    return result;
-}
 
 //  [End of File] - Do not remove
--- a/videoplayer_plat/video_player_file_details_dialog_api/inc/filedetailspluginif.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayer_plat/video_player_file_details_dialog_api/inc/filedetailspluginif.h	Mon Mar 15 12:40:47 2010 +0200
@@ -49,7 +49,7 @@
     * @param    aDetails  Already constructed details to be shown    
     * @return   None
     */  
-    virtual void ShowFileDetails( const CMPXMedia& aMedia ) = 0; 
+    virtual void ShowFileDetailsL( const CMPXMedia& aMedia ) = 0; 
     
 protected:    
     /**
--- a/videoplayerapp/mpxvideoplayer/inc/mpxvideoplayerappuiengine.h	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayerapp/mpxvideoplayer/inc/mpxvideoplayerappuiengine.h	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e92_31 %
+// Version : %version: e92_33 %
 
 
 #ifndef CMPXVIDEOPLAYERAPPUIENGINE_H
@@ -63,10 +63,11 @@
         virtual ~CMpxVideoPlayerAppUiEngine();
 
     public:
+
         /*
-         *  Retrieve the playback utility pointer
+         *  Retrieves playback utility and creates it if needed
          */
-        inline MMPXPlaybackUtility* PlaybackUtility();
+        MMPXPlaybackUtility& PlaybackUtilityL();
 
         /**
          * Opens the specified file in response to a corresponding message.
@@ -186,7 +187,7 @@
             */
         void HandleEmbeddedOpenL( TInt aErr, TMPXGeneralCategory aCategory  );
 
-        void CreateEmbeddedPdlPlaybackUtilityMemberVariablesL();
+        void PreLoadPdlPlaybackViewL();
 
         /*
          * Handles the "back" button.
@@ -223,8 +224,14 @@
         void InitializeFileL( const TDesC& aFileName );
 
         void ClosePlaybackPluginL();
+
+        void SignalViewPdlReloadingL();
         
-        void SignalViewPdlReloading();
+        /*
+         *  Activates an active object to finish the 
+         *  initialization of the standalone application
+         */
+        void ActivateLateConstructTimerL();
 
     private:
         /**
@@ -266,8 +273,6 @@
         */
        void DoHandleCollectionMessageL( CMPXMessage* aMessage );
 
-       void CreatePlaybackUtilityMemberVariablesL();
-
        void CreateCollectionUtilityMemberVariablesL();
 
        void CreateRemoteControlListenerL();
@@ -293,6 +298,21 @@
        void InitializeStreamingLinkL( const TDesC& aUri );
        void InitializePlaylistL( const CMPXCollectionPlaylist& aPlaylist, TBool aPlay );
 
+        /*
+         *  Provides the static function for the callback to 
+         *  finish the standalone application construction
+         *  Called by CPeriodic iConstructTimer
+         *  @param aPtr Pointer to callback class
+         *  @return KErrNone
+         */
+        static TInt LateConstructCallback( TAny* aPtr );
+        
+        /*
+         *  Called to finalize the standalone 
+         *  application initialization.
+         */
+        virtual void DoLateConstructL();
+
     private:       // data
 
         CMpxVideoPlayerAppUi*         iAppUi;
@@ -305,8 +325,7 @@
         MMPXCollectionUtility*   iCollectionUtility;
         MMPXCollectionUiHelper*  iCollectionUiHelper;  // own
 
-        TUid iVideoCollectionId;
-
+        CPeriodic*                    iConstructTimer;
         CIdle*                        iExitAo;
         CMediaRecognizer*             iRecognizer;       // own
         CMpxVideoEmbeddedPdlHandler*  iPdlHandler;       // own
@@ -315,15 +334,6 @@
         TBool                    iMultilinkPlaylist;
         TBool                    iSeekable;
         TBool                    iUpdateSeekInfo;
-};
-
-//
-//  Inline methods
-//
-inline
-MMPXPlaybackUtility* CMpxVideoPlayerAppUiEngine::PlaybackUtility()
-{
-    return iPlaybackUtility;
-}
+    };
 
 #endif             // CMPXVIDEOPLAYERAPPUIENGINE_H
--- a/videoplayerapp/mpxvideoplayer/src/mpxvideoembeddedpdlhandler.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayerapp/mpxvideoplayer/src/mpxvideoembeddedpdlhandler.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version:  12 %
+
+// Version : %version:  ou1cpsw#14 %
 
 
 #include <mpxcommand.h>
@@ -98,7 +99,7 @@
 
         if ( ( aDlId == iDownloadId ) && ( ! aFileName.Compare( *iDownloadFileName ) ) )
         {
-            iAppUiEngine->PlaybackUtility()->CommandL( EPbCmdPlay );
+            iAppUiEngine->PlaybackUtilityL().CommandL( EPbCmdPlay );
         }
         else
         {
@@ -106,8 +107,8 @@
             //  New download received, close old playback plugin
             //
             iAppUiEngine->ClosePlaybackPluginL();
-            
-            iAppUiEngine->SignalViewPdlReloading();
+
+            iAppUiEngine->SignalViewPdlReloadingL();
 
             StartNewDownloadL( aDlId, aFileName );
         }
@@ -153,9 +154,9 @@
     iDownloadFileName = aFileName.AllocL();
 
     //
-    //  Create the Playback Utility
+    //  Load the correct playback view
     //
-    iAppUiEngine->CreateEmbeddedPdlPlaybackUtilityMemberVariablesL();
+    iAppUiEngine->PreLoadPdlPlaybackViewL();
 
     SendPdlCustomCommandL( EPbCmdStartPd, iDownloadId );
 
@@ -182,7 +183,7 @@
     cmd->SetTextValueL( KMPXMediaVideoPlaybackFileName, *iDownloadFileName );
     cmd->SetTObjectValueL<TInt>( KMPXMediaVideoMovePdlFile, iEmbeddedPdlCase );
 
-    iAppUiEngine->PlaybackUtility()->CommandL( *cmd );
+    iAppUiEngine->PlaybackUtilityL().CommandL( *cmd );
 
     CleanupStack::PopAndDestroy( cmd );
 }
--- a/videoplayerapp/mpxvideoplayer/src/mpxvideoplayerappui.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayerapp/mpxvideoplayer/src/mpxvideoplayerappui.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e92_37 %
+// Version : %version: e92_38 %
 
 
 #include <hlplch.h>                     // Help launcher
@@ -173,6 +173,12 @@
             iAppUiEngine->ClearPdlInformation();
             break;
         }
+        case KVcxMyVideosCmdDoLateConstruct:
+        {
+             MPX_DEBUG(_L("CMpxVideoPlayerAppUi::HandleCommandL( DoLateConstruct )"));
+             iAppUiEngine->ActivateLateConstructTimerL();
+             break;
+        }
     }
 }
 
--- a/videoplayerapp/mpxvideoplayer/src/mpxvideoplayerappuiengine.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayerapp/mpxvideoplayer/src/mpxvideoplayerappuiengine.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e92_66 %
+// Version : %version: e92_68 %
 
 
 #include <eikon.hrh>
@@ -114,6 +114,13 @@
 
         iCollectionUtility = MMPXCollectionUtility::NewL( this, collectionMode );
     }
+    //
+    //  Create the playback utility to reduce startup time for embedded cases
+    //
+    else
+    {
+        PlaybackUtilityL();
+    }
 
     //
     //  Create Active Object for exiting the application
@@ -122,6 +129,42 @@
 }
 
 // -----------------------------------------------------------------------------
+//   CMpxVideoPlayerAppUiEngine::PlaybackUtilityL
+// -----------------------------------------------------------------------------
+//
+MMPXPlaybackUtility& CMpxVideoPlayerAppUiEngine::PlaybackUtilityL()
+{
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::PlaybackUtilityL()"));
+
+    if ( ! iPlaybackUtility )
+    {
+        //
+        //  Create VideoHelix playback plugin
+        //
+        MMPXPlaybackUtility* playbackUtility =
+            MMPXPlaybackUtility::UtilityL( EMPXCategoryVideo, KPbModeNewPlayer );
+        MMPXPlayerManager& manager = playbackUtility->PlayerManager();
+        TRAPD( err,
+        {
+            manager.SelectPlayerL( KVideoHelixPlaybackPluginUid );
+            playbackUtility->CommandL( EPbCmdSetAutoResume, EFalse );
+        } );
+        if ( err == KErrNone )
+        {
+            iPlaybackUtility = playbackUtility;
+        }
+        else
+        {
+            TRAP_IGNORE( manager.ClearSelectPlayersL() );
+            playbackUtility->Close();
+            User::Leave( err );
+        }
+    }
+
+    return *iPlaybackUtility;
+}
+
+// -----------------------------------------------------------------------------
 //   CMpxVideoPlayerAppUiEngine::CreateCollectionUtilityMemberVariablesL
 // -----------------------------------------------------------------------------
 //
@@ -142,42 +185,14 @@
 }
 
 // -----------------------------------------------------------------------------
-//   CMpxVideoPlayerAppUiEngine::CreatePlaybackUtilityMemberVariablesL
+//   CMpxVideoPlayerAppUiEngine::PreLoadPdlPlaybackViewL
 // -----------------------------------------------------------------------------
 //
-void CMpxVideoPlayerAppUiEngine::CreatePlaybackUtilityMemberVariablesL()
+void CMpxVideoPlayerAppUiEngine::PreLoadPdlPlaybackViewL()
 {
-    MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::CreatePlaybackUtilityMemberVariablesL()"));
-
-    if ( ! iPlaybackUtility )
-    {
-        //
-        //  Create VideoHelix playback plugin
-        //
-        iPlaybackUtility = MMPXPlaybackUtility::UtilityL( EMPXCategoryVideo, KPbModeNewPlayer );
-        MMPXPlayerManager& manager = iPlaybackUtility->PlayerManager();
-        manager.SelectPlayerL( KVideoHelixPlaybackPluginUid );
-        iPlaybackUtility->CommandL( EPbCmdSetAutoResume, EFalse );
-    }
-}
-
-// -----------------------------------------------------------------------------
-//   CMpxVideoPlayerAppUiEngine::CreateEmbeddedPdlPlaybackUtilityMemberVariablesL
-// -----------------------------------------------------------------------------
-//
-void CMpxVideoPlayerAppUiEngine::CreateEmbeddedPdlPlaybackUtilityMemberVariablesL()
-{
-    MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::CreateEmbeddedPdlPlaybackUtilityMemberVariablesL()"));
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::PreLoadPdlPlaybackViewL()"));
 
     iViewUtility->PreLoadViewL( KVideoPdlPlaybackViewUid );
-
-    if ( ! iPlaybackUtility )
-    {
-        iPlaybackUtility = MMPXPlaybackUtility::UtilityL( EMPXCategoryVideo, KPbModeNewPlayer );
-        MMPXPlayerManager& manager = iPlaybackUtility->PlayerManager();
-        manager.SelectPlayerL( KVideoHelixPlaybackPluginUid );
-        iPlaybackUtility->CommandL( EPbCmdSetAutoResume, EFalse );
-    }
 }
 
 // -----------------------------------------------------------------------------
@@ -188,6 +203,12 @@
 {
     MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::~CMpxVideoPlayerAppUiEngine()"));
 
+    if ( iConstructTimer )
+    {
+        delete iConstructTimer;
+        iConstructTimer = NULL;
+    }
+
     if ( iExitAo )
     {
         delete iExitAo;
@@ -350,11 +371,6 @@
 
     if ( KErrNone == err && ! iPdlHandler )
     {
-        //
-        //  Create member variables for embedded use cases that are not PDL
-        //
-        CreatePlaybackUtilityMemberVariablesL();
-
         TFileName filename;
         aFile.FullName(filename);
 
@@ -367,13 +383,13 @@
         }
         else if ( mediaType == CMediaRecognizer::ELocalSdpFile )
         {
-            iPlaybackUtility->InitStreamingL( aFile, iAccessPointId );
+            PlaybackUtilityL().InitStreamingL( aFile, iAccessPointId );
             ActivatePlaybackViewL();
         }
         else
         {
             iViewUtility->PreLoadViewL( KVideoPlaybackViewUid );
-            iPlaybackUtility->InitL( aFile );
+            PlaybackUtilityL().InitL( aFile );
             ActivatePlaybackViewL();
         }
     }
@@ -393,11 +409,8 @@
                    _L("aFileName = %S"), &aFileName);
 
     //
-    //  Create member variables for embedded use cases that are not PDL
+    //  pre load the view and initialize the playback framework
     //
-    CreatePlaybackUtilityMemberVariablesL();
-
-    // pre load the view and initialize the playback framework
     iViewUtility->PreLoadViewL( KVideoPlaybackViewUid );
 
     CMediaRecognizer::TMediaType mediaType = iRecognizer->IdentifyMediaTypeL(aFileName);
@@ -406,7 +419,7 @@
     {
         InitializeFileL( aFileName );
     }
-    // check if aFileName is a path to a ram or asx file
+    //  check if aFileName is a path to a ram or asx file
     //          eg. c:\\data\\videos\\ramfile.ram
     else if ( mediaType == CMediaRecognizer::ELocalRamFile ||
               mediaType == CMediaRecognizer::ELocalAsxFile )
@@ -451,8 +464,6 @@
     playList->SetSingleItemPlaylist();
     playList->SetToFirst();
 
-    CreatePlaybackUtilityMemberVariablesL();
-
     iViewUtility->PreLoadViewL( KVideoPlaybackViewUid );
 
     InitializePlaylistL( *playList, ETrue );
@@ -478,7 +489,7 @@
         iUpdateSeekInfo = EFalse;
     }
 
-    MMPXPlayer* player = iPlaybackUtility->PlayerManager().CurrentPlayer();
+    MMPXPlayer* player = PlaybackUtilityL().PlayerManager().CurrentPlayer();
 
     TUid pluginUid( KNullUid );
     RArray<TUid> array;
@@ -511,21 +522,6 @@
 {
     MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::StartStandAloneL()"));
 
-    //
-    //  Create the utilities for the stand alone player
-    //
-    CreatePlaybackUtilityMemberVariablesL();
-
-    // Fetch the video collection UID
-    RArray<TUid> uid;
-    CleanupClosePushL( uid );
-
-    uid.AppendL( TUid::Uid( KVcxMediaIdMyVideos ) );
-
-    iVideoCollectionId = iCollectionUtility->CollectionIDL( uid.Array() );
-
-    CleanupStack::PopAndDestroy( &uid );
-
     iViewUtility->SetAsDefaultViewL( KUidMyVideosViewType );
 }
 
@@ -903,7 +899,7 @@
 
     if ( aErr == KErrNone )
     {
-        iPlaybackUtility->CommandL( EPbCmdDisableEffect );
+        PlaybackUtilityL().CommandL( EPbCmdDisableEffect );
     }
 }
 
@@ -937,7 +933,7 @@
 //
 TBool CMpxVideoPlayerAppUiEngine::ProcessCommandParametersL( TApaCommand aCommand,
                                                              TFileName& aDocumentName,
-                                                             const TDesC8& aTail )
+                                                             const TDesC8& /*aTail*/ )
 {
     MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::ProcessCommandParametersL()"));
 
@@ -1022,7 +1018,7 @@
 
     cmd->SetTObjectValueL<TBool>( KMPXMediaGeneralExtVideoSeekable, iSeekable );
 
-    iPlaybackUtility->CommandL( *cmd );
+    PlaybackUtilityL().CommandL( *cmd );
 
     CleanupStack::PopAndDestroy( cmd );
 }
@@ -1061,7 +1057,7 @@
     MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::InitializeStreamingLinkL()"),
                    _L("aUri = %S"), &aUri );
 
-    iPlaybackUtility->InitStreamingL( aUri,
+    PlaybackUtilityL().InitStreamingL( aUri,
                                       (TDesC8*)(&KDATATYPEVIDEOHELIX),
                                       iAccessPointId );
 
@@ -1077,7 +1073,7 @@
     MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::InitializeFileL()"),
                    _L("aFileName = %S"), &aFileName );
 
-    iPlaybackUtility->InitL( aFileName );
+    PlaybackUtilityL().InitL( aFileName );
 
     ActivatePlaybackViewL();
 }
@@ -1091,7 +1087,7 @@
 {
     MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::InitializePlaylistL()"));
 
-    iPlaybackUtility->InitL( aPlaylist, aPlay );
+    PlaybackUtilityL().InitL( aPlaylist, aPlay );
 
     ActivatePlaybackViewL();
 }
@@ -1113,7 +1109,7 @@
     }
     else
     {
-        if (iPlaybackUtility)
+        if ( iPlaybackUtility )
         {
             iPlaybackUtility->CommandL( EPbCmdClose );
         }
@@ -1121,12 +1117,12 @@
 }
 
 // -------------------------------------------------------------------------------------------------
-//   CMpxVideoPlayerAppUiEngine::SignalViewPdlReloading()
+//   CMpxVideoPlayerAppUiEngine::SignalViewPdlReloadingL()
 // -------------------------------------------------------------------------------------------------
 //
-void CMpxVideoPlayerAppUiEngine::SignalViewPdlReloading()
+void CMpxVideoPlayerAppUiEngine::SignalViewPdlReloadingL()
 {
-    MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::SignalViewPdlReloading"));
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::SignalViewPdlReloadingL"));
 
     if ( iViewUtility->ActiveViewType() == TUid::Uid( KMpxPlaybackPluginTypeUid ) )
     {
@@ -1137,5 +1133,50 @@
     }
 }
 
+// -----------------------------------------------------------------------------
+// CMpxVideoPlayerAppUiEngine::ActivateLateConstructTimerL
+// -----------------------------------------------------------------------------
+//
+void CMpxVideoPlayerAppUiEngine::ActivateLateConstructTimerL()
+{
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::ActivateLateConstructTimerL()"));
+	
+    if ( !iConstructTimer )
+    {
+        const TTimeIntervalMicroSeconds32 timeout  = 250000; // 250 ms
+    
+        TCallBack callback ( CMpxVideoPlayerAppUiEngine::LateConstructCallback, this );
+    
+        iConstructTimer = CPeriodic::NewL( CActive::EPriorityIdle );
+
+        iConstructTimer->Start( timeout, 0, callback );
+    }
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CMpxVideoPlayerAppUiEngine::LateConstructCallback
+// -------------------------------------------------------------------------------------------------
+//
+TInt CMpxVideoPlayerAppUiEngine::LateConstructCallback( TAny* aPtr )
+{
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::LateConstructCallback()"));
+    
+    TRAP_IGNORE( static_cast<CMpxVideoPlayerAppUiEngine*>(aPtr)->DoLateConstructL() );
+    
+    return KErrNone;
+}
+
+// -------------------------------------------------------------------------------------------------
+//   CMpxVideoPlayerAppUiEngine::DoLateConstructL
+// -------------------------------------------------------------------------------------------------
+//
+void CMpxVideoPlayerAppUiEngine::DoLateConstructL()
+{
+    MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUiEngine::DoLateConstructL()"));
+
+    iConstructTimer->Cancel(); 
+        
+    PlaybackUtilityL();
+}
 
 // EOF
--- a/videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/src/mpxvideoplayer_appuienginetester.cpp	Fri Mar 12 15:43:00 2010 +0200
+++ b/videoplayerapp/mpxvideoplayer/tsrc/ut_mpxvideoplayertest/src/mpxvideoplayer_appuienginetester.cpp	Mon Mar 15 12:40:47 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: ou1cpsw#21 %
+// Version : %version: e92_22 %
 
 
 #include "mpxvideoplayer_appuienginetester.h"
@@ -601,7 +601,6 @@
     //
     //  We should get 4 callbacks
     //  iViewUtility->PreLoadViewL( PDL View Uid )
-    //  iPlaybackUtility->Utility( Playback Plugin Uid )
     //  iPlaybackUtility->CommandL( EPbCmdStartPd );
     //  iPlaybackUtility->InitL( iFileName );
     //
@@ -611,10 +610,6 @@
     AddExpectedEvent( event );
 
     event = new (ELeave) TCallbackEvent;
-    event->iEvent = EPlaybackUtilityPdlInstance;
-    AddExpectedEvent( event );
-
-    event = new (ELeave) TCallbackEvent;
     event->iEvent      = EPlaybackUtilityStartPdl;
     event->iDownloadId = aDownloadId;
     event->iFileName   = aFileName;