Reduce buffer sizes related to HTTP media data transfer in order to reduce the probability of a connection timeout/reset due to long periods of time between socket activity.

Change-Id: I799ce1d58d56a31088a89603d8a18d24780f5b57
related-to-bug: 2492187
This commit is contained in:
Andreas Huber
2010-03-10 16:59:28 -08:00
parent 3802141d17
commit fb1eb6fbc9
3 changed files with 2 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ protected:
private:
enum {
kBufferSize = 64 * 1024
kBufferSize = 32 * 1024
};
String8 mHeaders;

View File

@@ -102,7 +102,7 @@ sp<DataSource> DataSource::CreateFromURI(
source = new FileSource(uri + 7);
} else if (!strncasecmp("http://", uri, 7)) {
source = new HTTPDataSource(uri, headers);
source = new CachingDataSource(source, 64 * 1024, 10);
source = new CachingDataSource(source, 32 * 1024, 20);
} else {
// Assume it's a filename.
source = new FileSource(uri);

View File

@@ -20,7 +20,6 @@
#include "include/StagefrightMetadataRetriever.h"
#include <media/stagefright/CachingDataSource.h>
#include <media/stagefright/ColorConverter.h>
#include <media/stagefright/DataSource.h>
#include <media/stagefright/FileSource.h>