Closed Bug 1143514 Opened 5 years ago Closed 5 years ago

SourceBuffer shouldn't be added to ActiveSourceBuffers list upon creation

Categories

(Core :: Audio/Video, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox38 --- fixed
firefox39 --- fixed

People

(Reporter: jya, Assigned: jya)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

Per spec:
http://w3c.github.io/media-source/#widl-MediaSource-addSourceBuffer-SourceBuffer-DOMString-type

List the steps required when creating a sourcebuffer. Note that there aren't any references to ActiveSourceBuffers list.

The definition of ActiveSourceBuffers being:
http://w3c.github.io/media-source/#widl-MediaSource-activeSourceBuffers

"Contains the subset of sourceBuffers that are providing the selected video track, the enabled audio track(s), and the "showing" or "hidden" text track(s).

SourceBuffer objects in this list must appear in the same order as they appear in the sourceBuffers attribute. (e.g., If only sourceBuffers[0] and sourceBuffers[3] are in activeSourceBuffers, then activeSourceBuffers[0] must equal sourceBuffers[0] and activeSourceBuffers[1] must equal sourceBuffers[3].)
"

At creation time, the sourcebuffer object is empty, as such, it can't provide the selected video track, then enabled video track etc...

This cause failure of the webref test: media-source/mediasource-append-buffer.html

We don't support track selection, so at this stage, adding the sourcebuffer to activeSourceBuffers after a appendBuffer succeeded is probably sufficient.
Only add sourcebuffer to ActiveSourceBuffers list once we've proccessed the first init segment.
Attachment #8577887 - Flags: review?(cajbir.bugzilla)
Assignee: nobody → jyavenard
Status: NEW → ASSIGNED
Attached patch Part2. Update webref results (obsolete) — Splinter Review
Update webref results
Attachment #8577894 - Flags: review?(karlt)
Those tests were all failing for the same reason. Wonder why it's still failing for AAC and H.264 though. Will look into it in another bug
Attachment #8577917 - Flags: review?(karlt)
Attachment #8577894 - Attachment is obsolete: true
Attachment #8577894 - Flags: review?(karlt)
Attached patch Update mochitestSplinter Review
Update mochitest to test the proper behaviour
Attachment #8577980 - Flags: review?(cajbir.bugzilla)
First post should have contained:

From W3C: http://w3c.github.io/media-source/#sourcebuffer-init-segment-received
Step 5: "If active track flag equals true, then run the following steps:

    Add this SourceBuffer to activeSourceBuffers.
    Queue a task to fire a simple event named addsourcebuffer at activeSourceBuffers
"
Attachment #8577917 - Flags: review?(karlt) → review+
Attachment #8577980 - Flags: review?(cajbir.bugzilla) → review+
Attachment #8577887 - Flags: review?(cajbir.bugzilla) → review+
To whomever it may concern, if this gets approved for uplift to Aurora, we'll probably want to revert https://hg.mozilla.org/releases/mozilla-aurora/rev/55d8ab6f1700 at that time.
Comment on attachment 8577887 [details] [diff] [review]
Part1. Only add sourcebuffer to ActiveSourceBuffers once active

Blanket approval request for all patches in this ticket

Approval Request Comment
[Feature/regressing bug #]:1143514
[User impact if declined]: Compliance issue, tests failing.
[Describe test coverage new/current, TreeHerder]: Been in m-c for over a week.
[Risks and why]: Low. We're just being more compliant
[String/UUID change made/needed]:None
Attachment #8577887 - Flags: approval-mozilla-aurora?
Flags: needinfo?(jyavenard)
Attachment #8577887 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8577917 - Flags: approval-mozilla-aurora+
Attachment #8577980 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.