[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-filesystem-cvs
Subject:    [Filesystem-cvs] local/mini minifileobj.cpp,1.23.2.7,1.23.2.8
From:       jwei () helixcommunity ! org
Date:       2007-12-07 20:15:52
Message-ID: 200712072016.lB7KGi38028227 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/filesystem/local/mini
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv29986/mini

Modified Files:
      Tag: hxclient_2_1_0_cayennes
	minifileobj.cpp 
Log Message:

Nokia submits this code under the terms of a commercial contribution agreement with \
RealNetworks, and I am authorized to contribute this code under said agreement."

Modified by:  john.wei@nokia.com

Reviewed by:

Date: 03-Dec-2007

Project: SymbianMmf_Rel

TSW: ELDG-73WGS6

Synopsis: Installing Asynchronous Datasource for Audio Controller

Audio controller is currently using synchronous datasource for playing. This CR \
changes this to asynchronous datasource, which results in audio play more responsive. \
Please note that video playing is not affected.

Files Modified:

/cvsroot/common/fileio/pub/hxdatasource.h
/cvsroot/common/fileio/hxdatasource.cpp
/cvsroot/common/fileio/symbian.pcf
/cvsroot/common/fileio/platform/symbian/HxMMDataSource.cpp
/cvsroot/common/fileio/pub/platform/symbian/HxMMDataSource.h
/cvsroot/clientapps/symbianMmf/audiocontroller/hxmmfaudioctrl.cpp
/cvsroot/clientapps/symbianMmf/common/hxmmfbasectrl.cpp
/cvsroot/clientapps/symbianMmf/common/hxmmfbasectrl.h
/cvsroot/filesystem/local/mini/minifileobj.cpp
/cvsroot/common/include/ihxmmfdatasource.h

Files New:
/cvsroot/common/fileio/platform/symbian/asynchronousmultireader.cpp
/cvsroot/common/fileio/pub/platform/symbian/asynchronousmultireader.h

Image Size and Heap Use impact: minor

Module Release testing (STIF) :  N/A

Test case(s) Added  :  no

Memory leak check performed : Yes.  No new leaks introduced.  

Platforms and Profiles Build Verified: helix-client-s60-32-mmf-mdf-arm

Platforms and Profiles Functionality verified: armv5, winscw 

Branch: Head & 210CayS


Index: minifileobj.cpp
===================================================================
RCS file: /cvsroot/filesystem/local/mini/minifileobj.cpp,v
retrieving revision 1.23.2.7
retrieving revision 1.23.2.8
diff -u -d -r1.23.2.7 -r1.23.2.8
--- minifileobj.cpp	17 Oct 2007 18:58:12 -0000	1.23.2.7
+++ minifileobj.cpp	7 Dec 2007 20:15:47 -0000	1.23.2.8
@@ -218,7 +218,7 @@
            m_pDataSource = pDataSource;
            pDataSource = NULL;
            m_bAsyncReadSupported = m_pDataSource->AsyncReadSupported();
-           result = m_pDataSource->Open2(m_pRequest, modeStr, this);
+           result = m_pDataSource->Open2(m_pRequest, modeStr, this, this);
         }
         else
 #endif
@@ -643,21 +643,25 @@
                                              IHXBuffer* pBuffer)
 {
     HX_RESULT result = HXR_OK;
+#if defined(HELIX_FEATURE_MMF_DATASOURCE)	
     if(m_bAsyncReadSupported)
     {
         m_pPendingReadBufAsync = pBuffer;
     }
+#endif	
 
     UINT32 actualCount = DoRead(pBuffer);
 
+#if defined(HELIX_FEATURE_MMF_DATASOURCE)	
+    if(!m_bAsyncReadSupported)
+    {
+#endif    
     if(IsReadError())
     {
         HX_RELEASE(pBuffer);
         ReadDoneError(HXR_READ_ERROR);
         return HXR_READ_ERROR;
     }
-    if(!m_bAsyncReadSupported)
-    {
     result = pBuffer->SetSize(actualCount);
         if(result == HXR_OK)
         {
@@ -665,7 +669,9 @@
             HX_RESULT readResult = actualCount > 0 ? HXR_OK : HXR_FAILED;
             result = DoReadDone(readResult, pBuffer);
         }
+#if defined(HELIX_FEATURE_MMF_DATASOURCE)		
     }
+#endif	
 
     return result;
 }
@@ -685,7 +691,14 @@
     HX_RESULT result = HXR_OK;
     if(m_pPendingReadBufAsync != NULL)
     {
-        result = m_pPendingReadBufAsync->SetSize(byteCount);
+        if(IsReadError())
+        {
+            result = HXR_READ_ERROR;
+        }
+        if( result == HXR_OK )
+        {
+            result = m_pPendingReadBufAsync->SetSize(byteCount);
+        }
         if(result == HXR_OK)
         {
             HX_RESULT readResult = byteCount > 0 ? HXR_OK : HXR_FAILED;
@@ -724,10 +737,7 @@
 #if defined(HELIX_FEATURE_MMF_DATASOURCE)
     if(m_pDataSource)
     {
-        actualCount = m_pDataSource->Read2(pBuffer->GetBuffer(),
-                                          sizeof(UCHAR),
-                                          pBuffer->GetSize(),
-                                          this);
+        actualCount = m_pDataSource->Read2(pBuffer, this);
     }
     else
 #endif
@@ -799,7 +809,7 @@
     HXBOOL bError = FALSE;
 
 #if defined(HELIX_FEATURE_MMF_DATASOURCE)
-    if(m_pDataSource && FAILED(m_pDataSource->GetLastError()) )
+    if(m_pDataSource && FAILED(m_pDataSource->GetLastError2(this)) )
 #else
     if (m_pFile && ferror(m_pFile)) 
 #endif
@@ -1158,7 +1168,9 @@
 	{ GET_IIDHANDLE(IID_IHXFileExists), (IHXFileExists*) this },
 	{ GET_IIDHANDLE(IID_IHXFileStat), (IHXFileStat*) this },
 	{ GET_IIDHANDLE(IID_IHXGetFileFromSamePool), (IHXGetFileFromSamePool*) this },
+#if defined(HELIX_FEATURE_MMF_DATASOURCE)
 	{ GET_IIDHANDLE(IID_IHXMMFDataSourceObserver), (IHXMMFDataSourceObserver*) this },
+#endif
     };
     return ::QIFind(qiList, QILISTSIZE(qiList), interfaceID, ppInterfaceObj);
 }


_______________________________________________
Filesystem-cvs mailing list
Filesystem-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/filesystem-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic