Closed Bug 1915002 Opened 1 year ago Closed 1 year ago

Check AudioDecoderConfig's description for some codecs

Categories

(Core :: Audio/Video: Web Codecs, defect, P1)

defect

Tracking

()

RESOLVED FIXED
131 Branch
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/
Severity: -- → N/A
OS: Unspecified → All
Priority: -- → P1
Hardware: Unspecified → All

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/

Pushed by cchang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6ff3f1fba36f Check AudioDecoderConfig description for FLAC and Vorbis r=media-playback-reviewers,alwu
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/47817 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
Upstream PR merged by moz-wptsync-bot

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.

Attachment #9420921 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: