- From: <bugzilla@jessica.w3.org>
- Date: Mon, 01 Jun 2015 02:40:20 +0000
- To: public-html-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28727 Bug ID: 28727 Summary: [MSE] Per spec, no frame will be removed when changing mediasource duration Product: HTML WG Version: unspecified Hardware: PC OS: All Status: NEW Severity: normal Priority: P2 Component: Media Source Extensions Assignee: wolenetz@google.com Reporter: jyavenard@mozilla.com QA Contact: public-html-bugzilla@w3.org CC: jdsmith@microsoft.com, mike@w3.org, public-html-media@w3.org In the spec, in the duration change algorithm we have: http://w3c.github.io/media-source/index.html#duration-change-algorithm "3. Update duration to new duration. 4. If the new duration is less than old duration, then run the range removal algorithm with new duration and old duration as the start and end of the removal range. " Note that the mediasource duration is updated prior to running the range removal algorithm. The range removal algorithm will call the coded frame removal algorithm (http://w3c.github.io/media-source/index.html#sourcebuffer-coded-frame-removal) Which states: "1. Let start be the starting presentation timestamp for the removal range. 2. Let end be the end presentation timestamp for the removal range. 3. For each track buffer in this source buffer, run the following steps: 3.1 Let remove end timestamp be the current value of duration" So remove end timestamp is set to the value of duration that was just set in the duration change algorithm. Because of this no data will be removed. An example: Say mediasource duration was +oo We have an audio track buffered range of 0 to 65.85 We set the mediasource duration to 32.925. As such, coded frame removal is called with start = 32.925 and end = +oo remove end timestamp is set to 32.925s; In the loop we will remove any frames >= 32.925 and < 32.925, that is none. In coded frame removal algorithm it should read: 3.1 Let remove end timestamp be the maximum of duration and the highest end time of the track buffer time range. Another change could have been: In the duration algorithm it should read: "1. If the current value of duration is equal to new duration, then return. 2. Set old duration to the current value of duration. 3. If the new duration is less than old duration, then run the range removal algorithm with new duration and old duration as the start and end of the removal range. 4. Update duration to new duration. " (steps 3 and and 4 inverted) However, as the coded frame algorithm is run asynchronously, we need to ensure that the new duration is only set once the coded frame algorithm has completed its course. Alternatively, "duration" should be passed to the coded frame removal algorithm so it doesn't have to rely on the timing at which it will be set. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Monday, 1 June 2015 02:40:22 UTC