Revision: 201017 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 11 May 2010 16:15:40 +0300
branchRCL_3
changeset 21 55fa1ec415c6
parent 16 7f2b2a65da29
child 23 8f0df5c82986
Revision: 201017 Kit: 201019
mediasettings/mediasettingsapp/conf/mediasettings.confml
mediasettings/mediasettingsapp/conf/mediasettings_101F880B.crml
mediasettings/mediasettingsapp/group/bld.inf
mediasettings/mediasettingsengine/conf/mediasettings.confml
mediasettings/mediasettingsengine/conf/mediasettings_101F880B.crml
mediasettings/mediasettingsengine/group/bld.inf
videocollection/hgmyvideos/inc/vcxhgmyvideoscollectionclient.h
videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h
videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp
videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp
videocollection/mpxmyvideoscollection/inc/vcxmyvideosmdsdb.h
videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsdb.cpp
videoplayback/inc/mpxvideobaseplaybackview.h
videoplayback/inc/mpxvideoplaybackcontrolscontroller.h
videoplayback/inc/mpxvideoplaybackviewfiledetails.h
videoplayback/videohelix/inc/mpxvideoaccessoryobserver.h
videoplayback/videohelix/inc/mpxvideodrmhelper.h
videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h
videoplayback/videohelix/inc/mpxvideoplaybackmode.h
videoplayback/videohelix/inc/mpxvideoplaybackstate.h
videoplayback/videohelix/src/mpxvideoaccessoryobserver.cpp
videoplayback/videohelix/src/mpxvideodrmhelper.cpp
videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp
videoplayback/videohelix/src/mpxvideoplaybackmode.cpp
videoplayback/videohelix/src/mpxvideoplaybackstate.cpp
videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg
videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideodrmhelper_stub.cpp
videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbuttonbar.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp
videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp
videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp
videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp
videoplayback/videoplaybackviews/src/mpxvideoplaybackviewfiledetails.cpp
videoplayer_plat/video_player_file_details_dialog_api/inc/MPFileDetailsDialog.h
Binary file mediasettings/mediasettingsapp/conf/mediasettings.confml has changed
Binary file mediasettings/mediasettingsapp/conf/mediasettings_101F880B.crml has changed
--- a/mediasettings/mediasettingsapp/group/bld.inf	Tue Apr 27 16:40:33 2010 +0300
+++ b/mediasettings/mediasettingsapp/group/bld.inf	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,7 @@
 */
 
 
-// Version : %version:  10 %
+// Version : %version:  11 %
 
 #include <platform_paths.hrh>
 
@@ -31,11 +31,6 @@
 ../rom/mediasettings.iby             CORE_APP_LAYER_IBY_EXPORT_PATH(mediasettings.iby)
 ../rom/mediasettingsresources.iby    LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(mediasettingsresources.iby)
 
-// Generic configuration interface for component cenrep settings  
-// mediasettings_101F880B implementation specifics for cenrep data
-../conf/mediasettings.confml              APP_LAYER_CONFML(mediasettings.confml)
-../conf/mediasettings_101F880B.crml 	  APP_LAYER_CRML(mediasettings_101F880B.crml)
-
 PRJ_EXTENSIONS
 START EXTENSION s60/mifconv
 OPTION TARGETFILE mediasettings.mif
Binary file mediasettings/mediasettingsengine/conf/mediasettings.confml has changed
Binary file mediasettings/mediasettingsengine/conf/mediasettings_101F880B.crml has changed
--- a/mediasettings/mediasettingsengine/group/bld.inf	Tue Apr 27 16:40:33 2010 +0300
+++ b/mediasettings/mediasettingsengine/group/bld.inf	Tue May 11 16:15:40 2010 +0300
@@ -16,7 +16,7 @@
 
 
 
-// Version : %version: 7 %
+// Version : %version: 8 %
 
 #include <platform_paths.hrh>
 
@@ -30,6 +30,11 @@
 ../rom/mpsettropmodel.iby      	CORE_APP_LAYER_IBY_EXPORT_PATH(mpsettropmodel.iby)
 ../rom/mpsettropmodelrsc.iby    CORE_APP_LAYER_IBY_EXPORT_PATH(mpsettropmodelrsc.iby)
 
+// Generic configuration interface for component cenrep settings  
+// mediasettings_101F880B implementation specifics for cenrep data
+../conf/mediasettings.confml              APP_LAYER_CONFML(mediasettings.confml)
+../conf/mediasettings_101F880B.crml 	  APP_LAYER_CRML(mediasettings_101F880B.crml)
+
 PRJ_MMPFILES
 ../group/MPSettROPModel.mmp
 
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideoscollectionclient.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideoscollectionclient.h	Tue May 11 16:15:40 2010 +0300
@@ -380,6 +380,11 @@
          * Variable for storing pending collection command.
          */
         TVcxHgMyVideosCollectionCommand iPendingCommand;
+
+		/**
+		 * Variable for storing current collection level.
+		 */
+        TInt iCollectionLevel;
         
 #if defined(_DEBUG) && IPTV_LOGGING_METHOD != 0
     private:
--- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h	Tue May 11 16:15:40 2010 +0300
@@ -477,9 +477,9 @@
         TBool ValidOrigin( CMPXMedia& aMedia );
 
         /** 
-         * Saves MPX id of highlighted item.
+         * Saves MPX id of first (topmost) visible item.
          */
-        void SaveHighlightedItemIdL();
+        void SaveFirstListItemIdL();
 
         /**
          * Update scrollbar strip type depending on sort order
@@ -576,15 +576,15 @@
         TInt iCurrentCategoryIndex;
 
         /**
-         * Flag for indicating that highlight should restore to the position
+         * Flag for indicating that list should restore to the position
          * where it was before model deactivating. 
          */ 
-        TBool iRestoreHighlightPosition;
+        TBool iRestoreListPosition;
         
         /**
-         * MPX id of highlighted item in a video list.
+         * MPX id of first (topmost) visible item in a video list.
          */
-        TMPXItemId iHighlightedItemId;
+        TMPXItemId iFirstListItemId;
 
         /**
          * Downloading has been resumed for these MPX IDs. Needed for showing
--- a/videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp	Tue May 11 16:15:40 2010 +0300
@@ -60,7 +60,8 @@
 //
 CVcxHgMyVideosCollectionClient::CVcxHgMyVideosCollectionClient()
   : iCollectionOpenStatus( EVcxHgCollectionNotOpen ),
-    iPendingCommand( EVcxHgMyVideosCollectionCommandNone )
+    iPendingCommand( EVcxHgMyVideosCollectionCommandNone ),
+    iCollectionLevel( KErrNotFound ) 
     {
     }
 
@@ -185,7 +186,11 @@
         }
     else
         {
-        if ( CollectionLevelL() == KVcxMpxLevelVideos )
+        if ( iCollectionLevel == KErrNotFound )
+            {
+            iCollectionLevel = CollectionLevelL();
+            }
+        if ( iCollectionLevel == KVcxMpxLevelVideos )
             {
             iCollectionUtility->Collection().BackL();
             }
@@ -201,13 +206,15 @@
     IPTVLOGSTRING2_LOW_LEVEL( 
         "MPX My Videos UI # GetVideoListL(%d)", aIndex );
 
-    TInt collectionLevel = CollectionLevelL();
-
-    if ( collectionLevel == KVcxMpxLevelCategories )
+    if ( iCollectionLevel == KErrNotFound )
+        {
+        iCollectionLevel = CollectionLevelL();
+        }
+    if ( iCollectionLevel == KVcxMpxLevelCategories )
         {    
         iCollectionUtility->Collection().OpenL( aIndex );
         }
-    else if ( collectionLevel == KVcxMpxLevelVideos )
+    else if ( iCollectionLevel == KVcxMpxLevelVideos )
         {
         iCollectionUtility->Collection().BackL();
         iCollectionUtility->Collection().OpenL( aIndex );
@@ -568,6 +575,7 @@
                                 }
                             iCollectionUtility->Collection().OpenL();
                             }
+                        iCollectionLevel = CollectionLevelL();
                         }
                         break;                        
                     case TMPXCollectionMessage::ECollectionChanged:
--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp	Tue May 11 16:15:40 2010 +0300
@@ -113,7 +113,7 @@
       iView( aView ),
       iScroller( aScroller ),
       iCurrentCategoryIndex( KErrNotFound ),
-      iRestoreHighlightPosition( EFalse )
+      iRestoreListPosition( EFalse )
     {
     }
 
@@ -188,19 +188,20 @@
     iModel.CollectionClient().SetVideoModelObserver( NULL );
     iScroller.DisableScrollBuffer();
 
-    TRAP_IGNORE( SaveHighlightedItemIdL() );
+    TRAP_IGNORE( SaveFirstListItemIdL() );
 
     IPTVLOGSTRING_LOW_LEVEL( 
         "MPX My Videos UI # CVcxHgMyVideosVideoModelHandler::DoModelDeactivate() - Exit" );    
     }
 
 // -----------------------------------------------------------------------------
-// CVcxHgMyVideosVideoModelHandler::SaveHighlightedItemIdL()
+// CVcxHgMyVideosVideoModelHandler::SaveFirstListItemIdL()
 // -----------------------------------------------------------------------------
 //
-void CVcxHgMyVideosVideoModelHandler::SaveHighlightedItemIdL()
+void CVcxHgMyVideosVideoModelHandler::SaveFirstListItemIdL()
     {
-    iHighlightedItemId = iVideoArray->ArrayIndexToMpxItemIdL( Highlight() );
+    iFirstListItemId = iVideoArray->ArrayIndexToMpxItemIdL(
+            iScroller.FirstIndexOnScreen() );
     }
 
 // -----------------------------------------------------------------------------
@@ -216,8 +217,8 @@
 
     // If we are re-opening the same video list again, then try 
     // restore the highlight to previous position.
-    aCategoryIndex == iCurrentCategoryIndex ? iRestoreHighlightPosition = ETrue :
-                                              iRestoreHighlightPosition = EFalse;
+    aCategoryIndex == iCurrentCategoryIndex ? iRestoreListPosition = ETrue :
+                                              iRestoreListPosition = EFalse;
     // Removes videos from video list.
     iVideoArray->RemoveVideoList();
          
@@ -1214,15 +1215,16 @@
         {
         ResizeScrollerL( videoCount );
 
-        TInt highlight( KErrNotFound );
+        TInt firstItemIndex( KErrNotFound );
 
-        if ( iRestoreHighlightPosition )
+        if ( iRestoreListPosition )
             {
-            highlight = iVideoArray->IndexByMPXItemId( iHighlightedItemId );
+            firstItemIndex = iVideoArray->IndexByMPXItemId( iFirstListItemId );
             }
         
-        highlight != KErrNotFound ? iScroller.SetSelectedIndex( highlight ) :
-                                    iScroller.SetSelectedIndex( 0 );
+        IPTVLOGSTRING2_LOW_LEVEL( "CVcxHgMyVideosVideoModelHandler::NewVideoListL() Setting list position first index = %d", firstItemIndex );
+        firstItemIndex != KErrNotFound ? iScroller.SetFirstIndexOnScreen( firstItemIndex ) :
+                                    iScroller.SetFirstIndexOnScreen( 0 );
         }
     else
         {
--- a/videocollection/mpxmyvideoscollection/inc/vcxmyvideosmdsdb.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/inc/vcxmyvideosmdsdb.h	Tue May 11 16:15:40 2010 +0300
@@ -25,10 +25,86 @@
 #include <mdequery.h>
 #include <harvesterclient.h>
 #include <mpxcollectionmessagedefs.h>
+#include <e32property.h>
+
+const TUid KHarvesterPSShutdown = { 0x200009F5 } ;
+const TInt KMdSShutdown = 0x00000002; // values 1 = shutdown, 0 = restart, normal state
+
+static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
+static _LIT_SECURITY_POLICY_C1(KPowerMgmtPolicy,ECapabilityPowerMgmt);
 
 class CRepository;
 
 /**
+ * PSCW Listener Observer interface for signaling that MDS has Shutdown/restarted
+ */
+class MVcxMdsShutdownMonitorObserver
+    {
+public:
+
+    virtual void ShutdownNotification( TInt aShutdownState ) = 0;
+    };
+
+/**
+ *  Active object for observing P&S keys
+ */
+class CVcxMdsShutdownMonitor: public CActive
+    {
+public:
+
+    /**
+     * Two-phased constructor.
+     *
+     * @return Instance of CVcxMdsShutdownMonitor.
+     */
+    static CVcxMdsShutdownMonitor* NewL( MVcxMdsShutdownMonitorObserver& aObserver,
+            const TUid& aKeyCategory, const TInt aPropertyKey, TBool aDefineKey);
+
+    /**
+     * Destructor
+     */
+    virtual ~CVcxMdsShutdownMonitor();
+    
+protected:
+
+    /**
+     * Handles an active object's request completion event.
+     */
+    void RunL();
+
+    /**
+     * Implements cancellation of an outstanding request.
+     */
+    void DoCancel();
+
+private:
+
+    /**
+     * C++ default constructor
+     *
+     * @return Instance of CVcxMdsShutdownMonitor.
+     */
+    CVcxMdsShutdownMonitor( MVcxMdsShutdownMonitorObserver& aObserver,
+            const TUid& aKeyCategory, const TInt iPropertyKey, TBool aDefineKey );
+
+    /**
+     * Symbian 2nd phase constructor can leave.
+     */
+    void ConstructL();
+
+private:
+    
+    // not own
+    MVcxMdsShutdownMonitorObserver& iObserver;
+    
+    const TUid& iKeyCategory;
+    RProperty iProperty;
+    TInt iPropertyKey;
+    
+    TBool iDefineKey;
+};
+
+/**
  *  MPX My Videos collection MDS database observer class.
  *  Part of ECOM Plugin.
  */
