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

List:       helix-filesystem-cvs
Subject:    [Filesystem-cvs] http httpfsys.cpp,1.134.4.7,1.134.4.8
From:       girish2080 () helixcommunity ! org
Date:       2011-04-18 16:59:32
Message-ID: 201104181659.p3IGxGaj026166 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/filesystem/http
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv9879

Modified Files:
      Tag: hxclient_4_2_0_brizo
	httpfsys.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:  Shubham.Baheti@nokia.com
 
Reviewed by:  
 
Date:  04/13/2011
 
Project:  SymbianMmf_wm, Symbian_client_apps
 
Error Id:  EpicID<307190: 417-72523 Browser 8.1 for SR1.11>
 
Synopsis:  Enabling HD Streaming through http filesystem
 
Overview:  

Currently, when we stream HD contents through http, we get continuous buffering after \
every 2-3 seconds of data. This is caused by not prerolling/buffering enough data by \
the filesystem before giving the data back to the player. And also, HTTP Buffer Ahead \
Amount and HTTP Memory Cache Size defined currently is not suffeciant enough for \
reading and buffering enough data from the server.

There is also a bug in the HTTP parser, for the Key Value pair which comes as part of \
the HTTP response. When the client select HD content, server redirects with a new URI \
(for the HD content), which contains ‘,’ as part of the URI and current parser uses \
‘,’ as the delimiter for the next Value.


Solution:  

Increased TCP read buffer size from 1.5K to 64K (which is the MAX size of IP Packet)
And also increased MAX BUFFER before Process Idle to 1 MB compare to earlier value of \
64 KB

All these changes are protected under SYMBIAN flag, so that it won’t break the \
functionality of other platforms.

Also, taken care of a possible memory leak in case of error case in base controller.

Files added:  
NONE
 
Files modified:  

/cvsroot/clientapps/symbiancommon/config/R1_Mobile_4_0_Factory.cfg 
/cvsroot/clientapps/symbianMmf/common/hxmmfbasectrl.cpp 
/cvsroot/common/include/hxnet.h
/cvsroot/filesystem/http/httpfsys.cpp
/cvsroot/protocol/http/httppars.cpp
                           
Image size and heap use impact:  Negligible
 
Module release testing (STIF): 
 
Test case(s) added:  No  
 
Memory leak check performed:  NA
 
Platforms and profiles build verified:  helix-client-s60-52-mmf-mdf-dsp, \
helix-client-symbian-4  
Platforms and profiles functionality verified:  armv5 
 
Branch:  210CayS, 420Brizo, HEAD 

Diff: <attached>




Index: httpfsys.cpp
===================================================================
RCS file: /cvsroot/filesystem/http/httpfsys.cpp,v
retrieving revision 1.134.4.7
retrieving revision 1.134.4.8
diff -u -d -r1.134.4.7 -r1.134.4.8
--- httpfsys.cpp	10 Mar 2011 00:04:20 -0000	1.134.4.7
+++ httpfsys.cpp	18 Apr 2011 16:59:29 -0000	1.134.4.8
@@ -183,7 +183,11 @@
 #define DEF_CACHE_DB            "helix_http_cache_db"
 #endif // USE_TEMP_CACHE_LOCATION
 
+#ifdef SYMBIAN
+#define HTTP_MAX_BUFFER_BEFORE_PROCESSIDLE (1024 * 1024)
+#else
 #define HTTP_MAX_BUFFER_BEFORE_PROCESSIDLE (64 * 1024)
+#endif
 
 #if !defined(HELIX_CONFIG_NOSTATICS) 
 CCacheEntry*   g_pCacheEntry = NULL;
@@ -200,9 +204,17 @@
 // threshhold to see if it's better to do a seek or
 // just wait for old-fashioned reading to catch up
 #if defined(HELIX_FEATURE_MIN_HEAP)
+#ifdef SYMBIAN
+#define BYTE_RANGE_SEEK_THRESHHOLD (1024 * 1024)
+#else
 #define BYTE_RANGE_SEEK_THRESHHOLD (4 * 1024)
+#endif
+#else
+#ifdef SYMBIAN
+#define BYTE_RANGE_SEEK_THRESHHOLD (1024 * 1024)
 #else
 #define BYTE_RANGE_SEEK_THRESHHOLD (256 * 1024)
+#endif
 #endif // HELIX_FEATURE_MIN_HEAP
 
 // MemCache Setting
@@ -219,15 +231,20 @@
 #define MIN_MEM_CACHE_SIZE	0x00000000
 #endif	// HELIX_FEATURE_HTTP_MEMCACHE
 
-#define MEM_CACHE_TRIM_THRESHOLD_DENOM	    4	    // Denominator indicating fraction \
                of the
-						    // mem cache capacity that needs to be
-						    // present in direct path of data read
-						    // to avoid trimming the memory to make
-						    // room for additional data.
-						    // It also indicates the fraction by which
-						    // the mem-cache will be trimmed when
-						    // more room is needed.
-						    // Must be >= 2  (>= 50% of mem cache capacity).
+// Denominator indicating fraction of the
+// mem cache capacity that needs to be
+// present in direct path of data read
+// to avoid trimming the memory to make
+// room for additional data.
+// It also indicates the fraction by which
+// the mem-cache will be trimmed when
+// more room is needed.
+// Must be >= 2  (>= 50% of mem cache capacity).
+#ifdef SYMBIAN
+#define MEM_CACHE_TRIM_THRESHOLD_DENOM	    10
+#else
+#define MEM_CACHE_TRIM_THRESHOLD_DENOM	    4
+#endif
 						    
 #define DFLT_MEM_CACHE_CONTIG_LENGTH_TRIM_THRESHOLD (DFLT_MEM_CACHE_SIZE / \
MEM_CACHE_TRIM_THRESHOLD_DENOM)  #define DFLT_MEM_CACHE_TRIM_SIZE		    \
(DFLT_MEM_CACHE_SIZE / MEM_CACHE_TRIM_THRESHOLD_DENOM) @@ -3141,14 +3158,17 @@
             {
                 // Read directly into the buffer
                 ULONG32 ulActual = 0;
-
-                HX_RESULT hxr = m_pChunkyRes->GetData(m_ulCurrentReadPosition,
+                // Copy the data only if we have some data read
+                if(ulReadCount)
+                {
+                    HX_RESULT hxr = m_pChunkyRes->GetData(m_ulCurrentReadPosition,
                                     (char*) pBuffer->GetBuffer(),
                                     ulReadCount,
                                     &ulActual);
 
-                HX_ASSERT(ulActual == ulReadCount);
-                _SetCurrentReadPos(m_ulCurrentReadPosition + ulActual);
+                    HX_ASSERT(ulActual == ulReadCount);
+                    _SetCurrentReadPos(m_ulCurrentReadPosition + ulActual);
+                }
 
                 /* Remove from pending list */
                 m_PendingReadList.RemoveHead();


_______________________________________________
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