Closed
Bug 1132796
Opened 10 years ago
Closed 10 years ago
Eviction code only ever remove all data.
Categories
(Core :: Audio/Video, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla38
Tracking | Status | |
---|---|---|
firefox36 | --- | unaffected |
firefox37 | + | fixed |
firefox38 | --- | fixed |
People
(Reporter: jya, Assigned: jya)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
15.78 KB,
patch
|
cajbir
:
review+
lmandel
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
As per title.
TracBuffer::Evict will always evict all data from a decoder until threshold is reach.
We have logic that will evict an entire decoder if it's past the current decoder ; however TrackBuffer::mCurrentDecoder is the decoder we're currently adding data to, it is always the last decoder created and as such always the last element of TrackBuffer::mDecoders.
So we always happen to call EvictAll() for all decoders.
We should only evict all data from past decoders and be selective on future decoders we're going to evict.
Assignee | ||
Comment 1•10 years ago
|
||
mCurrentDecoder is the decoder we're currently adding data to; not the decoder currently playing. It is always the last decoder in the list of decoders. As such, we were always evicting all data from all decoders but the currently playing one.
I split the loop in two as I felt it was clearer to understand.
We proceed in three steps, each step can be aborted if we've already evicted more data than required.
First step is to evict all past data from current playback position.
Step 2: Evict all data from decoders anterior to the currently playing one, assuming we've already played from those (and in practice unless you seek a lot, it's always true)
Step 3: We evict future data, starting from the furthest away, only keeping the currently playing reader and the next one we will be switching to once the current is done.
Attachment #8563902 -
Flags: review?(cajbir.bugzilla)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jyavenard
Status: NEW → ASSIGNED
Comment 2•10 years ago
|
||
Link to try run please.
Comment 3•10 years ago
|
||
Comment on attachment 8563902 [details] [diff] [review]
Evict data we likely previously read
Review of attachment 8563902 [details] [diff] [review]:
-----------------------------------------------------------------
r+ if try run is green-ish.
::: dom/media/mediasource/MediaSourceDecoder.h
@@ +85,5 @@
> + // Return a decoder from the set available in aTrackDecoders that has data
> + // available in the range requested by aTarget.
> + already_AddRefed<SourceBufferDecoder> SelectDecoder(int64_t aTarget,
> + int64_t aTolerance,
> + const nsTArray<nsRefPtr<SourceBufferDecoder>>& aTrackDecoders);
Comment showing what units aTarget and aTolerance are in.
Attachment #8563902 -
Flags: review?(cajbir.bugzilla) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Implement step 6 of the Prepare Append Algorithm, if our buffer is full, throw a quota exceeded error
Attachment #8565231 -
Flags: review?(cajbir.bugzilla)
Assignee | ||
Comment 5•10 years ago
|
||
None of the mochitest or webref test stress the sourcebuffer size threshold.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e9b7c6dfb66f
Comment 6•10 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #5)
> None of the mochitest or webref test stress the sourcebuffer size threshold.
It's to ensure that changes don't break something unexpected elsewhere. The number of times code changes "shouldn't" break thinks vs does is not insignificant. It's also frustrating as a reviewer to review code that doesn't build or is broken that could easily be found on try. Then have to wait for those to be fixed to review again. So a try push before review is appreciated.
You don't have to do all platforms for the try push. I usually do one platform variant of linux, windows and android.
Comment 7•10 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #4)
> Created attachment 8565231 [details] [diff] [review]
> Part2. Return an error when attempting to append too much data
>
> Implement step 6 of the Prepare Append Algorithm, if our buffer is full,
> throw a quota exceeded error
Should this be a separate bug? Is it related to "Eviction code only ever remove all data"?
Assignee | ||
Comment 8•10 years ago
|
||
Comment on attachment 8565231 [details] [diff] [review]
Part2. Return an error when attempting to append too much data
Will fork this in a new bug..
Attachment #8565231 -
Attachment is obsolete: true
Attachment #8565231 -
Flags: review?(cajbir.bugzilla)
Assignee | ||
Comment 9•10 years ago
|
||
Implement step 6 of the Prepare Append Algorithm, if our buffer is full, throw a quota exceeded error
Attachment #8565250 -
Flags: review?(cajbir.bugzilla)
Assignee | ||
Comment 10•10 years ago
|
||
Comment on attachment 8565250 [details] [diff] [review]
Return an error when attempting to append too much data
https://hg.mozilla.org/integration/mozilla-inbound/rev/dad2b3245457
Attachment #8565250 -
Attachment is obsolete: true
Attachment #8565250 -
Flags: review?(cajbir.bugzilla)
Assignee | ||
Comment 11•10 years ago
|
||
I applied an old patch that didn't include bug 1132825. It overwrote that change :(
https://hg.mozilla.org/integration/mozilla-inbound/rev/7def63a22bed
Updated•10 years ago
|
Priority: -- → P1
Comment 12•10 years ago
|
||
Comment on attachment 8563902 [details] [diff] [review]
Evict data we likely previously read
Requesting 37 uplift for this change and the followup fix for reverting bug 1132825. Ideally for 37b1 since this is a P1 bug for MSE.
Approval Request Comment
[Feature/regressing bug #]: MSE
[User impact if declined]: Playback issues with YouTube. Less consistent testing and harder to port later fixes.
[Describe test coverage new/current, TreeHerder]: Green on inbound.
[Risks and why]: This is a large patch, but changes are specific to the MSE feature, so the risk of regression is low.
[String/UUID change made/needed]: None.
Attachment #8563902 -
Flags: approval-mozilla-aurora?
Comment 13•10 years ago
|
||
This has landed on central.
https://hg.mozilla.org/mozilla-central/rev/dad2b3245457
https://hg.mozilla.org/mozilla-central/rev/7def63a22bed
status-firefox36:
--- → unaffected
status-firefox37:
--- → affected
status-firefox38:
--- → fixed
Target Milestone: --- → mozilla38
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 14•10 years ago
|
||
Pushed to aurora with pre-approval from lmandel.
https://hg.mozilla.org/releases/mozilla-aurora/rev/65a768a861a5
Updated•10 years ago
|
tracking-firefox37:
--- → +
Comment 15•10 years ago
|
||
Comment on attachment 8563902 [details] [diff] [review]
Evict data we likely previously read
As stated, this bug was pre-approved to land with a set of changes for MSE. Marking the approval after the fact.
Attachment #8563902 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 16•10 years ago
|
||
Oops, I forgot to push the fixup patch from comment #11 to 37. Carrying forward a=lmandel for beta.
https://hg.mozilla.org/releases/mozilla-beta/rev/82ef773ccb71
Comment 18•10 years ago
|
||
This made landed on 37 aurora, so we're good on all three MSE branches now.
Flags: needinfo?(giles)
You need to log in
before you can comment on or make changes to this bug.
Description
•