@@ -86,7 +162,8 @@
                                 public MMdESessionObserver,
                                 public MMdEQueryObserver,
                                 public MMdEObjectObserver,
-                                public MMdEObjectPresentObserver
+                                public MMdEObjectPresentObserver,
+                                public MVcxMdsShutdownMonitorObserver
     {
         
 public:
@@ -166,6 +243,8 @@
      */
     CMPXMedia* CreateVideoL( TUint32 aId, TBool aFullDetails = ETrue );
 
+protected: // from base classes
+    
 // from MMdESessionObserver
 
 	/**
@@ -222,7 +301,6 @@
 
 
 // from MMdEObjectObserver
-
     void HandleObjectNotification( CMdESession& aSession,
             TObserverNotificationType aType,
             const RArray<TItemId>& aObjectIdArray);
@@ -230,6 +308,10 @@
 // from MMdEObjectPresentObserver
     void HandleObjectPresentNotification(CMdESession& aSession, 
 			TBool aPresent, const RArray<TItemId>& aObjectIdArray);
+
+// from MVcxMdsShutdownMonitorObserver
+    void ShutdownNotification( TInt aShutdownState );
+    
 private:
 
     /**
@@ -315,6 +397,17 @@
      * @param aObject Creation date is written here.
      */
     void SetCreationDateToObjectL( const CMPXMedia& aVideo, CMdEObject& aObject );
+    
+    /**
+     * Opens MDS session.
+     */
+    void OpenMdsSessionL();
+    
+    /**
+    * @return MDS session.
+    */
+    CMdESession& MdsSessionL();
+
 public:
 
     /**
@@ -328,12 +421,12 @@
     /**
      * The MDS session object. Own.
      */
-    CMdESession* iMDSSession;
+    CMdESession* iMdsSession;
 
     /**
-     * The error code saved from the callbacks.
+     * The error code of last iMDSSession operation. 
      */
-    TInt iMDSError;
+    TInt iMdsSessionError;
 
     /**
     * Asynchronous video list fetching query is stored here.
@@ -517,6 +610,12 @@
      * Cenrep session.
      */
     CRepository* iRepository;
+    
+    /**
+    * Monitors Mds server shutdown states.
+    */
+    CVcxMdsShutdownMonitor* iMdsShutdownMonitor;
+    
     };
 
 #endif // VCXMYVIDEOSMDSDB_H
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsdb.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosmdsdb.cpp	Tue May 11 16:15:40 2010 +0300
@@ -65,6 +65,101 @@
 
 
 // ---------------------------------------------------------------------------
+// CVcxMdsShutdownMonitor::NewL()
+// ---------------------------------------------------------------------------
+//
+CVcxMdsShutdownMonitor* CVcxMdsShutdownMonitor::NewL( MVcxMdsShutdownMonitorObserver& aObserver,
+                                                const TUid& aKeyCategory,
+                                                const TInt aPropertyKey,
+                                                TBool aDefineKey)
+    {
+    CVcxMdsShutdownMonitor* self = new( ELeave )CVcxMdsShutdownMonitor( aObserver, 
+                                                                  aKeyCategory,
+                                                                  aPropertyKey,
+                                                                  aDefineKey);
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CVcxMdsShutdownMonitor::CVcxMdsShutdownMonitor()
+// ---------------------------------------------------------------------------
+//
+CVcxMdsShutdownMonitor::CVcxMdsShutdownMonitor( MVcxMdsShutdownMonitorObserver& aObserver,
+                                          const TUid& aKeyCategory,
+                                          const TInt aPropertyKey,
+                                          TBool aDefineKey)
+    : CActive( CActive::EPriorityStandard ), iObserver( aObserver ),
+      iKeyCategory( aKeyCategory ), iPropertyKey(aPropertyKey), iDefineKey( aDefineKey )
+    {   
+    CActiveScheduler::Add( this );
+    }
+
+// ---------------------------------------------------------------------------
+// CVcxMdsShutdownMonitor::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CVcxMdsShutdownMonitor::ConstructL()
+    { 
+    // define P&S property types
+    if ( iDefineKey )
+        {
+        RProperty::Define( iKeyCategory, iPropertyKey,
+                          RProperty::EInt, KAllowAllPolicy, KPowerMgmtPolicy );
+        }
+    
+    // attach to the property
+    TInt err = iProperty.Attach( iKeyCategory, iPropertyKey,EOwnerThread );
+    User::LeaveIfError( err );
+    
+    // wait for the previously attached property to be updated
+    iProperty.Subscribe( iStatus );
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+// CVcxMdsShutdownMonitor::~CVcxMdsShutdownMonitor()
+// ---------------------------------------------------------------------------
+//
+CVcxMdsShutdownMonitor::~CVcxMdsShutdownMonitor()
+    {
+    Cancel();
+    iProperty.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CVcxMdsShutdownMonitor::RunL()
+// ---------------------------------------------------------------------------
+//
+void CVcxMdsShutdownMonitor::RunL()
+    {
+    // resubscribe before processing new value to prevent missing updates
+    iProperty.Subscribe( iStatus );
+    SetActive();
+    
+    // retrieve the value
+    TInt value = 0;
+    TInt err = iProperty.Get( value );
+    MPX_DEBUG2("CVcxMyVideosMdsDb::RunL(): iProperty.Get(value); returns %d", err);
+    
+    User::LeaveIfError( err );
+
+    iObserver.ShutdownNotification( value );    
+    }
+
+// ---------------------------------------------------------------------------
+// CVcxMdsShutdownMonitor::DoCancel()
+// ---------------------------------------------------------------------------
+//
+void CVcxMdsShutdownMonitor::DoCancel()
+    {
+    iProperty.Cancel();
+    }
+
+// ---------------------------------------------------------------------------
+// CVcxMyVideosMdsDb::CVcxMyVideosMdsDb
 // ---------------------------------------------------------------------------
 //
 CVcxMyVideosMdsDb::CVcxMyVideosMdsDb( MVcxMyVideosMdsDbObserver* aObserver, RFs& aFs )
@@ -73,58 +168,70 @@
     }
 
 // ---------------------------------------------------------------------------
+// CVcxMyVideosMdsDb::ConstructL
 // ---------------------------------------------------------------------------
 //
 void CVcxMyVideosMdsDb::ConstructL()
     {
-    MPX_FUNC( "CVcxMyVideosMdsDb::ConstructL" );
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::ConstructL start" );
 
     iActiveSchedulerWait = new (ELeave) CActiveSchedulerWait;
     
-    MPX_DEBUG1( "CVcxMyVideosMdsDb::ConstructL CMdESession::NewL" );
+    OpenMdsSessionL();
+
+    iMdsShutdownMonitor = CVcxMdsShutdownMonitor::NewL(
+            *this, KHarvesterPSShutdown, KMdSShutdown, EFalse );
+        
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::ConstructL exit" );
+    }
 
-    //  Create session
-    iMDSError = KErrNone;
+// ---------------------------------------------------------------------------
+// CVcxMyVideosMdsDb::OpenMdsSessionL
+// ---------------------------------------------------------------------------
+//
+void CVcxMyVideosMdsDb::OpenMdsSessionL()
+    {
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::OpenMdsSessionL() start" );
+
+    iMdsSessionError = KErrNone;
 
-    iMDSSession = CMdESession::NewL( *this );
-    if (!iMDSSession)
+    delete iMdsSession;
+    iMdsSession = NULL;
+    iMdsSession = CMdESession::NewL( *this );
+    
+    if ( !iMdsSession )
+        {
+        User::Leave( KErrGeneral );
+        }
+    
+    //  Wait until session opened
+    iActiveSchedulerWait->Start();    
+    MPX_DEBUG1( "CVcxMyVideosMdsDb:: iActiveSchedulerWait->Start done" );
+
+    if ( iMdsSessionError == KErrNone )
         {
-        //  Failed to create session, leave
-        User::Leave( iMDSError );
+        MPX_DEBUG1( "CVcxMyVideosMdsDb:: session opened ok, adding observers" );
+
+        // We order all object notifications. If we set video condition, then we wont
+        // receive remove notifications at all (mds feature). Extra notifications
+        // do not bother us much since we try to fetch the item from the db
+        // after the add notification anyways, and then we use video condition.
+        // Eventually extra events are ignored.    
+        iMdsSession->AddObjectObserverL( *this, NULL );
+    
+        iMdsSession->AddObjectPresentObserverL( *this );
+        
+        GetSchemaDefinitionsL();
+        }
+    else
+        {
+        MPX_DEBUG2( "CVcxMyVideosMdsDb:: session opening failed: %d", iMdsSessionError );
+        iMdsSessionError = KErrGeneral; // this ensures that next time when mds is tried to use, it tries to open session again
+        delete iMdsSession;
+        iMdsSession = NULL;        
         }
 
-    //  Wait until session opened
-    iActiveSchedulerWait->Start();
-
-    MPX_DEBUG1( "CVcxMyVideosMdsDb::ConstructL iActiveSchedulerWait->Start done" );
-
-    if ( iMDSError != KErrNone )
-        {
-        MPX_DEBUG2("Failed to create session to MDS: %d", iMDSError);
-        User::LeaveIfError( iMDSError );
-        }
-
-    //  Get the schema definitions
-    iMDSError = KErrNone;
-    GetSchemaDefinitionsL();
-
-    //  Is schema ok
-    if ( iMDSError != KErrNone )
-        {
-        //  Schema not loaded, abort
-        User::Leave( iMDSError );
-        }
-
-    MPX_DEBUG1( "CVcxMyVideosMdsDb::ConstructL Adding observers" );
-
-    // We order all object notifications. If we set video condition, then we wont
-    // receive remove notifications at all (mds feature). Extra notifications
-    // do not bother us much since we try to fetch the item from the db
-    // after the add notification anyways, and then we use video condition.
-    // Eventually extra events are ignored.    
-    iMDSSession->AddObjectObserverL( *this, NULL );
-    
-    iMDSSession->AddObjectPresentObserverL( *this );    
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::OpenMdsSessionL() exit" );
     }
 
 // ---------------------------------------------------------------------------
@@ -181,19 +288,16 @@
 //
 CVcxMyVideosMdsDb::~CVcxMyVideosMdsDb()
     {
-    MPX_FUNC( "CVcxMyVideosMdsDb::~CVcxMyVideosMdsDb()" );
-
-    if ( iMDSSession )
-        {
-        TRAP_IGNORE( iMDSSession->RemoveObjectObserverL( *this ) );        
-        }
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::~CVcxMyVideosMdsDb() start" );
 
     Cancel();
-    
     delete iVideoQuery;
-    delete iMDSSession;
+    delete iMdsSession;
     delete iActiveSchedulerWait;
     delete iRepository;
+    delete iMdsShutdownMonitor;
+
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::~CVcxMyVideosMdsDb() exit" );
     }
 
 // ---------------------------------------------------------------------------
@@ -202,13 +306,15 @@
 //
 void CVcxMyVideosMdsDb::Cancel()
     {
-    MPX_FUNC("CVcxMyVideosMdsDb::Cancel()");
+    MPX_DEBUG1("CVcxMyVideosMdsDb::Cancel() start");
     
     if ( iVideoQuery )
         {
         iVideoQuery->Cancel();
         }
     iVideoListFetchingIsOngoing = EFalse;
+
+    MPX_DEBUG1("CVcxMyVideosMdsDb::Cancel() exit");
     }
     
 // ---------------------------------------------------------------------------
@@ -219,15 +325,9 @@
         CMPXMedia& aVideo, 
         TUint32& aMdsId )
     {
-    MPX_FUNC( "CVcxMyVideosMdsDb::AddVideoL" );
-
-    if ( !iMDSSession )
-        {
-        MPX_DEBUG2("CVcxMyVideosMdsDb:: no mds session(%d), leaving", iMDSError);
-        User::Leave( iMDSError );
-        }
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::AddVideoL() start" );
          
-    CMdEObject* object = iMDSSession->NewObjectLC(
+    CMdEObject* object = MdsSessionL().NewObjectLC(
             *iVideoObjectDef, aVideo.ValueText( KMPXMediaGeneralUri ) ); // 1->
 
     // Value from aVideo is taken in use in Media2ObjectL if aVideo contains creation date
@@ -255,11 +355,11 @@
         }
 
     Media2ObjectL( aVideo, *object );
-    TRAPD( err, aMdsId = iMDSSession->AddObjectL( *object ) );
+    TRAPD( err, aMdsId = MdsSessionL().AddObjectL( *object ) );
 
     if ( err != KErrNone )
         {
-        MPX_DEBUG2( "CVcxMyVideosMdsDb:: iMDSSession->AddObjectL leaved with error: %d", err );
+        MPX_DEBUG2( "CVcxMyVideosMdsDb:: MdsSessionL().AddObjectL leaved with error: %d", err );
         User::Leave( err );
         }
         
@@ -275,6 +375,7 @@
 
     CleanupStack::PopAndDestroy( object ); // <-1
 
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::AddVideoL() exit" );
     }
 
 // ---------------------------------------------------------------------------
@@ -283,20 +384,14 @@
 //
 TInt CVcxMyVideosMdsDb::RemoveVideo( TUint32 aMdsId )
     {
-    MPX_FUNC( "CVcxMyVideosMdsDb::RemoveVideoL" );
-
-    if ( !iMDSSession )
-        {
-        MPX_DEBUG2("CVcxMyVideosMdsDb:: no mds session, returning %d", iMDSError);
-        return iMDSError;
-        }
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::RemoveVideoL() start" );
 
     TInt retValue( KErrNone );
     TItemId id( 0 ); //init to avoid warning
 
     MPX_DEBUG2( "CVcxMyVideosMdsDb:: removing object %d", aMdsId );
     
-    TRAPD( err,  id = iMDSSession->RemoveObjectL( aMdsId ) );
+    TRAPD( err,  id = MdsSessionL().RemoveObjectL( aMdsId ) );
 
     if ( err == KErrNone )
         {
@@ -312,10 +407,11 @@
         }
     else
         {
-        MPX_DEBUG2( "CVcxMyVideosMdsDb:: iMDSSession->RemoveObjectL left: %d", err );
+        MPX_DEBUG2( "CVcxMyVideosMdsDb:: MdsSessionL().RemoveObjectL left: %d", err );
         retValue = err;        
         }
-        
+
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::RemoveVideoL() exit" );        
     return retValue;
     }
 
@@ -325,20 +421,14 @@
 //
 void CVcxMyVideosMdsDb::UpdateVideoL( CMPXMedia& aVideo )
     {
-    MPX_FUNC( "CVcxMyVideosMdsDb::UpdateVideoL" );
-
-    if ( !iMDSSession )
-        {
-        MPX_DEBUG2("CVcxMyVideosMdsDb:: no mds session(%d), leaving", iMDSError);
-        User::Leave( iMDSError );
-        }
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::UpdateVideoL() start" );
 
     TMPXItemId mpxId = aVideo.ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId );
 
     MPX_DEBUG2("CVcxMyVideosMdsDb::UpdateVideoL updating object %d ", mpxId.iId1);
     
     CMdEObject* object =
-            iMDSSession->OpenObjectL( mpxId.iId1, *iVideoObjectDef );
+            MdsSessionL().OpenObjectL( mpxId.iId1, *iVideoObjectDef );
     if ( object == NULL )
         {
         // No object with this ID was found!
@@ -355,7 +445,7 @@
             
             Media2ObjectL( aVideo, *object );
             
-            iMDSSession->CommitObjectL(*object);
+            MdsSessionL().CommitObjectL(*object);
 
             CleanupStack::PopAndDestroy(object);
             }
@@ -367,6 +457,8 @@
             User::Leave( KErrInUse );
             }
         }
+
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::UpdateVideoL() exit" );
     }
 
 // ---------------------------------------------------------------------------
@@ -376,13 +468,7 @@
 void CVcxMyVideosMdsDb::CreateVideoListL( TVcxMyVideosSortingOrder aSortingOrder,
         TBool aAscending, TBool aFullDetails, CMPXMedia*& aVideoList )
     {
-    MPX_FUNC( "CVcxMyVideosMdsDb::CreateVideoListL" );
-
-    if ( !iMDSSession )
-        {
-        MPX_DEBUG2("CVcxMyVideosMdsDb:: no mds session(%d), leaving", iMDSError);
-        User::Leave( iMDSError );
-        }
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::CreateVideoListL() start" );
         
     if ( iVideoListFetchingIsOngoing )
         {
@@ -400,7 +486,7 @@
     delete iVideoQuery;
     iVideoQuery = NULL;
     
-    iVideoQuery = iMDSSession->NewObjectQueryL(
+    iVideoQuery = MdsSessionL().NewObjectQueryL(
             *iNamespaceDef,
             *iVideoObjectDef,
             this);
@@ -473,6 +559,8 @@
     aVideoList->SetTObjectValueL( KMPXMediaArrayCount, mediaArray->Count() );
 
     iVideoList = aVideoList; // lets store the pointer, ownership stays at observer
+
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::CreateVideoListL() exit" );
     }
 
 // ---------------------------------------------------------------------------
@@ -504,7 +592,7 @@
         TInt /*aNewItemCount*/ )
 #endif
     {
-    MPX_FUNC("CVcxMyVideosMdsDb::HandleQueryNewResults()");
+    MPX_DEBUG1("CVcxMyVideosMdsDb::HandleQueryNewResults() start");
     
     if ( !iVideoList )
         {
@@ -536,6 +624,8 @@
     
     iMdsDbObserver->HandleCreateVideoListResp( iVideoList, aFirstNewItemIndex,
             EFalse /* not complete yet */);
+
+    MPX_DEBUG1("CVcxMyVideosMdsDb::HandleQueryNewResults() exit");
     }
 
 
@@ -552,7 +642,7 @@
 #endif
         TInt /*aError*/)
     {
-    MPX_FUNC( "CVcxMyVideosMdsDb::HandleQueryCompleted" );
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::HandleQueryCompleted() start" );
 
     if ( !iVideoList )
         {
@@ -575,6 +665,8 @@
     iVideoListFetchingIsOngoing = EFalse;
     iMdsDbObserver->HandleCreateVideoListResp( iVideoList, KErrNotFound /* KErrNotFound = no new items */,
             ETrue /* complete */);
+
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::HandleQueryCompleted() exit" );
     
     iVideoList = NULL; // not owned by us -> just clear
     }
@@ -585,7 +677,7 @@
 //
 CMPXMedia* CVcxMyVideosMdsDb::CreateVideoL( TUint32 aId, TBool aFullDetails )
     {
-    MPX_FUNC( "CVcxMyVideosMdsDb::CreateVideoL" );
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::CreateVideoL() start" );
 
     CMdEObject* object = ObjectL( aId );
 
@@ -604,6 +696,8 @@
         CleanupStack::PopAndDestroy( object ); // <-1
         }
 
+    MPX_DEBUG1( "CVcxMyVideosMdsDb::CreateVideoL() exit" );
+
     return video;
     }
 
@@ -615,7 +709,7 @@
         CMdESession& /*aSession*/,
         TInt aError)
     {
-    MPX_FUNC( "CVcxMyVideosMdsDb::HandleSessionOpened" );
+    MPX_DEBUG1("CVcxMyVideosMdsDb::HandleSessionOpened() start" );
 
     iActiveSchedulerWait->AsyncStop();
 
@@ -623,10 +717,10 @@
         {
         MPX_DEBUG2( "CVcxMyVideosMdsDb::HandleSessionOpened: %d", aError );
 
-        iMDSError = aError;
-        delete iMDSSession;
-        iMDSSession = NULL;
+        iMdsSessionError = aError;
         }
+        
+    MPX_DEBUG1("CVcxMyVideosMdsDb::HandleSessionOpened() exit" );
     }
 
 // ---------------------------------------------------------------------------
@@ -637,7 +731,7 @@
         CMdESession& /*aSession*/,
         TInt aError)
     {
-    MPX_FUNC( "CVcxMyVideosMdsDb::HandleSessionError" );
+    MPX_DEBUG1("CVcxMyVideosMdsDb::HandleSessionError() start" );
 
     if (iActiveSchedulerWait->IsStarted())
         {
@@ -649,17 +743,15 @@
         {
         MPX_DEBUG1( "CVcxMyVideosMdsDb:: Videolist fetching was going on");
         iVideoListFetchingIsOngoing = EFalse;
-//        delete iVideoQuery;
-//        iVideoQuery = NULL;
         iMdsDbObserver->HandleCreateVideoListResp( iVideoList, -1 /* -1 = no new items */,
                 ETrue /* complete */);
         }
         
     MPX_DEBUG2( "CVcxMyVideosMdsDb::HandleSessionError: %d", aError );
 
-    iMDSError = aError;
-    delete iMDSSession;
-    iMDSSession = NULL;
+    iMdsSessionError = aError;
+
+    MPX_DEBUG1("CVcxMyVideosMdsDb::HandleSessionError() exit" );
     }
 
 // ---------------------------------------------------------------------------
@@ -671,7 +763,7 @@
         TObserverNotificationType aType,
         const RArray<TItemId>& aObjectIdArray)
     {
-    TRAP( iMDSError, DoHandleObjectNotificationL( aType, aObjectIdArray ));
+    TRAP_IGNORE( DoHandleObjectNotificationL( aType, aObjectIdArray ));
     }
     
 // ---------------------------------------------------------------------------
@@ -680,20 +772,17 @@
 //
 CMdEObject* CVcxMyVideosMdsDb::ObjectL( const TItemId aId )
     {
-    if ( !iMDSSession )
-        {
-        MPX_DEBUG2("CVcxMyVideosMdsDb:: no mds session(%d), leaving", iMDSError);
-        User::Leave( iMDSError );
-        }
+    MPX_DEBUG1("CVcxMyVideosMdsDb::ObjectL start");
 
     //  If the id is not valid, just return NULL, because
-    //  iMDSSession->GetObjectL leaves in that case
+    //  MdsSessionL().GetObjectL leaves in that case
     if ( aId == KNoId )
         {
         return NULL;
         }
 
-    CMdEObject* object = iMDSSession->GetObjectL( aId, *iVideoObjectDef );
+    CMdEObject* object = NULL;
+    object = MdsSessionL().GetObjectL( aId, *iVideoObjectDef );
 
     if ( object )
         {
@@ -704,6 +793,7 @@
         MPX_DEBUG2( "CVcxMyVideosMdsDb::ObjectL not found, id: %d", aId );
         }
 
+    MPX_DEBUG1("CVcxMyVideosMdsDb::ObjectL exit");
     return object;
     }
 
@@ -878,13 +968,10 @@
     if ( aObject.Property( *iOriginPropertyDef, property, 0 ) != KErrNotFound )
         {
         TUint8 origin = static_cast<CMdEUint8Property*>(property)->Value();
-        if ( origin == EVcxMyVideosOriginDownloaded ||
-                origin == EVcxMyVideosOriginSideLoaded ||
-                origin == EVcxMyVideosOriginTvRecording )
+        if( origin != EVcxMyVideosOriginCapturedWithCamera )
             {
             origin = EVcxMyVideosOriginOther;
-            }
-                
+            }           
         aVideo.SetTObjectValueL<TUint8>( KVcxMediaMyVideosOrigin, origin );
         }
 
@@ -1416,7 +1503,7 @@
     MPX_FUNC( "CVcxMyVideosMdsDb::GetSchemaDefinitionsL" );
 
     //  Namespace
-    iNamespaceDef = &(iMDSSession->GetDefaultNamespaceDefL());
+    iNamespaceDef = &(MdsSessionL().GetDefaultNamespaceDefL());
     
     //  Default object definitions
     iVideoObjectDef = &(iNamespaceDef->GetObjectDefL( KVcxVideoObjectName ));
@@ -1533,3 +1620,52 @@
     aObject.AddInt16PropertyL( *iTimeOffsetPropertyDef, timeOffset.Int() / secondsInMinute );
     aObject.AddTimePropertyL( *iLastModifiedDatePropertyDef, localTime );
     }
+
+// ---------------------------------------------------------------------------
+// CVcxMyVideosMdsDb::MdsSessionL
+// ---------------------------------------------------------------------------
+//
+CMdESession& CVcxMyVideosMdsDb::MdsSessionL()
+    {
+    if ( iMdsSessionError == KErrServerTerminated )
+        {
+        // This ensures that the iMdsSessionError KErrServerTerminated
+        // value does not change, since the user can't access iMdsSession.
+        // Recovery happens in ShutDownNotification func.
+        User::Leave( KErrServerTerminated );
+        }
+
+    if ( !iMdsSession )
+        {
+        OpenMdsSessionL();
+        
+        if ( !iMdsSession )
+            {
+            User::Leave( KErrGeneral );
+            }
+        }
+
+    return *iMdsSession;
+    }
+
+// ---------------------------------------------------------------------------
+// CVcxMyVideosMdsDb::ShutdownNotification
+// From MVcxMdsShutDownMonitorObserver
+// ---------------------------------------------------------------------------
+//    
+void CVcxMyVideosMdsDb::ShutdownNotification( TInt aShutdownState )
+    {
+    if ( aShutdownState == 0 )
+        {
+        // Server has restarted, recreate session.
+        MPX_DEBUG1("CVcxMyVideosMdsDb:: MDS Server restarted!");
+        OpenMdsSessionL();
+        return;
+        }
+        
+    if ( aShutdownState == 1 )
+        {
+        MPX_DEBUG1("CVcxMyVideosMdsDb:: MDS Server went down!");
+        iMdsSessionError = KErrServerTerminated;
+        }
+    }
--- a/videoplayback/inc/mpxvideobaseplaybackview.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/inc/mpxvideobaseplaybackview.h	Tue May 11 16:15:40 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 21 %
+// Version : %version: 22 %
 
 
 // This file defines the API for VideoBasePlaybackView.dll
@@ -383,6 +383,8 @@
         TBool                               iPdlReloading;
         TBool                               iRealOneDelayedPlay;
         TBool                               iKeyboardInFocus;
+
+        HBufC*                              iClipName;
 };
 
 #endif  // __VIDEOBASEPLAYBACKVIEW_H__
--- a/videoplayback/inc/mpxvideoplaybackcontrolscontroller.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/inc/mpxvideoplaybackcontrolscontroller.h	Tue May 11 16:15:40 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: e003sa33#14 %
+// Version : %version: 15 %
 
 
 #ifndef MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_
@@ -107,11 +107,6 @@
         */
         inline TBool IsTvOutConnected();
 
-        /*
-         * Return ETrue if TV-out cable is connected and content can be played
-         */
-        inline TBool IsTvOutPlaybackAllowed();
-
         /**
         * Reset or cancel timers for the controls
         */
@@ -313,9 +308,7 @@
         /**
         * Handle tvout connected/disconnected event
         */
-        void HandleTvOutEventL( TBool aConnected,
-                                TMPXVideoPlaybackControlCommandIds aEvent,
-                                TInt aValue );
+        void HandleTvOutEventL( TBool aConnected, TMPXVideoPlaybackControlCommandIds aEvent );
         /**
         * Handle softkey pressed event
         */
@@ -411,14 +404,6 @@
 }
 
 inline
-TBool CMPXVideoPlaybackControlsController::IsTvOutPlaybackAllowed()
-{
-    TBool playable = ( ! iFileDetails->iTvOutConnected || iFileDetails->iTvOutPlayAllowed );
-    MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::IsTvOutPlaybackAllowed() [%d]"), playable);
-    return playable;
-}
-
-inline
 TBool CMPXVideoPlaybackControlsController::IsRealMediaFormat()
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::IsRealFormat() [%d]"), iRNFormat);
--- a/videoplayback/inc/mpxvideoplaybackviewfiledetails.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/inc/mpxvideoplaybackviewfiledetails.h	Tue May 11 16:15:40 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: e003sa33#13 %
+// Version : %version: 14 %
 
 
 #ifndef __MPXVIDEOPLAYBACKVIEWFILEDETAILS__
@@ -51,13 +51,13 @@
         * @return generated file name, ownership is transferred
         */
         IMPORT_C HBufC* GenerateFileNameL();
-        
+
         /**
          * Parse file title
          * if title exists, then use it as title content directly.
          * if title is null, then for streaming/live streaming clip,
          * parse its file name as title content.
-         * 
+         *
          * @return  generated file title, ownership is transferred
          */
         IMPORT_C HBufC* GenerateFileTitleL();
@@ -84,7 +84,6 @@
         TBool          iVideoEnabled;
         TBool          iPartialPlayback;
         TBool          iTvOutConnected;
-        TBool          iTvOutPlayAllowed;
         TBool          iDrmProtected;
 
         TInt           iVideoHeight;
--- a/videoplayback/videohelix/inc/mpxvideoaccessoryobserver.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoaccessoryobserver.h	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 6 %
+// Version : %version: 7 %
 
 
 
@@ -65,14 +65,6 @@
          */
         TBool IsTvOutConnected();
 
-        /*
-         *  Returns if the playback is allowed when the TV-Out cable is connected
-         *  @return  playback is allowed
-         *     ETrue    playback is allowed.
-         *     EFalse   playback is not allowed.
-         */
-        TBool IsTvOutPlaybackAllowed();
-
     private:
 
         /*
@@ -133,7 +125,6 @@
 
         CMPXVideoPlaybackController*        iController;
         TBool                               iTvOutConnected;
-        TBool                               iTvOutPlaybackAllowed;
 
 #ifdef __ACCESSORY_FW
         RAccessoryServer                    iServer;
--- a/videoplayback/videohelix/inc/mpxvideodrmhelper.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideodrmhelper.h	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,9 @@
 *
 */
 
-// Version : %version: 5 %
+
+// Version : %version: 6 %
+
 
 #ifndef __MPXVIDEODRMHELPER_H__
 #define __MPXVIDEODRMHELPER_H__
@@ -52,13 +54,10 @@
 
         TInt GetDrmRightsStatus( RFile& aFile );
 
-        TBool IsTvOutAllowedL( RFile& aFile );
-
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
-        TBool IsProtected64L( RFile64& aFile );       
+        TBool IsProtected64L( RFile64& aFile );
         TInt GetDrmRightsStatus64( RFile64& aFile );
-        TBool IsTvOutAllowed64L( RFile64& aFile );
 
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
--- a/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h	Tue May 11 16:15:40 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 24 %
+// Version : %version: 25 %
 
 
 #ifndef _CMPXVIDEOPLAYBACKCONTROLLER_H_
@@ -186,7 +186,7 @@
         CHWRMLight* GetLightsL();
         void ReleaseLights();
 
-        void SendTvOutEventL( TBool aConnected, TBool aPlaybackAllowed );
+        void SendTvOutEventL( TBool aConnected );
 
     protected:
 
--- a/videoplayback/videohelix/inc/mpxvideoplaybackmode.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackmode.h	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 14 %
+
+// Version : %version: 15 %
 
 
 #ifndef _CMPXVIDEOPLAYBACKMODE_H_
@@ -68,7 +69,6 @@
         virtual void HandleBackground();
         virtual TBool IsNetworkMode2GL();
         virtual TBool CanPlayNow();
-        virtual TBool IsTvOutAllowedL();
         virtual void OpenFileL( const TDesC& aMediaFile );
         virtual void OpenFileL( const RFile& aMediaFile );
 
@@ -129,7 +129,6 @@
         inline virtual TInt GetMode();
         virtual TBool CanPlayNow();
         virtual void HandleOpenComplete();
-        TBool IsTvOutAllowedL();
         void OpenFileL( const TDesC& aMediaFile );
         virtual void HandlePause();
 };
--- a/videoplayback/videohelix/inc/mpxvideoplaybackstate.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/inc/mpxvideoplaybackstate.h	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,8 @@
  *
 */
 
-// Version : %version: 17 %
+
+// Version : %version: 18 %
 
 
 #ifndef _CMPXVIDEOPLAYBACKSTATE_H_
@@ -48,7 +49,6 @@
  */
 NONSHARABLE_CLASS( CMPXVideoPlaybackState ) : public CBase
 {
-
     public:
         //
         //  Constructors and destructor
@@ -104,6 +104,8 @@
 
         virtual void ResolveTimeoutError( TInt aError );
 
+        virtual void UpdateSeekableL( CMPXCommand& aCmd );
+
         //
         // Set aspect ratio to mmf controller
         //
@@ -165,9 +167,9 @@
         virtual void HandleBackground();
         virtual void HandleForeground();
         virtual void HandlePlay();
+        virtual void UpdateSeekableL( CMPXCommand& aCmd );
 
         inline virtual TMPXVideoPlaybackState GetState();
-
 };
 
 
--- a/videoplayback/videohelix/src/mpxvideoaccessoryobserver.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoaccessoryobserver.cpp	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,7 @@
  *
 */
 
-// Version : %version: 8 %
+// Version : %version: 9 %
 
 //
 //  INCLUDE FILES
@@ -84,7 +84,6 @@
     : CActive( CActive::EPriorityStandard )
     , iController( aController )
     , iTvOutConnected( EFalse )
-    , iTvOutPlaybackAllowed( ETrue )
 {
     CActiveScheduler::Add( this );
 }
