mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp
branchRCL_3
changeset 13 4740b34b83ce
parent 12 51035f0751c2
child 17 6f9f6e99a23e
--- a/mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp	Wed Apr 14 16:28:17 2010 +0300
+++ b/mpx/playbackframework/playbackengine/src/mpxplaybackengine.cpp	Tue Apr 27 17:09:22 2010 +0300
@@ -1478,6 +1478,23 @@
             {
             iProperties[EPbPropertyPosition] = 0;
             }
+	
+	//check whether plugin is KMPXPlaybackPluginVersion2, if not, set saved position
+    CDesCArray* interfaces = iPluginHandler->SupportedInterfacesL( iPluginUid );
+    TBool version2InterfaceSupported = EFalse;
+    if ( interfaces->MdcaCount() )
+        {
+        TInt pos(0);            
+        version2InterfaceSupported = !interfaces->FindIsq( KMPXPlaybackPluginVersion2, pos );
+        }
+    delete interfaces;
+    
+    if ( !version2InterfaceSupported )
+        {
+        // Set position to restore saved position.
+        TRAP_IGNORE( // uPnP leaves if set position in stop state
+                PluginL()->SetL( EPbPropertyPosition, iProperties[EPbPropertyPosition] ));
+        }
 
     iAutoResumeHandler->HandleOpenFileComplete();
     
@@ -2620,7 +2637,7 @@
     MPX_DEBUG1("==>CMPXPlaybackEngine::DoStopL()");
     Suspend();
     if (iState == EPbStatePaused || iState == EPbStatePlaying ||
-        iState == EPbStateInitialising)
+        iState == EPbStateInitialising || iState == EPbStateBuffering)
         {
         if (aSavePlaybackInfo && (iState == EPbStatePaused || iState == EPbStatePlaying ))
             {