Revision: 201028 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 19 Aug 2010 11:23:35 +0300
branchRCL_3
changeset 40 f429a0a2075b
parent 39 3f0ddfac3ede
child 49 735348f59235
Revision: 201028 Kit: 201033
devsound/a3fintegrationtest/scripts/tsi_a3f_devsound_pcm_play.script
devsound/a3fintegrationtest/src/tsi_a3f_devsound_play.cpp
devsound/a3fintegrationtest/src/tsi_a3f_devsound_play.h
devsoundextensions/audiorouting/Output/AudioOutputProxy/src/AudioOutputProxy.cpp
devsoundextensions/telephonyaudiorouting/TelephonyAudioRoutingManager/src/TelephonyAudioRoutingManager.cpp
mm_plat/audio_routing_api/tsrc/AudioRoutingTestClass/src/AudioRoutingTestClassBlocks.cpp
mm_pub/drm_audio_player_api/tsrc/data/mmc/drm/test3gp.dcf
mm_pub/drm_audio_player_api/tsrc/data/mmc/drm/testmp3.dcf
mmlibs/mmfw/src/Client/Video/VideoPlayerBody.h
mmlibs/mmfw/src/Client/Video/mediaclientvideodisplay.cpp
mmlibs/mmfw/src/Client/Video/mediaclientvideodisplaybody.cpp
mmlibs/mmfw/src/Client/Video/mediaclientvideodisplaybody.h
mmlibs/mmfw/src/Client/Video/mmfclientvideoplayer2.cpp
mmlibs/mmfw/src/Client/Video/mmfclientvideoplayerbody.cpp
mmlibs/mmfw/tsrc/mmfintegrationtest/vclntavi/src/testvideoplayer.cpp
mmplugins/lib3gp/impl/src/file.cpp
mmplugins/lib3gp/impl/src/filewriter.cpp
mmplugins/lib3gp/impl/src/mp4compose.cpp
mmresourcemgmt/mmresctrl/src/mmrcserver/mmrcserver.cpp
--- a/devsound/a3fintegrationtest/scripts/tsi_a3f_devsound_pcm_play.script	Thu Jul 15 20:22:56 2010 +0300
+++ b/devsound/a3fintegrationtest/scripts/tsi_a3f_devsound_pcm_play.script	Thu Aug 19 11:23:35 2010 +0300
@@ -334,8 +334,10 @@
 //! @SYMTestActions				1. Configure DevSound to play PCM16 raw audio data in mono mode with sampling rate of 8 kHz.
 //!								2. Start playing and read recorded data from file.
 //!								3. Stop playback once EOF is reached.
-//!								4. Restart playback again
-//!								5. Stop test when EOF is reached again
+//!								4. Initialize again
+//!								5. Check that time played is 0
+//!								6. Restart playback again
+//!								7. Stop test when EOF is reached again
 //! @SYMTestExpectedResults		Devsound to successfully play PCM16 audio data in mono mode with sampling rate of 8 KHz twice with all the DevSound callback 
 //!								functions being executed as required throughout the test.
 
--- a/devsound/a3fintegrationtest/src/tsi_a3f_devsound_play.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/devsound/a3fintegrationtest/src/tsi_a3f_devsound_play.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -2610,8 +2610,8 @@
 				ERR_PRINTF2(_L("Could not Open the File: Error = %d"), err);
 				StopTest(err);
 				}
-			iPlayState = EStatePlayInitializing;
-			Fsm(EEventInitCompletePlay, KErrNone);
+            iPlayState = EStatePlayStart;
+            Fsm(EEventPlayStart, KErrNone);
 			}
 		else
 			{
@@ -2626,6 +2626,50 @@
 
 	}
 
