Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a554246a authored by Leena Winterrowd's avatar Leena Winterrowd Committed by Steve Kondik
Browse files

stagefright: httplive: Decouple block size from bandwidth estimate

A very small block size in PlaylistFetcher can lead to framework
overhead and difficulty streaming high bitrate content, but since
HTTPBase keeps a constant history of the past 100 HTTP reads, the
block size directly affects bandwidth estimation and in turn,
switching latency.

Add setBandwidthHistorySize() to HTTPBase to allow setting the
history size for bandwidth estimation. Call this within LiveSession
based on the current block size to ensure that the number of bytes
used for estimating bandwidth does not change if the block size is
changed in PlaylistFetcher.

Since a single TCP/IP packet can contain up to 64k of data, increase
the block size in PlaylistFetcher from 2k to 32k to avoid
inaccuracies in read timings due to up to 32 reads from the same
locally-cached packet instead of from the network.

Also make HTTPBase::addBandwidthMeasurement() virtual to allow
bandwidth estimation extensions that do not rely on a history list.

Change-Id: I5f957be01f5346e74cfb7eeb150ca4b397ad5798
parent ffa98d52
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment