Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSE-for-WebCodecs: detection of mismatch of append format (WC vs BSF) is deferred and could produce decode err #301

Open
wolenetz opened this issue Oct 1, 2021 · 0 comments

Comments

@wolenetz
Copy link
Member

wolenetz commented Oct 1, 2021

MSE-for-WebCodecs feature issue is #184.

The prototype implementation of this feature in Chromium informed the initial draft spec. One of these considerations may need adjusting:

If a SourceBuffer was configured to expect appendBuffer (by addSourceBuffer or changeType), but appendEncodedChunks occurs instead (or vice-versa), the synchronous portions of the respective appendBuffer or appendEncodedChunks call do not detect this. Instead, the respective asynchronous "Buffer Append" or "Chunks Append" algorithms detect this and produce an append error, which produces a decode error.

Since this situation is rapidly detectable in the synchronous portion, and the consequence of delayed detection could cause the need to tear down the MSE attachment and restart it due to decode error, this issue tracks possibly updating the specification to do this rapid detection and non-fatal exception throwing or promise rejection, respectively, instead.

I've filed this to track likely upcoming work while this feature spec and implementation is stabilizing. Comments are most certainly welcome.

@wolenetz wolenetz changed the title MSE-for-WebCodecs: disagreement of append format (WC vs BSF) is deferred and could produce decode err MSE-for-WebCodecs: detection of mismatch of append format (WC vs BSF) is deferred and could produce decode err Oct 1, 2021
wolenetz added a commit to wolenetz/media-source that referenced this issue Oct 1, 2021
Fixes reference to the sourceBuffer in removeSourceBuffer()'s promise
abort step.
Updates the coded frame eviction algorithm's definition of |new data| to
possibly be EncodedChunks being appended.
Adds top-level steps for appendEncodedChunks().
Updates abort() and removeSourceBuffer() handling to conditionally
reject promise vs abort / updateend firing.
Updates reset parser state algorithm to clear any EncodedChunks from the
input configs and chunks slot, but leave any WebCodecs config there.
References w3c#301 for discussion from each of appendBuffer() and
appendEncodedChunks().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant