Distinguish "supported codec" from "valid codec"
Categories
(Core :: Audio/Video: Web Codecs, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox118 | --- | fixed |
People
(Reporter: chunmin, Assigned: chunmin)
References
(Blocks 1 open bug)
Details
Attachments
(7 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
We need to distinguish the concept of a "supported" codec string from a "valid" codec string to meet the latest spec validating the codec here (bug 1843974). In short, the "invalid" is more like "empty" rather than "unrecognized". The "recognized" string must be a "valid" string, while the "valid" string may be "unrecognized". A "recognized" codec may not be "supported". That is, "valid" codec strings set ⊇ "recognized" codec strings set ⊇ "supported" codec strings set.
For example, the codec string "theora" is "valid" but it's "unsupported" in WebCodecs.
Assignee | ||
Comment 1•11 months ago
|
||
By the latest spec about validating VideoDecoderConfig, the codec string
can have leading and trailing spaces, so we should trim them to get the
real codec string.
[1] https://w3c.github.io/webcodecs/#valid-videodecoderconfig
Assignee | ||
Comment 2•11 months ago
|
||
This patch adds a function to get the pointer pointing to the value in
Optional if any.
Depends on D184870
Assignee | ||
Comment 3•11 months ago
|
||
This patch addes a struct that holds the parameters needed for
GuessMIMETypes() and the struct members can be set automatically from
VideoDecoderConfig{Internal}.
Depends on D184871
Assignee | ||
Comment 4•11 months ago
|
||
By the latest spec [1], the "invalid" is more like "empty" rather than
"supported". The "supported" codec must be a "valid" codec, while the
"valid" codec may be "unsupported".
[1] https://github.com/w3c/webcodecs/pull/707
Depends on D184872
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Updated•11 months ago
|
Assignee | ||
Comment 5•11 months ago
|
||
The code has been updated to meet the latest spec in previous patches,
so the expected test results of the corresponding WPTs need to be
updated as well.
Since the corresponding WPTs for configure is out-of-spec, those
expected results will be changed in next patch instead.
Depends on D184873
Assignee | ||
Comment 6•11 months ago
|
||
By step 6-3 in VideoDecoder's configure method, when the codec is
unsupported, the NotSupportedError will be delivered within the error
callback via Close-VideoDecoder algorithm, instead of being throwed
directly when configure method is called.
[1] https://w3c.github.io/webcodecs/#dom-videodecoder-configure
Depends on D185602
Assignee | ||
Comment 7•11 months ago
|
||
Depends on D185603
Pushed by cchang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cd7a5604e5c8 Trim leading and trailing spaces in codec string r=padenot https://hg.mozilla.org/integration/autoland/rev/c85f0431aa2a Add a shortcut to get pointer from Optional r=padenot https://hg.mozilla.org/integration/autoland/rev/2971219bf521 Pack GuessMIMETypes parameters into struct r=padenot https://hg.mozilla.org/integration/autoland/rev/c7b50d615dfb Distinguish "supported" from "valid" codec r=padenot https://hg.mozilla.org/integration/autoland/rev/0a9b9052fa63 Update isConfigSupported's WPT expectation r=padenot https://hg.mozilla.org/integration/autoland/rev/14c5bb13b4ac Make WPTs spec-compliant r=padenot https://hg.mozilla.org/integration/autoland/rev/ae4f74d6364a Ensure codec string with spaces is valid r=padenot
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41421 for changes under testing/web-platform/tests
Comment 10•10 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cd7a5604e5c8
https://hg.mozilla.org/mozilla-central/rev/c85f0431aa2a
https://hg.mozilla.org/mozilla-central/rev/2971219bf521
https://hg.mozilla.org/mozilla-central/rev/c7b50d615dfb
https://hg.mozilla.org/mozilla-central/rev/0a9b9052fa63
https://hg.mozilla.org/mozilla-central/rev/14c5bb13b4ac
https://hg.mozilla.org/mozilla-central/rev/ae4f74d6364a
Upstream PR merged by moz-wptsync-bot
Description
•