diff options
author | Manikanta Kanamarlapudi <kmanikan@codeaurora.org> | 2015-01-30 18:01:48 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-02-20 18:12:50 -0800 |
commit | bdd4f708ca378343bb0da40b4b691a97853737e7 (patch) | |
tree | 085aa5ac265f97d2d9973eca1ab8dde5640150f4 | |
parent | aa8e89b1b24af1b57d54df7c353a18cd70be5144 (diff) | |
download | frameworks_av-bdd4f708ca378343bb0da40b4b691a97853737e7.tar.gz frameworks_av-bdd4f708ca378343bb0da40b4b691a97853737e7.tar.bz2 frameworks_av-bdd4f708ca378343bb0da40b4b691a97853737e7.zip |
stagefright: Increase block size for download
Since a single TCP/IP packet can contain up to 64k of data, increase
the block size in PlaylistFetcher from 2k to lcm(188, 1024) or 47k to
avoid inaccuracies in read timings due to up to a comparable 47 reads
from the same locally-cached packet instead of from the network
CRs-Fixed: 771954
Change-Id: I348dc1fc080b822e086729638cc0ff166a13016d
-rw-r--r-- | media/libstagefright/httplive/PlaylistFetcher.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/httplive/PlaylistFetcher.cpp b/media/libstagefright/httplive/PlaylistFetcher.cpp index b3aea67e19..261df3527f 100644 --- a/media/libstagefright/httplive/PlaylistFetcher.cpp +++ b/media/libstagefright/httplive/PlaylistFetcher.cpp @@ -48,7 +48,8 @@ namespace android { // static const int64_t PlaylistFetcher::kMinBufferedDurationUs = 10000000ll; const int64_t PlaylistFetcher::kMaxMonitorDelayUs = 3000000ll; -const int32_t PlaylistFetcher::kDownloadBlockSize = 2048; +// LCM of 188 (size of a TS packet) & 1k works well +const int32_t PlaylistFetcher::kDownloadBlockSize = 47 * 1024; const int32_t PlaylistFetcher::kNumSkipFrames = 5; PlaylistFetcher::PlaylistFetcher( |