@@ -180,19 +179,6 @@
     if ( iTvOutConnected != tvOutConnected )
     {
         iTvOutConnected = tvOutConnected;
-
-        if ( iTvOutConnected ) 
-        {
-            //
-            //  Check the playablility of the clip
-            //
-            iTvOutPlaybackAllowed = iController->iPlaybackMode->IsTvOutAllowedL();
-        }
-        else
-        {
-            iTvOutPlaybackAllowed = ETrue;
-        }
-
         statusChanged   = ETrue;
     }
 
@@ -275,16 +261,4 @@
     return iTvOutConnected;
 }
 
-// -------------------------------------------------------------------------------------------------
-//   CMPXVideoAccessoryObserver::IsTvOutPlaybackAllowed
-// -------------------------------------------------------------------------------------------------
-//
-TBool CMPXVideoAccessoryObserver::IsTvOutPlaybackAllowed()
-{
-    TBool playAllowed = ( ! iTvOutConnected || iTvOutPlaybackAllowed );
-    MPX_DEBUG(_L("CMPXVideoAccessoryObserver::IsTvOutPlaybackAllowed(%d)"), playAllowed);
-
-    return playAllowed;
-}
-
 //  End of File
--- a/videoplayback/videohelix/src/mpxvideodrmhelper.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideodrmhelper.cpp	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 8 %
+
+// Version : %version: 9 %
 
 
 #include <caf/data.h>
@@ -110,41 +111,6 @@
     return drmError;
 }
 
-TBool CMpxVideoDrmHelper::IsTvOutAllowedL( RFile& aFile )
-{
-    TBool tvOutAllowed = ETrue;
-
-    if ( IsProtectedL( aFile ) )
-    {
-        ContentAccess::CContent* content = ContentAccess::CContent::NewLC( aFile );
-
-        ContentAccess::CData* data = content->OpenContentL( ContentAccess::EPeek );
-
-        TInt fileType;
-
-        TInt error = data->GetAttribute( ContentAccess::EFileType, fileType );
-
-        if ( error == KErrNone )
-        {
-            //
-            //  TV-out is not allowed for DRM content other than OMA1 DRM
-            //
-            if ( fileType != ContentAccess::EOma1Dcf )
-            {
-                tvOutAllowed = EFalse;
-            }
-        }
-
-        delete data;
-
-        CleanupStack::PopAndDestroy( content );
-    }
-
-    MPX_DEBUG(_L("CMpxVideoDrmHelper::IsTvOutAllowedL(%d)"), tvOutAllowed);
-
-    return tvOutAllowed;
-}
-
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
 //  ------------------------------------------------------------------------------------------------
@@ -203,45 +169,6 @@
     return drmError;
 }
 
-//  ------------------------------------------------------------------------------------------------
-//    CMpxVideoDrmHelper::IsTvOutAllowed64L()
-//  ------------------------------------------------------------------------------------------------
-//
-TBool CMpxVideoDrmHelper::IsTvOutAllowed64L( RFile64& aFile )
-{
-    TBool tvOutAllowed = ETrue;
-
-    if ( IsProtected64L( aFile ) )
-    {
-        ContentAccess::CContent* content = ContentAccess::CContent::NewLC( aFile );
-
-        ContentAccess::CData* data = content->OpenContentL( ContentAccess::EPeek );
-
-        TInt fileType;
-
-        TInt error = data->GetAttribute( ContentAccess::EFileType, fileType );
-
-        if ( error == KErrNone )
-        {
-            //
-            //  TV-out is not allowed for DRM content other than OMA1 DRM
-            //
-            if ( fileType != ContentAccess::EOma1Dcf )
-            {
-                tvOutAllowed = EFalse;
-            }
-        }
-
-        delete data;
-
-        CleanupStack::PopAndDestroy( content );
-    }
-
-    MPX_DEBUG(_L("CMpxVideoDrmHelper::IsTvOutAllowed64L(%d)"), tvOutAllowed);
-
-    return tvOutAllowed;
-}
-
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
 //  EOF
--- a/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp	Tue May 11 16:15:40 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 56 %
+// Version : %version: 58 %
 
 
 //
@@ -155,7 +155,6 @@
     iAccessPointId = KUseDefaultIap;
     iVideoSeeker = CMPXVideoSeeker::NewL( this );
 
-    // Initiliaze to True
     iSeekable = ETrue;
 
     InitVolumeWatchersL();
@@ -197,6 +196,12 @@
 
     ChangeState( EMPXVideoInitializing );
 
+    if ( iClipName )
+    {
+        delete iClipName;
+        iClipName = NULL;
+    }
+
     iClipName = aMediaFile.AllocL();
     iAccessPointId = aAccessPointId;
 
@@ -228,35 +233,28 @@
         iAccessoryMonitor = CMPXVideoAccessoryObserver::NewL( this );
     }
 
-    if ( iAccessoryMonitor->IsTvOutPlaybackAllowed() )
+    if ( fileExists )
     {
-        if ( fileExists )
+        //
+        //  Ensure there are rights for protected clips
+        //
+        TInt drmError = iDrmHelper->GetDrmRightsStatus( iFileHandle );
+
+        if ( drmError )
         {
             //
-            //  Ensure there are rights for protected clips
+            //  Send error to observer for handling
             //
-            TInt drmError = iDrmHelper->GetDrmRightsStatus( iFileHandle );
-
-            if ( drmError )
-            {
-                //
-                //  Send error to observer for handling
-                //
-                HandleError( drmError );
-            }
-            else
-            {
-                iState->OpenFileL( iFileHandle );
-            }
+            HandleError( drmError );
         }
         else
         {
-            iState->OpenFileL( iClipName->Des() );
+            iState->OpenFileL( iFileHandle );
         }
     }
     else
     {
-        HandleError( KMPXVideoTvOutPlaybackNotAllowedClose );
+        iState->OpenFileL( iClipName->Des() );
     }
 }
 
@@ -418,7 +416,7 @@
         {
             case EPbCmdInitView:
             {
-                if ( iState != iNotIntialisedState)
+                if ( iState != iNotIntialisedState )
                 {
                     aCmd.SetTextValueL( KMPXMediaVideoPlaybackFileName, *iClipName );
                     aCmd.SetTObjectValueL<TInt>( KMPXMediaVideoMode, iPlaybackMode->GetMode() );
@@ -426,12 +424,10 @@
                     aCmd.SetTObjectValueL<TInt>( KMPXMediaVideoTvOutConnected,
                                                  iAccessoryMonitor->IsTvOutConnected() );
 
-                    aCmd.SetTObjectValueL<TInt>( KMPXMediaVideoTvOutPlayAllowed,
-                                                 iAccessoryMonitor->IsTvOutPlaybackAllowed() );
-
                     if ( iRecognizedMimeType )
                     {
-                        aCmd.SetTextValueL( KMPXMediaVideoRecognizedMimeType, *iRecognizedMimeType );
+                        aCmd.SetTextValueL( KMPXMediaVideoRecognizedMimeType,
+                                            *iRecognizedMimeType );
                     }
                 }
 
@@ -475,7 +471,9 @@
             }
             case EPbCmdHandleBackground:
             {
-                iAppInForeground = static_cast<TBool>(aCmd.ValueTObjectL<TBool>(KMPXMediaVideoAppForeground));
+                iAppInForeground =
+                    static_cast<TBool>(aCmd.ValueTObjectL<TBool>(KMPXMediaVideoAppForeground));
+
                 iState->HandleBackground();
                 break;
             }
@@ -496,13 +494,7 @@
             }
             case EPbCmdUpdateSeekable:
             {
-                iSeekable = aCmd.ValueTObjectL<TBool>(KMPXMediaGeneralExtVideoSeekable);
-
-                if ( iFileDetails )
-                {
-                    iFileDetails->iSeekable &= iSeekable;
-                }
-
+                iState->UpdateSeekableL( aCmd );
                 break;
             }
             case EPbCmdEndofClipReached:
@@ -1773,7 +1765,7 @@
 //   CMPXVideoPlaybackController::SendTvOutEventL
 // -------------------------------------------------------------------------------------------------
 //
-void CMPXVideoPlaybackController::SendTvOutEventL( TBool aConnected, TBool aPlaybackAllowed )
+void CMPXVideoPlaybackController::SendTvOutEventL( TBool aConnected )
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::SendTvOutEventL()"));
 
@@ -1788,7 +1780,6 @@
     message->SetTObjectValueL<TMPXVideoPlaybackCommand>
         ( KMPXMediaVideoPlaybackCommand, EPbCmdTvOutEvent );
     message->SetTObjectValueL<TInt>( KMPXMediaVideoTvOutConnected, aConnected );
-    message->SetTObjectValueL<TInt>( KMPXMediaVideoTvOutPlayAllowed, aPlaybackAllowed );
 
     iMPXPluginObs->HandlePlaybackMessage( message, KErrNone );
 
@@ -1829,9 +1820,7 @@
     MPX_ENTER_EXIT( _L("CMPXVideoPlaybackController::HandleTvOutEventL()"),
                     _L("aConnected = %d"), aConnected );
 
-    TBool playbackAllowed = iAccessoryMonitor->IsTvOutPlaybackAllowed();
-
-    SendTvOutEventL( aConnected, playbackAllowed );
+    SendTvOutEventL( aConnected );
 
     //
     //  Check playback status of clip with new Tv-Out status
@@ -1841,25 +1830,12 @@
         //
         //  TV-Out accessory connected
         //
-        if ( ! playbackAllowed )
+        // If lights are being controlled enable display timer so that screen backlight will be turned
+        // of after timeout.
+        if ( iBackLightTimer->IsActive() )
         {
-            //
-            //  Clip has DRM protection and TV-Out is connected
-            //  Pause playback and display info note
-            //
-            DoHandleCommandL( EPbCmdPause );
-
-            iState->SendErrorToViewL( KMPXVideoTvOutPlaybackNotAllowed );
+            RestartDisplayTimer();
         }
-        else
-        {
-            // If lights are being controlled enable display timer so that screen backlight will be turned
-            // of after timeout.
-            if ( iBackLightTimer->IsActive() )
-            {
-                RestartDisplayTimer();
-            }
-         }
     }
     else
     {
@@ -1922,6 +1898,7 @@
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::DoHandleBackLightTimeout()"));
 
     TBool tvOutConnected( EFalse );
+
     if ( iAccessoryMonitor )
     {
         tvOutConnected = iAccessoryMonitor->IsTvOutConnected();
@@ -1931,7 +1908,8 @@
     // 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() );
+        MPX_DEBUG(_L("CMPXVideoPlaybackController::DoHandleBackLightTimeout() inactivity time = %d"), User::InactivityTime().Int() );
+
         // Cancel activity timer. Otherwise resetting inactivity time would fire user activity detection
         CancelUserActivityTimer();
     }
@@ -2357,7 +2335,7 @@
     ChangeState( EMPXVideoNotInitialized );
 
     //
-    // Move the FW state to Initialized so that it can request for Media
+    //  Move the FW state to Initialized so that it can request for Media
     //
     iMPXPluginObs->HandlePluginEvent( MMPXPlaybackPluginObserver::EPInitialised, 0, KErrNone );
 
@@ -2390,12 +2368,6 @@
         iFileDetails = NULL;
     }
 
-    if ( iClipName )
-    {
-        delete iClipName;
-        iClipName = NULL;
-    }
-
     if ( iRecognizedMimeType )
     {
         delete iRecognizedMimeType;
@@ -2414,7 +2386,6 @@
     }
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
-    // reset to True
     iSeekable = ETrue;
 
     //
@@ -2497,6 +2468,12 @@
 
     ChangeState( EMPXVideoInitializing );
 
+    if ( iClipName )
+    {
+        delete iClipName;
+        iClipName = NULL;
+    }
+
     iClipName = aMediaFile.AllocL();
     iAccessPointId = aAccessPointId;
 
@@ -2528,35 +2505,28 @@
         iAccessoryMonitor = CMPXVideoAccessoryObserver::NewL( this );
     }
 
-    if ( iAccessoryMonitor->IsTvOutPlaybackAllowed() )
+    if ( fileExists )
     {
-        if ( fileExists )
+        //
+        //  Ensure there are rights for protected clips
+        //
+        TInt drmError = iDrmHelper->GetDrmRightsStatus64( iFileHandle64 );
+
+        if ( drmError )
         {
             //
-            //  Ensure there are rights for protected clips
+            //  Send error to observer for handling
             //
-            TInt drmError = iDrmHelper->GetDrmRightsStatus64( iFileHandle64 );
-
-            if ( drmError )
-            {
-                //
-                //  Send error to observer for handling
-                //
-                HandleError( drmError );
-            }
-            else
-            {
-                iState->OpenFile64L( iFileHandle64 );
-            }
+            HandleError( drmError );
         }
         else
         {
-            iState->OpenFileL( iClipName->Des() );
+            iState->OpenFile64L( iFileHandle64 );
         }
     }
     else
     {
-        HandleError( KMPXVideoTvOutPlaybackNotAllowedClose );
+        iState->OpenFileL( iClipName->Des() );
     }
 }
 
--- a/videoplayback/videohelix/src/mpxvideoplaybackmode.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackmode.cpp	Tue May 11 16:15:40 2010 +0300
@@ -15,8 +15,8 @@
  *
 */
 
-// Version : %version: 23 %
 
+// Version : %version: 25 %
 
 
 //
@@ -177,29 +177,31 @@
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackMode::HandleBackground()"));
 
+    //
+    //  Pause in all cases to remove the different behavior based on the decoder
+    //
+    iVideoPlaybackCtlr->iState->HandlePause();
+
     if ( iVideoPlaybackCtlr->iAppInForeground )
     {
         if ( iVideoPlaybackCtlr->IsAlarm() )
         {
             iVideoPlaybackCtlr->iForegroundPause = ETrue;
-            iVideoPlaybackCtlr->iState->HandlePause();
         }
-        else if ( iVideoPlaybackCtlr->IsKeyLocked() && iVideoPlaybackCtlr->iFileDetails->iVideoEnabled )
+        else if ( iVideoPlaybackCtlr->IsKeyLocked() &&
+                  iVideoPlaybackCtlr->iFileDetails->iVideoEnabled )
         {
             iVideoPlaybackCtlr->iForegroundPause = ETrue;
-            iVideoPlaybackCtlr->iState->HandlePause();
             iVideoPlaybackCtlr->SendHideControlsEventL();
         }
         else if ( iVideoPlaybackCtlr->IsPhoneCall() || iVideoPlaybackCtlr->IsVideoCall() )
         {
             iVideoPlaybackCtlr->iForegroundPause = EFalse;
-            iVideoPlaybackCtlr->iState->HandlePause();
         }
     }
     else
     {
         iVideoPlaybackCtlr->iForegroundPause = EFalse;
-        iVideoPlaybackCtlr->iState->HandlePause();
     }
 }
 
@@ -224,11 +226,6 @@
         {
             iVideoPlaybackCtlr->iForegroundPause = ETrue;
         }
-        else if ( ! iVideoPlaybackCtlr->iAccessoryMonitor->IsTvOutPlaybackAllowed() )
-        {
-            MPX_TRAPD( err,
-                iVideoPlaybackCtlr->iState->SendErrorToViewL( KMPXVideoTvOutPlaybackNotAllowed ) );
-        }
         else
         {
             playAllowed = ETrue;
@@ -279,22 +276,6 @@
     return networkMode2g;
 }
 
-
-//  ------------------------------------------------------------------------------------------------
-//    CMPXVideoPlaybackMode::IsTvOutAllowedL()
-//  ------------------------------------------------------------------------------------------------
-TBool CMPXVideoPlaybackMode::IsTvOutAllowedL()
-{
-    MPX_DEBUG(_L("CMPXVideoPlaybackMode::IsTvOutAllowedL()"));
-
-    TBool allowTvOut =
-        iVideoPlaybackCtlr->iDrmHelper->IsTvOutAllowedL( iVideoPlaybackCtlr->iFileHandle );
-
-    MPX_DEBUG(_L("CMPXVideoPlaybackMode::IsTvOutAllowedL(%d)"), allowTvOut);
-
-    return allowTvOut;
-}
-
 //************************************************************************************************//
 //          CMPXLocalPlaybackMode
 //************************************************************************************************//
@@ -412,7 +393,7 @@
         else
         {
             MPX_TRAPD( err,
-            		   playAllowed = !( iVideoPlaybackCtlr->IsVoiceCall() && IsNetworkMode2GL() ) );
+                       playAllowed = !( iVideoPlaybackCtlr->IsVoiceCall() && IsNetworkMode2GL() ) );
 
             if ( !playAllowed )
             {
@@ -427,15 +408,6 @@
 }
 
 //  ------------------------------------------------------------------------------------------------
-//    CMPXStreamingPlaybackMode::IsTvOutAllowedL()
-//  ------------------------------------------------------------------------------------------------
-TBool CMPXStreamingPlaybackMode::IsTvOutAllowedL()
-{
-    MPX_ENTER_EXIT(_L("CMPXStreamingPlaybackMode::IsTvOutAllowedL(1)"));
-    return ETrue;
-}
-
-//  ------------------------------------------------------------------------------------------------
 //    CMPXStreamingPlaybackMode::HandlePause()
 //  ------------------------------------------------------------------------------------------------
 void CMPXStreamingPlaybackMode::HandlePause()
@@ -517,19 +489,10 @@
 {
     MPX_DEBUG(_L("CMPXLiveStreamingPlaybackMode::HandleBackground()"));
 
-    if ( iVideoPlaybackCtlr->iAppInForeground )
-    {
-        if ( iVideoPlaybackCtlr->IsPhoneCall() ||
-             iVideoPlaybackCtlr->IsVideoCall() ||
-             ( iVideoPlaybackCtlr->IsKeyLocked() && iVideoPlaybackCtlr->iFileDetails->iVideoEnabled ))
-        {
-            iVideoPlaybackCtlr->iState->HandlePause();
-        }
-    }
-    else
-    {
-        iVideoPlaybackCtlr->iState->HandlePause();
-    }
+    //
+    //  Pause in all cases to remove the different behavior based on the decoder
+    //
+    iVideoPlaybackCtlr->iState->HandlePause();
 }
 
 //************************************************************************************************//
--- a/videoplayback/videohelix/src/mpxvideoplaybackstate.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/src/mpxvideoplaybackstate.cpp	Tue May 11 16:15:40 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 39 %
+// Version : %version: 41 %
 
 
 //
@@ -24,6 +24,7 @@
 //
 #include <mpxcommandgeneraldefs.h>
 #include <mpxmessagegeneraldefs.h>
+#include <mpxmediageneralextdefs.h>
 
 #include "mpxvideoplaybackcontroller.h"
 #include "mpxvideoplaybackstate.h"
@@ -54,7 +55,6 @@
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackState::ConstructL()"));
 
     iVideoPlaybackCtlr = aVideoPlaybackCtlr;
-    iVideoPlaybackCtlr->iPBPluginError = KErrNone;
 
     User::LeaveIfError( iFs.Connect() );
     iFs.ShareProtected();
@@ -296,8 +296,15 @@
     TUint attrG(0);  //  General attributes
     TUint attrV(0);  //  Video attributes
 
-    if (iVideoPlaybackCtlr->iPBPluginError != KErrNone)
+    if ( iVideoPlaybackCtlr->iPBPluginError != KErrNone )
     {
+        if ( iVideoPlaybackCtlr->iClipName )
+        {
+            aMedia->SetTextValueL(
+                TMPXAttribute( KMPXMediaIdGeneral, EMPXMediaGeneralUri ),
+                *( iVideoPlaybackCtlr->iClipName ) );
+        }
+
         aMedia->SetTObjectValueL<TInt>(
             TMPXAttribute( KMPXMediaVideoError ), iVideoPlaybackCtlr->iPBPluginError );
 
@@ -485,16 +492,6 @@
     }
 
     //
-    //  TV-Out Playback Allowed
-    //
-    if ( attrV & KMPXMediaVideoTvOutPlayAllowed.iAttributeId )
-    {
-        aMedia->SetTObjectValueL<TInt>(
-            TMPXAttribute( KMPXMediaVideoTvOutPlayAllowed ),
-            iVideoPlaybackCtlr->iAccessoryMonitor->IsTvOutPlaybackAllowed() );
-    }
-
-    //
     //  BitRate
     //
     if ( attrV & KMPXMediaVideoBitRate.iAttributeId )
@@ -578,9 +575,9 @@
             TMPXAttribute( KMPXMediaVideoKeywords ),
             *( iVideoPlaybackCtlr->iFileDetails->iKeywords ) );
     }
-    
+
     //
-    //  Creation date/time 
+    //  Creation date/time
     //
     if ( attrV & KMPXMediaVideoCreated.iAttributeId )
     {
@@ -590,7 +587,7 @@
     }
 
     //
-    //  Last Modified date/time 
+    //  Last Modified date/time
     //
     if ( attrV & KMPXMediaVideoLastModified.iAttributeId )
     {
@@ -752,7 +749,7 @@
                                                MMPXPlaybackPluginObserver::TEvent aEvent,
                                                TBool aSendEvent )
 {
-    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackState::CMPXVideoPlaybackState::IssuePlayCommand()"),
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackState::IssuePlayCommand()"),
                    _L("aState = %d, aEvent  = %d, aSendEvent = %d"), aState, aEvent, aSendEvent );
 
     MPX_TRAPD( err, iVideoPlaybackCtlr->iPlayer->PlayL() );
@@ -772,6 +769,21 @@
     }
 }
 
+//  ------------------------------------------------------------------------------------------------
+//    CMPXVideoPlaybackState::UpdateSeekableL()
+//  ------------------------------------------------------------------------------------------------
+void CMPXVideoPlaybackState::UpdateSeekableL( CMPXCommand& aCmd )
+{
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackState::UpdateSeekableL()"));
+
+    iVideoPlaybackCtlr->iSeekable = aCmd.ValueTObjectL<TBool>(KMPXMediaGeneralExtVideoSeekable);
+
+    if ( iVideoPlaybackCtlr->iFileDetails )
+    {
+        iVideoPlaybackCtlr->iFileDetails->iSeekable &= iVideoPlaybackCtlr->iSeekable;
+    }
+}
+
 // *************************************************************************************************
 //
 //                          STATE SUB-CLASSES
@@ -829,6 +841,16 @@
 
     if ( iVideoPlaybackCtlr->iPBPluginError != KErrNone )
     {
+        if ( iVideoPlaybackCtlr->iClipName )
+        {
+            //
+            //  Send the clip name and error code for further processing
+            //
+            aMedia->SetTextValueL(
+                TMPXAttribute( KMPXMediaIdGeneral, EMPXMediaGeneralUri ),
+                *( iVideoPlaybackCtlr->iClipName ) );
+        }
+
         aMedia->SetTObjectValueL<TInt>(
             TMPXAttribute( KMPXMediaVideoError ), iVideoPlaybackCtlr->iPBPluginError );
 
@@ -902,6 +924,21 @@
      MPX_TRAPD( err, SendErrorToViewL( iVideoPlaybackCtlr->iPBPluginError ) );
 }
 
+//  ------------------------------------------------------------------------------------------------
+//    CMPXNotInitialisedState::UpdateSeekableL()
+//  ------------------------------------------------------------------------------------------------
+void CMPXNotInitialisedState::UpdateSeekableL( CMPXCommand& /*aCmd*/ )
+{
+    MPX_DEBUG(_L("CMPXNotInitialisedState::UpdateSeekableL()"));
+
+    //
+    //  Do not update the seekable state since the plugin is in the not initialized state
+    //  An error probably occurred, plugin went to not initialized.  If update was applied,
+    //  it would not be cleared for the next clip since we are already in not initialized
+    //  state.
+    //
+}
+
 // *************************************************************************************************
 //
 //                       CMPXInitialisingState
