Skip to content

[MediaCapabilities][GST] Check audio codecs support isConfigurationSu… - #1640

Closed
asurdej-comcast wants to merge 1 commit into
WebPlatformForEmbedded:wpe-2.46from
asurdej-comcast:media_capabilities_audio_codec
Closed

asurdej-comcast wants to merge 1 commit into
WebPlatformForEmbedded:wpe-2.46from
asurdej-comcast:media_capabilities_audio_codec

Conversation

@asurdej-comcast

@asurdej-comcast asurdej-comcast commented Mar 16, 2026 •

Copy link
Copy Markdown

…pported()

Previously, isConfigurationSupported() only validated video codecs against the registered decoder/encoder map; audio codecs from the audio configuration were never checked, so unsupported audio codecs would incorrectly be reported as supported.

Fix this by collecting codec strings from both the video and audio ContentType objects into a single vector and running the software and hardware codec support checks once on the combined list at the end of the function.

a8e4be0

Build-Tests Layout-Tests
✅ 🛠 wpe-246-amd64-build ✅ 🧪 wpe-246-amd64-layout
✅ 🛠 wpe-246-arm32-build ✅ 🧪 wpe-246-arm32-layout

…pported()

Previously, isConfigurationSupported() only validated video codecs against the
registered decoder/encoder map; audio codecs from the audio configuration were
never checked, so unsupported audio codecs would incorrectly be reported as
supported.

Fix this by collecting codec strings from both the video and audio
ContentType objects into a single vector and running the software and hardware
codec support checks once on the combined list at the end of the function.
@asurdej-comcast
asurdej-comcast requested a review from philn as a code owner March 16, 2026 14:36
@modeveci
modeveci requested review from vivienne-w and removed request for philn March 17, 2026 11:37
@eocanha
eocanha requested review from eocanha and removed request for vivienne-w March 18, 2026 17:41
@eocanha eocanha added the upstream Related to an upstream bug (or should be at some point) label Mar 18, 2026
@eocanha eocanha self-assigned this Mar 18, 2026
@eocanha

eocanha commented Mar 18, 2026

Copy link
Copy Markdown
Member

webkit-commit-queue pushed a commit to eocanha/WebKit that referenced this pull request Mar 25, 2026
…tionSupported()

https://bugs.webkit.org/show_bug.cgi?id=310195

Reviewed by Xabier Rodriguez-Calvar.

Currently, isConfigurationSupported() only validates video codecs
against the registered decoder/encoder map. Audio codecs from the audio
configuration were never checked, so unsupported audio codecs could
incorrectly be reported as supported.

See: WebPlatformForEmbedded/WPEWebKit#1640

Fix this by collecting codec strings from both the video and audio
ContentType objects into a single vector and running the software codec
support checks once on the combined list at the end of the function.

Audio hardware accelerated decoding doesn't save much CPU power compared
to video accelerated decoding, and we don't want to reject a video+audio
codec combination just because the audio part isn't accelerated. That's
why the hardware accelerated decoding support checks are only run on the
video codecs.

A new platform-specific layout test has been added to check that common
audio formats and codecs are properly detected (but without
power-efficient decoding, that is, without hardware decoding), while an
unexistent "fictional" codec is rejected.

Co-authored by: Andrzej Surdej (https://github.com/asurdej-comcast)

* LayoutTests/platform/glib/media/mediacapabilities/audio-decoding-info-expected.txt: Added.
* LayoutTests/platform/glib/media/mediacapabilities/audio-decoding-info.html: Added.
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::isConfigurationSupported const): Collect audio codecs and run the codec checks.

Canonical link: https://commits.webkit.org/309939@main
eocanha added a commit that referenced this pull request Mar 25, 2026
…tionSupported()

https://bugs.webkit.org/show_bug.cgi?id=310195

Reviewed by Xabier Rodriguez-Calvar.

Currently, isConfigurationSupported() only validates video codecs
against the registered decoder/encoder map. Audio codecs from the audio
configuration were never checked, so unsupported audio codecs could
incorrectly be reported as supported.

See: #1640

Fix this by collecting codec strings from both the video and audio
ContentType objects into a single vector and running the software codec
support checks once on the combined list at the end of the function.

Audio hardware accelerated decoding doesn't save much CPU power compared
to video accelerated decoding, and we don't want to reject a video+audio
codec combination just because the audio part isn't accelerated. That's
why the hardware accelerated decoding support checks are only run on the
video codecs.

A new platform-specific layout test has been added to check that common
audio formats and codecs are properly detected (but without
power-efficient decoding, that is, without hardware decoding), while an
unexistent "fictional" codec is rejected.

Co-authored by: Andrzej Surdej (https://github.com/asurdej-comcast)

* LayoutTests/platform/glib/media/mediacapabilities/audio-decoding-info-expected.txt: Added.
* LayoutTests/platform/glib/media/mediacapabilities/audio-decoding-info.html: Added.
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::isConfigurationSupported const): Collect audio codecs and run the codec checks.

Canonical link: https://commits.webkit.org/309939@main
@eocanha

eocanha commented Mar 25, 2026

Copy link
Copy Markdown
Member

PR landed upstream as WebKit/WebKit@e89e1a0 and backported to wpe-2.46 as 2ad5899. Closing PR.

@eocanha eocanha closed this Mar 25, 2026
justinmichaud pushed a commit to justinmichaud/WebKit that referenced this pull request Jul 6, 2026
…tionSupported()

https://bugs.webkit.org/show_bug.cgi?id=310195

Reviewed by Xabier Rodriguez-Calvar.

Currently, isConfigurationSupported() only validates video codecs
against the registered decoder/encoder map. Audio codecs from the audio
configuration were never checked, so unsupported audio codecs could
incorrectly be reported as supported.

See: WebPlatformForEmbedded/WPEWebKit#1640

Fix this by collecting codec strings from both the video and audio
ContentType objects into a single vector and running the software codec
support checks once on the combined list at the end of the function.

Audio hardware accelerated decoding doesn't save much CPU power compared
to video accelerated decoding, and we don't want to reject a video+audio
codec combination just because the audio part isn't accelerated. That's
why the hardware accelerated decoding support checks are only run on the
video codecs.

A new platform-specific layout test has been added to check that common
audio formats and codecs are properly detected (but without
power-efficient decoding, that is, without hardware decoding), while an
unexistent "fictional" codec is rejected.

Co-authored by: Andrzej Surdej (https://github.com/asurdej-comcast)

* LayoutTests/platform/glib/media/mediacapabilities/audio-decoding-info-expected.txt: Added.
* LayoutTests/platform/glib/media/mediacapabilities/audio-decoding-info.html: Added.
* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::isConfigurationSupported const): Collect audio codecs and run the codec checks.

Canonical link: https://commits.webkit.org/309939@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream Related to an upstream bug (or should be at some point) wpe-2.46

Development

Successfully merging this pull request may close these issues.

3 participants