forked from chromium/chromium
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MSE] [webcodecs] API for playing webcodecs media with MSE
Stubs new MSE methods and overloads that, when fully implemented in later changes, would allow: 1. use of WebCodecs decoder configs as addSourceBuffer() and changeType() arguments (in lieu of parsing initialization segments from a container bytestream), and 2. buffering of WebCodecs encoded chunks via appendEncodedChunks() (in lieu of parsing media segments from a container bytestream). Much of the complexity of this initial change is in the coordination of the IDL bindings generator to achieve disambiguated overload resolution, primarily to keep the exposed API simple (only 1 actual new method name is added, corresponding to bullet 2, above), using two approaches: * Dictionary of Dictionaries: SourceBufferConfig wraps either a WebCodecs audio or video decoder configuration. Without such a distinct new type wrapping them, unioning or overloading would fail to resolve. * Unions, with caveats: the new appendEncodedChunks method takes either sequences of audio or video chunks, or single audio or video chunks, all in a single argument of IDL union type. Caveat: "sequence<A> or sequence<V>" cannot be disambiguated by the bindings, so sequence<A or V> is used in this change. Regardless, the eventual implementation would need to validate that all in the sequence are either A or all are V (along with the usual validation that appended chunks or frames also appear to use the most recent SourceBufferConfig). Caveat: The bindings generator requires help when generated union type identifiers are too long for some platforms. This change adds a seventh case to the existing hard-coded lists of names that need shortening with the generator. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/bejy1nmoWmU/m/CQ90X3j5BQAJ TAG early-design review request: w3ctag/design-reviews#576 Explainer: https://github.com/wolenetz/mse-for-webcodecs/blob/main/explainer.md MSE spec bug: w3c/media-source#184 BUG=1144908 Change-Id: Ibc8bd806fe1790ae74fe5ce86865cdfebcdc3096 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2515199 Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Dan Sanders <sandersd@chromium.org> Reviewed-by: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#830837}
- Loading branch information
Showing
20 changed files
with
194 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.