@@ -1024,25 +1061,7 @@
     }
     else
     {
-        //
-        // Transistion back to EMPXVideoNotInitialized, for pre loaded plugin
-        // this state will alert the view that pre loading failed
-        //
-        iVideoPlaybackCtlr->ChangeState( EMPXVideoNotInitialized );
-
-        // Store the error, in case of pre loaded pluging this can
-        // later be sent to the view
-        iVideoPlaybackCtlr->iPBPluginError = aError;
-
-        //
-        //  move the FW state to Initialized irrespective of the playback state
-        //  This enables the FW to send initailized event to view, which in turn
-        //  queries for the error
-        //
-        iVideoPlaybackCtlr->iMPXPluginObs->HandlePluginEvent(
-            MMPXPlaybackPluginObserver::EPInitialised,
-            0,
-            KErrNone );
+        iVideoPlaybackCtlr->HandleError( aError );
     }
 }
 
@@ -1090,23 +1109,7 @@
     }
     else
     {
-        //
-        // Transistion back to EMPXVideoNotInitialized, for pre loaded plugin
-        // this state will alert the view that pre loading failed
-        //
-        iVideoPlaybackCtlr->ChangeState( EMPXVideoNotInitialized );
-
-        // Store the error, in case of pre loaded pluging this can
-        // later be sent to the view
-        iVideoPlaybackCtlr->iPBPluginError = aError;
-
-        //
-        //  move the FW state to Initialized irrespective of the playback state
-        //  This enables the FW to send initailized event to view, which in turn
-        //  queries for the error
-        //
-        iVideoPlaybackCtlr->iMPXPluginObs->
-            HandlePluginEvent( MMPXPlaybackPluginObserver::EPInitialised, 0, KErrNone );
+        iVideoPlaybackCtlr->HandleError( aError );
     }
 }
 
@@ -1745,22 +1748,22 @@
     MPX_DEBUG(_L("CMPXBufferingState::HandleLoadingStarted()"));
 
     TInt loadingPercentage = RetrieveBufferingPercentage();
-    
+
     if ( loadingPercentage < 100 )
     {
         MPX_TRAPD( err,
         {
             CMPXMessage* message = CMPXMessage::NewL();
             CleanupStack::PushL( message );
-    
-            message->SetTObjectValueL<TMPXMessageId>( KMPXMessageGeneralId, 
+
+            message->SetTObjectValueL<TMPXMessageId>( KMPXMessageGeneralId,
                                                       KMPXMediaIdVideoPlayback );
-            
-            message->SetTObjectValueL<TMPXVideoPlaybackCommand>( KMPXMediaVideoPlaybackCommand, 
+
+            message->SetTObjectValueL<TMPXVideoPlaybackCommand>( KMPXMediaVideoPlaybackCommand,
                                                                  EPbCmdLoadingStarted );
-    
+
             iVideoPlaybackCtlr->iMPXPluginObs->HandlePlaybackMessage( message, KErrNone );
-    
+
             CleanupStack::PopAndDestroy( message );
         } );
     }
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg	Tue May 11 16:15:40 2010 +0300
@@ -1,5 +1,4 @@
 [Define]
-KMPXVideoTvOutPlaybackNotAllowedClose 4
 KErrNone 0
 KErrNotFound -1
 KErrGeneral -2
@@ -41,7 +40,6 @@
 EPbDlStateNotDownloading 0
 EPbDlStateDownloading 2
 
-ETvOutPlaybackNotAllowed 0
 ETvOutPlaybackAllowed 1
 
 ENoEvent 0
@@ -646,10 +644,10 @@
 [Endtest]
 
 [Test]
-title 42.  Tv-Out before Initialization - Unsupported DRM Playback Not Allowed
+title 42.  Tv-Out before Initialization - DRM Playback Allowed
 create videohelixtest test
-test SetTvOutConnected ETvOutPlaybackNotAllowed
-test Initialize 0 10 dcf.odf KErrNone KErrNone KMPXVideoTvOutPlaybackNotAllowedClose
+test SetTvOutConnected ETvOutPlaybackAllowed
+test Initialize 0 10 dcf.odf KErrNone KErrNone KErrNone
 waittestclass test
 pause 100
 test GetMedia 
@@ -659,13 +657,11 @@
 [Endtest]
 
 [Test]
-title 43.  Tv-Out after Initialization - Unsupported DRM Playback Not Allowed
+title 43.  Tv-Out after Initialization - DRM Playback Allowed
 create videohelixtest test
 test Initialize 0 10 dcf.odf KErrNone KErrNone KErrNone
 waittestclass test
-test IssueGeneralCommand EPbCmdPlay KErrNone ECallbackBuffering
-waittestclass test
-test ConnectTvOut ETvOutPlaybackNotAllowed
+test ConnectTvOut ETvOutPlaybackAllowed
 waittestclass test
 test DisconnectTvOut
 waittestclass test
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideodrmhelper_stub.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideodrmhelper_stub.cpp	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 6 %
+// Version : %version: 7 %
 
 
 #include "mpxvideodrmhelper.h"
@@ -108,13 +108,6 @@
     return drmError;
 }
 
-TBool CMpxVideoDrmHelper::IsTvOutAllowedL( RFile& aFile )
-{
-    TBool tvOutAllowed = ETrue;
-
-    return tvOutAllowed;
-}
-
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
 //  ------------------------------------------------------------------------------------------------
@@ -180,17 +173,6 @@
     return drmError;
 }
 
-//  ------------------------------------------------------------------------------------------------
-//    CMpxVideoDrmHelper::IsTvOutAllowed64L()
-//  ------------------------------------------------------------------------------------------------
-//
-TBool CMpxVideoDrmHelper::IsTvOutAllowed64L( RFile64& aFile )
-{
-    TBool tvOutAllowed = ETrue;
-
-    return tvOutAllowed;
-}
-
 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
 //  EOF
--- a/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 19 %
+// Version : %version: 21 %
 
 
 // [INCLUDE FILES] - do not remove
@@ -1418,7 +1418,7 @@
 
                 callback->iEvent = EPbCmdTvOutEvent;
                 callback->iData  = *aMsg->Value<TInt>( KMPXMediaVideoTvOutConnected );
-                callback->iError = *aMsg->Value<TInt>( KMPXMediaVideoTvOutPlayAllowed );
+                callback->iError = KErrNone;
 
                 ProcessEvent( callback );
 
@@ -1964,19 +1964,6 @@
     {
         iAccObserver->SetTvOutPlaybackAllowed( playable );
 
-        if ( ! playable )
-        {
-            TCallbackEvent* event = new TCallbackEvent;
-
-            event->iEvent = EPPaused;
-            event->iData  = 0;
-            event->iError = 0;
-
-            AddExpectedEvent( event );
-
-            iExpectedError = KMPXVideoTvOutPlaybackNotAllowed;
-        }
-
         //
         //  Add event for callback
         //
@@ -1984,7 +1971,7 @@
 
         event->iEvent = EPbCmdTvOutEvent;
         event->iData  = ETrue;
-        event->iError = playable;
+        event->iError = KErrNone;
 
         AddExpectedEvent( event );
     }
@@ -2007,10 +1994,10 @@
 
     event->iEvent = EPbCmdTvOutEvent;
     event->iData  = EFalse;
-    event->iError = ETrue;
+    event->iError = KErrNone;
 
     AddExpectedEvent( event );
-
+    
     iAccObserver->UpdateTvOutStatusL( EFalse );
 
     return KErrNone;
@@ -2373,7 +2360,6 @@
         
                         RFs fs;
                         TInt error = fs.Connect();
-                        TInt fileError = KErrNone;
                     
                         //
                         //  Open a file handle to the clip
@@ -2381,7 +2367,7 @@
                         if ( fileHandle32 )
                         {
                             RFile file;
-                            fileError = file.Open( fs, fullPath, EFileRead );
+                            file.Open( fs, fullPath, EFileRead );
                             iPlaybackPlugin->InitialiseWithPositionL( file, position );
                             file.Close();
                         }
@@ -2389,7 +2375,7 @@
                         else
                         {
                             RFile64 file64;
-                            fileError = file64.Open( fs, fullPath, EFileRead );
+                            file64.Open( fs, fullPath, EFileRead );
                             iPlaybackPlugin->Initialise64L( file64, position );
                             file64.Close();
                         }
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbuttonbar.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbuttonbar.cpp	Tue May 11 16:15:40 2010 +0300
@@ -15,8 +15,8 @@
 *
 */
 
-// Version : %version: 18 %
 
+// Version : %version: 19 %
 
 
 // INCLUDE FILES
@@ -328,43 +328,40 @@
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackButtonBar::HandleButtonDownEventL()"));
 
-    if ( iController->IsTvOutPlaybackAllowed() )
+    if ( iSeekingTimer->IsActive() )
     {
-        if ( iSeekingTimer->IsActive() )
-        {
-            iSeekingTimer->Cancel();
-        }
+        iSeekingTimer->Cancel();
+    }
 
-        if ( iMiddleButtonRect.Contains( aPointerEvent.iPosition ) )
-        {
-            iButtonPressed = EMPXMiddleButtonPressed;
-        }
-        else if ( iTopButtonRect.Contains( aPointerEvent.iPosition ) &&
-                  iButtons[EMPXButtonFastForward]->IsVisible() &&
-                  ! iButtons[EMPXButtonFastForward]->IsDimmed() )
-        {
-            iButtons[EMPXButtonFastForward]->SetPressed( ETrue );
+    if ( iMiddleButtonRect.Contains( aPointerEvent.iPosition ) )
+    {
+        iButtonPressed = EMPXMiddleButtonPressed;
+    }
+    else if ( iTopButtonRect.Contains( aPointerEvent.iPosition ) &&
+              iButtons[EMPXButtonFastForward]->IsVisible() &&
+              ! iButtons[EMPXButtonFastForward]->IsDimmed() )
+    {
+        iButtons[EMPXButtonFastForward]->SetPressed( ETrue );
 
-            iSeekingTimer->Start(
-                KMPXLongPressInterval,
-                KMPXTactileInterval,
-                TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) );
+        iSeekingTimer->Start(
+            KMPXLongPressInterval,
+            KMPXTactileInterval,
+            TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) );
 
-            iButtonPressed = EMPXTopButtonPressed;
-        }
-        else if( iBottomButtonRect.Contains( aPointerEvent.iPosition ) &&
-                 iButtons[EMPXButtonRewind]->IsVisible() &&
-                 ! iButtons[EMPXButtonRewind]->IsDimmed() )
-        {
-            iButtons[EMPXButtonRewind]->SetPressed( ETrue );
+        iButtonPressed = EMPXTopButtonPressed;
+    }
+    else if( iBottomButtonRect.Contains( aPointerEvent.iPosition ) &&
+             iButtons[EMPXButtonRewind]->IsVisible() &&
+             ! iButtons[EMPXButtonRewind]->IsDimmed() )
+    {
+        iButtons[EMPXButtonRewind]->SetPressed( ETrue );
 
-            iSeekingTimer->Start(
-                KMPXLongPressInterval,
-                KMPXTactileInterval,
-                TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) );
+        iSeekingTimer->Start(
+            KMPXLongPressInterval,
+            KMPXTactileInterval,
+            TCallBack( CMPXVideoPlaybackButtonBar::StartSeekingL, this ) );
 
-            iButtonPressed = EMPXBottomButtonPressed;
-        }
+        iButtonPressed = EMPXBottomButtonPressed;
     }
 }
 
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp	Tue May 11 16:15:40 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: e003sa33#36 %
+// Version : %version: 37 %
 
 
 // INCLUDE FILES