+/*
+ *
+ * InitializeComplete
+ *
+ */
+void RStepA3FDevSoundPlayEOFPlayMultipleTimes::InitializeComplete(TInt aError)
+    {
+    INFO_PRINTF2(_L("Initialize returned with = %d"), aError);
+    if (aError == KErrNone)
+        {
+        TTimeIntervalMicroSeconds time;
+        TInt err = iMMFDevSound->GetTimePlayed(time);
+        if (err != KErrNone)
+            {
+            INFO_PRINTF2(_L("CMMFDevSound::GetTimePlayed unexpectedly returned %d - abort test"), err);
+            StopTest(err, EFail);
+            return;
+            }
+        
+        // checking low 32bits should be enough - sample played should never exceed 4000-ish seconds
+        INFO_PRINTF2(_L("Time played is %d after Play-Initialisation"), I64LOW(time.Int64()));
+        if (I64LOW(time.Int64()) != 0)
+            {
+            INFO_PRINTF1(_L("Time played is not 0 after Play-Initialisation - abort test"));
+            StopTest(KErrNone, EFail);
+            return;
+            }
+        
+        TInt samples = iMMFDevSound->SamplesPlayed();
+        INFO_PRINTF2(_L("Sample played is %d after Play-Initialisation"), samples);
+        if (samples != 0)
+            {
+            INFO_PRINTF1(_L("Sample played is not 0 after Play-Initialisation - abort test"));
+            StopTest(KErrNone, EFail);
+            return;
+            }
+        
+        // This is to trigger iMMFDevSound->PlayInitL as next step in the base Fsm
+        iPlayState = EStatePlayInitializing;
+        Fsm(EEventInitCompletePlay, KErrNone);
+        }
+    }
+
+
 //
 // RStepA3FDevSoundInititalizeDuringInitialize
 //
--- a/devsound/a3fintegrationtest/src/tsi_a3f_devsound_play.h	Thu Jul 15 20:22:56 2010 +0300
+++ b/devsound/a3fintegrationtest/src/tsi_a3f_devsound_play.h	Thu Aug 19 11:23:35 2010 +0300
@@ -384,6 +384,7 @@
 
 	// From MDevSoundObserver
 	virtual void PlayError(TInt aError);
+	virtual void InitializeComplete(TInt aError);
 
 private:
 	TInt iRepeatCount;
--- a/devsoundextensions/audiorouting/Output/AudioOutputProxy/src/AudioOutputProxy.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/devsoundextensions/audiorouting/Output/AudioOutputProxy/src/AudioOutputProxy.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -192,7 +192,13 @@
 	{
 	iSecureOutput = aSecureOutput;
 	TPckgC<TBool> outputPckg(aSecureOutput);
-	iCustomCommand->CustomCommandSync(iMessageHandler, EAofSetSecureOutput, outputPckg, KNullDesC8);
+	TInt err = KErrNone;
+        //ou1cimx1#454515 CAudioOutputConfigurator::SetSecureOutputL() is deprecated
+	err = iCustomCommand->CustomCommandSync(iMessageHandler, EAofSetSecureOutput, outputPckg, KNullDesC8);
+	if(err != KErrNone)
+		{
+			User::Leave(err);
+		}
 	}
 
 // ---------------------------------------------------------
--- a/devsoundextensions/telephonyaudiorouting/TelephonyAudioRoutingManager/src/TelephonyAudioRoutingManager.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/devsoundextensions/telephonyaudiorouting/TelephonyAudioRoutingManager/src/TelephonyAudioRoutingManager.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -31,7 +31,12 @@
 
 const TInt KTelAudRtngServerStackSize=0x2000;			//  8KB
 const TInt KTelAudRtngServerInitHeapSize=0x1000;		//  4KB
+#if defined __WINSCW__      
+//Telephoney Audio routing server requires only 1MB data for emulator
+const TInt KTelAudRtngServerMaxHeapSize=0x100000;      // 1MB
+#else
 const TInt KTelAudRtngServerMaxHeapSize=0x1000000;		// 16MB
+#endif
     
 // ================= MEMBER FUNCTIONS =======================
 
