[Bug 21172] User agents should automatically evict content when the buffer is full if possible

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21172

--- Comment #1 from Aaron Colwell <acolwell@chromium.org> ---
Would you mind if I address this by factoring Step 9 of remove()
(https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#widl-SourceBuffer-remove-void-double-start-double-end)
into a "coded frame removal algorithm" and then specify the eviction algorithm
with something along the following lines.

Coded Frame Eviction Algorithm:
1. Let _new_data_ equal the data that is about to be appended to this
SourceBuffer.
2. If the buffer full flag equals false, then abort these steps.
3. Let _removal_ranges_ equal a list of presentation time ranges that can be
evicted from the presentation to make room for the _new_data_.
4. For each range in _removal_ranges_, run the _coded_frame_removal_algorithm_
with _start_ and _end_ equal to the range start and end timestamp respectively.
5. If there is enough space in the buffer to accomodate the _new_data_, then
set buffer full flag to false.

Then the following step would be added before the _buffer_full_flag_ equals
true checks in appendArrayBuffer(), appendStream(), and the stream append loop.

- Run the _coded_frame_eviction_algorithm_.

I think this will make it explicit that eviction will happen before any new
data gets appended.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 4 March 2013 18:38:44 UTC