Check AudioDecoderConfig's description for some codecs
Categories
(Core :: Audio/Video: Web Codecs, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox131 | --- | fixed |
People
(Reporter: chunmin, Assigned: chunmin)
Details
Attachments
(1 obsolete file)
By https://w3c.github.io/webcodecs/codec_registry.html#audio-codec-registry, we should check if description is present in AudioDecoderConfig for some codecs like vorbis and flac. The below is a summary chart.
| codec name | codec string | description | public specification |
|---|---|---|---|
| Flac | flac | required | https://www.w3.org/TR/webcodecs-flac-codec-registration/ |
| MP3 | mp3 | not used | https://www.w3.org/TR/webcodecs-mp3-codec-registration/ |
| AAC | mp4a.* | bitstream is assumed to be aac if description is present. Otherwise, adts | https://www.w3.org/TR/webcodecs-aac-codec-registration/ |
| Opus | opus | bitstream is assumed to be ogg if description is present. Otherwise, opus | https://www.w3.org/TR/webcodecs-opus-codec-registration/ |
| Vorbis | vorbis | required | https://www.w3.org/TR/webcodecs-vorbis-codec-registration/ |
| u-law PCM | ulaw | omitted | https://www.w3.org/TR/webcodecs-ulaw-codec-registration/ |
| A-law PCM | alaw | omitted | https://www.w3.org/TR/webcodecs-alaw-codec-registration/ |
| Linear PCM | pcm-* | omitted | https://www.w3.org/TR/webcodecs-pcm-codec-registration/ |
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
By FLAC and Vorbis specs for WebCodecs [1, 2], the description data in
their AudioDecoderConfigs are required. Previously, no check for
description data is in WebCodecs code. This patch ensures that the
description is present for the FLAV and Vorbis codecs.
[1] https://www.w3.org/TR/webcodecs-flac-codec-registration/
[2] https://www.w3.org/TR/webcodecs-vorbis-codec-registration/
Comment 4•1 year ago
|
||
| bugherder | ||
Comment 6•1 year ago
|
||
This is unfortunately incorrect, it means that:
AudioDecoder.isConfigSupport({codec: "flac", numberOfChannels: 1, sampleRate: 48000});
resolves to a promise that says that it isn't supported (and it should say yes). Unfortunately, audioDecoder-codec-specific.https.any.js lacked tests for those two codecs, and the tests added are incorrect. The spec for this is: https://w3c.github.io/webcodecs/#check-configuration-support, and the check is intentionally not very thorough: this method is meant to know if this implementation generally supports a codec, not to check if configure(...) will success with very specific parameters. In general, isConfigSupported is done ahead of downloading any media content, so we don't have a description here.
Updated•1 year ago
|
Description
•