--- a/mm_plat/audio_routing_api/tsrc/AudioRoutingTestClass/src/AudioRoutingTestClassBlocks.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/mm_plat/audio_routing_api/tsrc/AudioRoutingTestClass/src/AudioRoutingTestClassBlocks.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -1010,12 +1010,21 @@
 
 TInt CAudioRoutingTestClass::SetSecureOutputL()
    {
+  TInt err;
 	if(iAudioOutput)
 		{
-		iAudioOutput->SetSecureOutputL(EFalse);
+		TRAP(err,iAudioOutput->SetSecureOutputL(EFalse));
 		}
-	iLog->Log(_L("iAudioOutput - SetSecureOutputL "));
-	return KErrNone;
+	if(err == KErrNotSupported)
+	   {
+	   iLog->Log(_L("SetsecureoutputL is deprecated,so not supported"));
+	   return KErrNone;
+	   }
+	else
+	   {
+	   return KErrGeneral;
+	   }
+
    }
 
 TInt CAudioRoutingTestClass::UnregisterObserver()
--- a/mmlibs/mmfw/src/Client/Video/VideoPlayerBody.h	Thu Jul 15 20:22:56 2010 +0300
+++ b/mmlibs/mmfw/src/Client/Video/VideoPlayerBody.h	Thu Aug 19 11:23:35 2010 +0300
@@ -229,6 +229,8 @@
 	TBool RectContains(const TRect& aLeft, const TRect& aRight);
 	void DoAddDisplayWindowL(RWsSession& aWs, TInt aDisplay, RWindowBase& aWindow,
 								const TRect& aClipRect, const TRect& aVideoExtent, RWindow* aWindow2);
+	void DoUpdateDisplayWindowL(RWsSession& aWs, RWindowBase& aWindow,
+	              const TRect& aClipRect, const TRect& aVideoExtent, RWindow* aWindow2);
 	TInt SurfaceCreated();
 	TInt SurfaceParametersChanged();
 	TInt RemoveSurface(TBool aControllerEvent);
--- a/mmlibs/mmfw/src/Client/Video/mediaclientvideodisplay.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/mmlibs/mmfw/src/Client/Video/mediaclientvideodisplay.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -149,9 +149,12 @@
 	}
 
 /**
-Removes a window that is currently being used to display the video picture. The window must 
+Removes a window that is currently being used to display the video picture. The window must
 have previously been added with AddDisplayWindowL(). 
 
+Note Depending on underlying implementation it may also remove any graphics resources associated
+with video playback on this window. 
+
 Note removing the last window on a display will deregister the display
 	
 @param  aWindow
--- a/mmlibs/mmfw/src/Client/Video/mediaclientvideodisplaybody.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/mmlibs/mmfw/src/Client/Video/mediaclientvideodisplaybody.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -239,6 +239,60 @@
 	DEBUG_PRINTF("CMediaClientVideoDisplayBody::AddDisplayWindowL ---");
 	}
 
+void CMediaClientVideoDisplayBody::UpdateDisplayWindowL(const RWindowBase* aWindow, const TRect& aClipRect, const TRect& aCropRegion, const TRect& aVideoExtent, 
+                                                            TReal32 aScaleWidth, TReal32 aScaleHeight, TVideoRotation aRotation, 
+                                                            TAutoScaleType aAutoScaleType, TInt aHorizPos, TInt aVertPos, RWindow* aWindow2)
+    {   
+    DEBUG_PRINTF("CMediaClientVideoDisplayBody::UpdateDisplayWindowL +++");
+    DEBUG_PRINTF2("CMediaClientVideoDisplayBody::UpdateDisplayWindowL - aWindow WsHandle 0x%X", aWindow->WsHandle());
+    DEBUG_PRINTF5("CMediaClientVideoDisplayBody::UpdateDisplayWindowL - aClipRect %d,%d - %d,%d", aClipRect.iTl.iX, aClipRect.iTl.iY, aClipRect.iBr.iX, aClipRect.iBr.iY);
+    DEBUG_PRINTF5("CMediaClientVideoDisplayBody::UpdateDisplayWindowL - aCropRegion %d,%d - %d,%d", aCropRegion.iTl.iX, aCropRegion.iTl.iY, aCropRegion.iBr.iX, aCropRegion.iBr.iY);
+    DEBUG_PRINTF5("CMediaClientVideoDisplayBody::UpdateDisplayWindowL - aVideoExtent %d,%d - %d,%d", aVideoExtent.iTl.iX, aVideoExtent.iTl.iY, aVideoExtent.iBr.iX, aVideoExtent.iBr.iY);
+    DEBUG_PRINTF3("CMediaClientVideoDisplayBody::UpdateDisplayWindowL - aScaleWidth %f, aScaleHeight %f", aScaleWidth, aScaleHeight);
+    DEBUG_PRINTF2("CMediaClientVideoDisplayBody::UpdateDisplayWindowL - aRotation %d", aRotation);
+    DEBUG_PRINTF2("CMediaClientVideoDisplayBody::UpdateDisplayWindowL - aAutoScaleType %d", aAutoScaleType);
+    DEBUG_PRINTF3("CMediaClientVideoDisplayBody::UpdateDisplayWindowL - aHorizPos %d, aVertPos %d", aHorizPos, aVertPos);
+
+    if (!IsRotationValid(aRotation))
+        {
+        User::Leave(KErrArgument);
+        }
+
+    if (!IsAutoScaleTypeValid(aAutoScaleType))
+        {
+        User::Leave(KErrArgument);
+        }
+
+    TInt pos = iClientWindows.Find(aWindow->WsHandle(), TWindowData::CompareByWsHandle);
+    User::LeaveIfError(pos);
+    iClientWindows.Remove(pos);
+    
+    TWindowData winData(aWindow, aClipRect, aVideoExtent, aScaleWidth, aScaleHeight, aRotation, aAutoScaleType, aHorizPos, aVertPos, aWindow2);
+    iClientWindows.AppendL(winData);
+    
+    TRect prevCropRegion = iCropRegion;
+    iCropRegion = aCropRegion;
+    
+    if (IsSurfaceCreated())
+        {
+        if(ClientCropRegionChangeRequiresRedraw(prevCropRegion, aCropRegion, iCropRect))
+            {
+            // all windows need to be redrawn
+            User::LeaveIfError(RedrawWindows(aCropRegion));
+            }
+        else
+            {
+            // only redraw affected window as other window data may have changed
+            if(!iSwitchedToExternalDisplay)
+                {
+                User::LeaveIfError(SetBackgroundSurface(winData, aCropRegion));
+                }
+            }
+        }
+
+    DEBUG_PRINTF("CMediaClientVideoDisplayBody::UpdateDisplayWindowL ---");
+    }
+
 void CMediaClientVideoDisplayBody::RemoveDisplay()
 	{
 	DEBUG_PRINTF("CMediaClientVideoDisplayBody::RemoveDisplay +++");
--- a/mmlibs/mmfw/src/Client/Video/mediaclientvideodisplaybody.h	Thu Jul 15 20:22:56 2010 +0300
+++ b/mmlibs/mmfw/src/Client/Video/mediaclientvideodisplaybody.h	Thu Aug 19 11:23:35 2010 +0300
@@ -104,6 +104,9 @@
 	void AddDisplayWindowL(const RWindowBase* aWindow, const TRect& aClipRect, const TRect& aCropRegion, const TRect& aVideoExtent,
 							TReal32 aScaleWidth, TReal32 aScaleHeight, TVideoRotation aRotation,
 							TAutoScaleType aAutoScaleType, TInt aHorizPos, TInt aVertPos, RWindow* aWindow2);
+	void UpdateDisplayWindowL(const RWindowBase* aWindow, const TRect& aClipRect, const TRect& aCropRegion, const TRect& aVideoExtent, 
+                            TReal32 aScaleWidth, TReal32 aScaleHeight, TVideoRotation aRotation, 
+                            TAutoScaleType aAutoScaleType, TInt aHorizPos, TInt aVertPos, RWindow* aWindow2);
 	void RemoveDisplay();
 	TInt RemoveDisplayWindow(const RWindowBase& aWindow);
 	
--- a/mmlibs/mmfw/src/Client/Video/mmfclientvideoplayer2.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/mmlibs/mmfw/src/Client/Video/mmfclientvideoplayer2.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -119,9 +119,12 @@
 	}
 
 /**
-Removes a window that is currently being used to display the video picture. The window must 
+Removes a window that is currently being used to display the video picture. The window must
 have previously been added with AddDisplayWindowL(). 
 
+Note Depending on underlying implementation it may also remove any graphics resources associated
+with video playback on this window. 
+
 This method cannot fail. If the window has not been added with AddDisplayWindowL(), the 
 method call will be ignored. 
 	
--- a/mmlibs/mmfw/src/Client/Video/mmfclientvideoplayerbody.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/mmlibs/mmfw/src/Client/Video/mmfclientvideoplayerbody.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -657,10 +657,6 @@
  			iDirectScreenAccess->Cancel();
   			AbortNow(RDirectScreenAccess::ETerminateCancel);
  			}
-
-		// try to remove the display window first no matter it is active or not.
-		// This method won't leave
-		RemoveDisplayWindow(aWindow);
 		
 		// When using surfaces for CVPU we use DoAddDisplayWindowL() which requires clip rectangle and video extent
 		// as arguments. Video extent is not supported by CVPU so aWindowRect is used instead. This function
@@ -670,7 +666,16 @@
 		TRect clipRectRelativeToWindow;		
 		ConvertFromRelativeToDisplayToRelativeToWindow(aWindow, aWindowRect, aClipRect, windowRectRelativeToWindow, clipRectRelativeToWindow);
 
-        DoAddDisplayWindowL(aWs, aScreenDevice.GetScreenNumber(), aWindow, clipRectRelativeToWindow, windowRectRelativeToWindow, NULL);
+		// check if display for window already exists and if so do an update else create a new display
+		TRAPD(err, CMediaClientVideoDisplayBody::FindDisplayWithWindowL(iActiveDisplays, aWindow));
+		if (err == KErrNone)
+		    {
+		    DoUpdateDisplayWindowL(aWs, aWindow, clipRectRelativeToWindow, windowRectRelativeToWindow, NULL);
+		    }
+		else
+		    {
+		    DoAddDisplayWindowL(aWs, aScreenDevice.GetScreenNumber(), aWindow, clipRectRelativeToWindow, windowRectRelativeToWindow, NULL);
+		    }
 		}
 #else
 	PrepareDSAL(aWs, aScreenDevice, aWindow);
@@ -1594,6 +1599,38 @@
 #endif //SYMBIAN_MULTIMEDIA_SUBTITLE_SUPPORT
 	}
 
+void CVideoPlayerUtility::CBody::DoUpdateDisplayWindowL(RWsSession& aWs, RWindowBase& aWindow,
+                                const TRect& aClipRect, const TRect& aVideoExtent, RWindow* aWindow2)
+    {
+    iWs = &aWs;
+
+    // check opening the source is complete and the client has been recieved an MvpuoOpenComplete() callback
+    if (!iControllerOpen)
+        {
+        User::Leave(KErrNotReady);
+        }
+
+    CMediaClientVideoDisplayBody* display = NULL;
+    TRAPD(err, display = CMediaClientVideoDisplayBody::FindDisplayWithWindowL(iActiveDisplays, aWindow));
+    User::LeaveIfError(err);
+
+    display->UpdateDisplayWindowL(&aWindow, aClipRect, iCropRegion, aVideoExtent, iGlobalScaleWidth, iGlobalScaleHeight,
+                                iGlobalRotation, iGlobalAutoScaleType, iGlobalHorizPos, iGlobalVertPos, aWindow2);
+
+#ifdef SYMBIAN_MULTIMEDIA_SUBTITLE_SUPPORT
+    if (iSubtitleUtility)
+        {
+        // subtitles were enabled already, so update subtitles on this window
+        TMMFSubtitleWindowConfig config;
+        config.iWindowId = aWindow.WsHandle();
+        config.iWindowClipRect = aClipRect;
+        config.iDisplayMode = aWindow.DisplayMode();
+        config.iRotation = iGlobalRotation;
+        iSubtitleUtility->UpdateSubtitleConfig(config); // ignore error from add subtitle config because the window can still display video properly
+        }
+#endif //SYMBIAN_MULTIMEDIA_SUBTITLE_SUPPORT
+    }
+
 void CVideoPlayerUtility::CBody::RemoveDisplayWindow(RWindowBase& aWindow)
 	{
     DEBUG_PRINTF("CVideoPlayerUtility::CBody::RemoveDisplayWindow++");
--- a/mmlibs/mmfw/tsrc/mmfintegrationtest/vclntavi/src/testvideoplayer.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/mmlibs/mmfw/tsrc/mmfintegrationtest/vclntavi/src/testvideoplayer.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -1131,10 +1131,22 @@
     TSize clipSize(176, 144);
     TRect clipRect(clipOrigin, clipSize);
     
+    // first call tests creation of display instance
     TRAPD(err, aPlayer->SetDisplayWindowL(iWs, *iScreen, *iWindow, rect, clipRect));
+    INFO_PRINTF1(_L("Test : Made first call to SetDisplayWindowL()"));
     if(err)
         {
-        ERR_PRINTF2(_L("SetDisplayWindowL() failed, error %d"), err);
+        ERR_PRINTF2(_L("First call to SetDisplayWindowL() failed, error %d"), err);
+        CActiveScheduler::Stop();
+        return EFail;
+        }
+
+    // second call tests update of display instance
+    TRAP(err, aPlayer->SetDisplayWindowL(iWs, *iScreen, *iWindow, rect, clipRect));
+    INFO_PRINTF1(_L("Test : Made second call to SetDisplayWindowL()"));
+    if(err)
+        {
+        ERR_PRINTF2(_L("Second call to SetDisplayWindowL() failed, error %d"), err);
         ret = EFail;
         }
     else
@@ -1143,7 +1155,6 @@
         }
 
     CActiveScheduler::Stop();
-        
     return ret;
     }
 
--- a/mmplugins/lib3gp/impl/src/file.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/mmplugins/lib3gp/impl/src/file.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -1388,26 +1388,54 @@
   TFileName path;
   TInt error;
 
-  // Create a directory for the files
-  if ( handle->fileName )
-    {
-    filename = (TText *)handle->fileName;
+  TDriveList driveList;
+  TBool pathSet = EFalse;
+  
+  // As ram drive access is faster, try to set temp file directory to available ram drive.
+  if (((RFs *)(handle->fs))->DriveList(driveList) == KErrNone)
+	{
+	for ( TInt i = 0; i < driveList.Length(); i++ )
+		{
+		TDriveInfo driveInfo;
+		if (((RFs *)(handle->fs))->Drive(driveInfo, i) == KErrNone)
+			{
+			if (driveInfo.iType == EMediaRam)
+				{
+				TChar driveLetter;
+				((RFs *)(handle->fs))->DriveToChar(i, driveLetter);
+				path.Append(driveLetter);
+				path.Append(_L(":"));
+				path.Append(KTmpDirectoryName);
+				pathSet = ETrue;
+				break;
+				}
+			}
+		}
+	}
+	  
+  // If no ram drive was found create a directory for the files on current drive
+  if (!pathSet)
+	{
+	if ( handle->fileName )
+		{
+		filename = (TText *)handle->fileName;
     
-    TParse fp;
-    path = KTmpDirectoryName;
-    if (((RFs *)(handle->fs))->Parse(filename, fp) != KErrNone)
-        return -1;
-    path.Insert(0, fp.Drive());
-    }
-  else
-    {
-    TChar drive;
-    if (((RFs *)(handle->fs))->DriveToChar(handle->fileHandleDrive, drive ) != KErrNone )
-        return -1;
-    path.Append( drive );
-    path.Append( _L(":") );
-    path.Append( KTmpDirectoryName );
-    }
+		TParse fp;
+		path = KTmpDirectoryName;
+		if (((RFs *)(handle->fs))->Parse(filename, fp) != KErrNone)
+			return -1;
+		path.Insert(0, fp.Drive());
+		}
+	else
+		{
+		TChar drive;
+		if (((RFs *)(handle->fs))->DriveToChar(handle->fileHandleDrive, drive ) != KErrNone )
+			return -1;
+		path.Append( drive );
+		path.Append( _L(":") );
+		path.Append( KTmpDirectoryName );
+		}
+	}
     
   // Try to delete the temp folder from leftovers
   // If other instance is using it then delete will just fail
--- a/mmplugins/lib3gp/impl/src/filewriter.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/mmplugins/lib3gp/impl/src/filewriter.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -141,7 +141,7 @@
     
     while (iOutputFileSize >= iSetSize) 
         {
-        iSetSize += iOutputBufferSize * (iMaxOutputBufHardLimit >> 1);
+        iSetSize += static_cast<TInt64>(iOutputBufferSize) * (static_cast<TInt64>(iMaxOutputBufHardLimit) >> 1); 
         PRINT((_L("e_cfilewriter_updateoutputfilesize_setsize 1")));                     
         iOutputFile->SetSize( iSetSize );
         PRINT((_L("e_cfilewriter_updateoutputfilesize_setsize 0")));                     
--- a/mmplugins/lib3gp/impl/src/mp4compose.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/mmplugins/lib3gp/impl/src/mp4compose.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -1095,16 +1095,6 @@
 {
   MP4HandleImp handle = (MP4HandleImp)apihandle;
   handle->flags |= flags;
-  
-  PRINT((_L("Flags: %X"), handle->flags));
-  PRINT((_L("Heap memory max size: %d"), User::Heap().MaxLength()));
-
-  if (User::Heap().MaxLength() >= 0xC00000) 
-     {
-     handle->flags &= ~MP4_FLAG_LONGCLIP; // unset the flag as we have enough memory
-     }
-
-  PRINT((_L("Flags: %X"), handle->flags));
 
   if (handle->flags & MP4_FLAG_METADATALAST)
   {
--- a/mmresourcemgmt/mmresctrl/src/mmrcserver/mmrcserver.cpp	Thu Jul 15 20:22:56 2010 +0300
+++ b/mmresourcemgmt/mmresctrl/src/mmrcserver/mmrcserver.cpp	Thu Aug 19 11:23:35 2010 +0300
@@ -224,6 +224,17 @@
 	// Need to check that the server exists.
 	if ( findCountServer.Next(name) != KErrNone )
 		{
+#if (defined (__WINS__) || defined (__WINSCW__) )
+		  // Create the thread for the server. Don't allocate a separate
+          // heap but use client thread's heap instead. This saves memory
+          // space in the single process model used in the emulator.
+		res = aServerThread.Create(KMMRCServerName,
+			CMMRCServer::ThreadFunction,
+			KMMRCServerStackSize,
+			NULL,
+			NULL
+			);
+#else
 		  // Create the thread for the server.
 		res = aServerThread.Create(KMMRCServerName,
 			CMMRCServer::ThreadFunction,
@@ -232,6 +243,7 @@
 			KMMRCServerMaxHeapSize,
 			NULL
 			);
+#endif	
 			
 		// The thread has been created OK so get it started - however
 		// we need to make sure that it has started before we continue.