@@ -314,14 +314,14 @@
         {
             MPX_DEBUG(_L("    [EMPXControlCmdTvOutConnected]"));
             iTvOutConnected = ETrue;
-            HandleTvOutEventL( ETrue, aEvent, aValue );
+            HandleTvOutEventL( ETrue, aEvent );
             break;
         }
         case EMPXControlCmdTvOutDisconnected:
         {
             MPX_DEBUG(_L("    [EMPXControlCmdTvOutDisConnected]"));
             iTvOutConnected = EFalse;
-            HandleTvOutEventL( EFalse, aEvent, aValue );
+            HandleTvOutEventL( EFalse, aEvent );
             break;
         }
         case EMPXControlCmdHandleBackgroundEvent:
@@ -1797,21 +1797,11 @@
 // -------------------------------------------------------------------------------------------------
 //
 void CMPXVideoPlaybackControlsController::HandleTvOutEventL(
-        TBool aConnected, TMPXVideoPlaybackControlCommandIds aEvent, TInt aValue )
+        TBool aConnected, TMPXVideoPlaybackControlCommandIds aEvent )
 {
     MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::HandleTvOutEventL()"));
 
     iFileDetails->iTvOutConnected = aConnected;
-
-    if ( iFileDetails->iTvOutConnected )
-    {
-        iFileDetails->iTvOutPlayAllowed = aValue;
-    }
-    else
-    {
-        iFileDetails->iTvOutPlayAllowed = ETrue;
-    }
-
     iControlsConfig->UpdateControlListL( aEvent );
     ControlsListUpdatedL();
 }
@@ -1950,19 +1940,19 @@
 //
 TBool CMPXVideoPlaybackControlsController::ShowAspectRatioIcon()
 {
-	MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::ShowAspectRatioIcon()"));
+    MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::ShowAspectRatioIcon()"));
 
     TBool retVal = EFalse;
 
     if ( iFileDetails->iVideoEnabled &&
-    	 iFileDetails->iVideoHeight > 0 &&
-  	     iFileDetails->iVideoWidth > 0 &&
-  	     AknLayoutUtils::PenEnabled() )
+         iFileDetails->iVideoHeight > 0 &&
+         iFileDetails->iVideoWidth > 0 &&
+         AknLayoutUtils::PenEnabled() )
     {
         TRect displayRect = iContainer->Rect();
         TReal displayAspectRatio = ( TReal32 )displayRect.Width() / ( TReal32 )displayRect.Height();
         TReal videoAspectRatio = ( TReal32 )iFileDetails->iVideoWidth /
-        		                 ( TReal32 )iFileDetails->iVideoHeight;
+                                 ( TReal32 )iFileDetails->iVideoHeight;
 
         // If clip's AR is as same as screen display AR, AspectRatioIcon does not display.
         if ( displayAspectRatio != videoAspectRatio )
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 21 %
+// Version : %version: 22 %
 
 
 // INCLUDE FILES
@@ -334,8 +334,7 @@
     //  - If TV-Out is connected and the clip is DRM protected
     //
     if ( iController->FileDetails()->iSeekable &&
-         ( state == EPbStatePlaying || state == EPbStatePaused ) &&
-         iController->IsTvOutPlaybackAllowed() )
+         ( state == EPbStatePlaying || state == EPbStatePaused ) )
     {
         TReal ratio = (TReal) ( aPointerEvent.iPosition.iX - iFrameIconRect.iTl.iX )/
                       (TReal)( iFrameIconRect.Width() - KMPXProgressSliderWidth );
--- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,8 @@
 *
 */
 
-// Version : %version: 21 %
+
+// Version : %version: 22 %
 
 
 // INCLUDE FILES
@@ -775,11 +776,7 @@
 {
     MPX_ENTER_EXIT(_L("CMPXVideoPlaybackVolumeBar::HandlePointerEventL()"));
 
-    //
-    //  Block pointer events in the following cases:
-    //  - If TV-Out is connected and the clip is DRM protected
-    //
-    if ( iController->IsTvOutPlaybackAllowed() && iController->FileDetails()->iAudioEnabled )
+    if ( iController->FileDetails()->iAudioEnabled )
     {
         //
         //  Volume up
--- a/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp	Tue May 11 16:15:40 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 75 %
+// Version : %version: 77 %
 
 
 //  Include Files
@@ -130,6 +130,12 @@
 {
     MPX_DEBUG(_L("CMPXVideoBasePlaybackView::~CMPXVideoBasePlaybackView()"));
 
+    if ( iClipName )
+    {
+        delete iClipName;
+        iClipName = NULL;
+    }
+
     if ( iCloseAO )
     {
         delete iCloseAO;
@@ -532,6 +538,12 @@
 
     iMediaRequested = EFalse;
     iPlaybackState = EPbStateNotInitialised;
+
+    if ( iClipName )
+    {
+        delete iClipName;
+        iClipName = NULL;
+    }
 }
 
 // -------------------------------------------------------------------------------------------------
@@ -867,18 +879,15 @@
             TMPXVideoPlaybackControlCommandIds cmdId = EMPXControlCmdTvOutDisconnected;
 
             TBool tvOutConnected( *aMessage->Value<TInt>( KMPXMediaVideoTvOutConnected ) );
-            TBool playbackAllowed = ETrue;
 
             if ( tvOutConnected )
             {
                 cmdId = EMPXControlCmdTvOutConnected;
-
-                playbackAllowed = *aMessage->Value<TInt>( KMPXMediaVideoTvOutPlayAllowed );
             }
 
             if ( iContainer )
             {
-                MPX_TRAPD( err, iContainer->HandleEventL( cmdId, playbackAllowed ) );
+                MPX_TRAPD( err, iContainer->HandleEventL( cmdId ) );
             }
             break;
         }
@@ -958,17 +967,6 @@
             DisplayInfoMessageL( R_MPX_VIDEO_CALL_ONGOING );
             break;
         }
-        case KMPXVideoTvOutPlaybackNotAllowed:
-        {
-            DisplayInfoMessageL( R_MPX_VIDEO_DRM_NO_TV_OUT );
-            break;
-        }
-        case KMPXVideoTvOutPlaybackNotAllowedClose:
-        {
-            DisplayErrorMessageL( R_MPX_VIDEO_DRM_NO_TV_OUT );
-            HandleClosePlaybackViewL();
-            break;
-        }
         default:
         {
             //
@@ -1216,15 +1214,6 @@
     }
 
     //
-    //  TV-Out Playback Allowed
-    //
-    if ( aMedia.IsSupported( KMPXMediaVideoTvOutPlayAllowed ) )
-    {
-        iFileDetails->iTvOutPlayAllowed =
-            aMedia.ValueTObjectL<TInt>( KMPXMediaVideoTvOutPlayAllowed );
-    }
-
-    //
     //  Video BitRate
     //
     if ( aMedia.IsSupported( KMPXMediaVideoBitRate ) )
@@ -1368,17 +1357,26 @@
     }
     else
     {
+        //
+        //  Retreive the clip name for all use cases
+        //
+        if ( aMedia.IsSupported( KMPXMediaGeneralUri ) )
+        {
+            if ( iClipName )
+            {
+                delete iClipName;
+                iClipName = NULL;
+            }
+            
+            TPtrC uri( aMedia.ValueText( KMPXMediaGeneralUri ) );
+            iClipName = uri.AllocL();
+        }
+
         if ( aMedia.IsSupported( KMPXMediaVideoError ) )
         {
             TInt error = aMedia.ValueTObjectL<TInt>( KMPXMediaVideoError );
 
-            // Reset the controls
-            iContainer->HandleCommandL( EMPXPbvCmdResetControls );
-
-            // Set the iMediaRequested flag to false
             iMediaRequested = EFalse;
-
-            // Handle the plugin error
             HandlePluginErrorL( error );
         }
         else
@@ -1974,10 +1972,10 @@
     TInt openError = KErrNotFound;
     RFs& fs = iCoeEnv->FsSession();
 
-    if ( iPlaylistView && iFileDetails->iClipName )
+    if ( iPlaylistView && iClipName )
     {
         openError = aFile.Open( fs,
-                                iFileDetails->iClipName->Des(),
+                                iClipName->Des(),
                                 EFileRead | EFileShareReadersOrWriters );
     }
     else
@@ -2002,11 +2000,14 @@
                 //
                 HBufC* tempFileName = s->UriL();
 
-                openError = aFile.Open( fs,
-                                        tempFileName->Des(),
-                                        EFileRead | EFileShareReadersOrWriters );
+                if ( tempFileName )
+                {
+                    openError = aFile.Open( fs,
+                                            tempFileName->Des(),
+                                            EFileRead | EFileShareReadersOrWriters );
 
-                delete tempFileName;
+                    delete tempFileName;
+                }
             }
         }
     }
@@ -2110,10 +2111,10 @@
     TInt openError = KErrNotFound;
     RFs& fs = iCoeEnv->FsSession();
 
-    if ( iPlaylistView && iFileDetails->iClipName )
+    if ( iPlaylistView && iClipName )
     {
         openError = aFile.Open( fs,
-                                iFileDetails->iClipName->Des(),
+                                iClipName->Des(),
                                 EFileRead | EFileShareReadersOrWriters );
     }
     else
@@ -2139,11 +2140,14 @@
                 //
                 HBufC* tempFileName = s->UriL();
 
-                openError = aFile.Open( fs,
-                                        tempFileName->Des(),
-                                        EFileRead | EFileShareReadersOrWriters );
+                if ( tempFileName )
+                {
+                    openError = aFile.Open( fs,
+                                            tempFileName->Des(),
+                                            EFileRead | EFileShareReadersOrWriters );
 
-                delete tempFileName;
+                    delete tempFileName;
+                }
             }
         }
     }
--- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp	Tue May 11 16:15:40 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-// Version : %version: 27 %
+// Version : %version: 28 %
 
 
 // INCLUDE FILES
@@ -577,7 +577,6 @@
     iFileDetails->iPlaybackMode = (TMPXVideoMode) cmd->ValueTObjectL<TInt>( KMPXMediaVideoMode );
 
     iFileDetails->iTvOutConnected   = cmd->ValueTObjectL<TInt>( KMPXMediaVideoTvOutConnected );
-    iFileDetails->iTvOutPlayAllowed = cmd->ValueTObjectL<TInt>( KMPXMediaVideoTvOutPlayAllowed );
 
     TPtrC mimeType( cmd->ValueText( KMPXMediaVideoRecognizedMimeType ) );
     iFileDetails->iMimeType = mimeType.AllocL();
--- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackviewfiledetails.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackviewfiledetails.cpp	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: e003sa33#11 %
+// Version : %version: 12 %
 
 
 //
@@ -92,7 +92,6 @@
 
     iDuration = 0;
     iTvOutConnected   = EFalse;
-    iTvOutPlayAllowed = ETrue;
     iDrmProtected = EFalse;
 
     iVideoHeight = 0;
--- a/videoplayer_plat/video_player_file_details_dialog_api/inc/MPFileDetailsDialog.h	Tue Apr 27 16:40:33 2010 +0300
+++ b/videoplayer_plat/video_player_file_details_dialog_api/inc/MPFileDetailsDialog.h	Tue May 11 16:15:40 2010 +0300
@@ -15,7 +15,7 @@
 */
 
 
-// Version : %version: 7 %
+// Version : %version: 8 %
 
 
 
@@ -24,14 +24,14 @@
 #define MPFILEDETAILSDIALOG_H
 
 //  INCLUDES
-#include <aknpopup.h>
+#include <aknPopup.h>
 #ifdef SYMBIAN_BUILD_GCE
 #include <videoplayer2.h>
 #else
 #include <videoplayer.h>
 #endif //SYMBIAN_BUILD_GCE
 #include <mdaaudiosampleplayer.h>
-#include <mpfiledetails.h>
+#include <MPFileDetails.h>
 
 // FORWARD DECLARATIONS
 class CAknDoublePopupMenuStyleListBox;