Skip to content

[GStreamer] Report support for supported non-AAC mp4a codecs - #62913

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
ntrrgc:pr-2026-04-16-mp4a
Apr 20, 2026
Merged

webkit-commit-queue merged 1 commit into
WebKit:mainfrom
ntrrgc:pr-2026-04-16-mp4a

Conversation

@ntrrgc

@ntrrgc ntrrgc commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

2566042

[GStreamer] Report support for supported non-AAC mp4a codecs
https://bugs.webkit.org/show_bug.cgi?id=312501

Reviewed by Xabier Rodriguez-Calvar.

https://commits.webkit.org/310634@main made it so that we no longer mark
all codec strings starting with "mp4a." as supported the moment we find
an MPEG-4 AAC decoder, instead allowing only the specific codec strings
used by AAC.

There are however other audio codec that use strings that start with
"mp4a.", that were already working, and for which WebKit reported
support, even if only accidentally due to finding an AAC decoder.

Notably, this the case for MP3 (mp4a.6b and mp4a.69), AC-3 (mp4a.a5) and
EAC-3 (mp4a.a6). This regression was identified with the MVT test suite:
https://github.com/rdkcentral/MVT

This patch adds those codec strings to GStreamerRegistryScanner when
appropriate decoders are found, both fixing the regression and ensuring
support is not reported accidentally.

Previously the code for initializeDecoders() implied MPEG-1 and MPEG-2
audio is not supported with MSE, even though it was already working and
reported as supported. This patch moves the support check code to the
part of the function common for both MSE and non-MSE.

Support for mp4a.67 has been moved to the check for audio/mpeg,
mpegversion=2. Although in practice virtually all AAC decoders will
support both mpegversion=2 and mpegversion=4, this is the technically
correct place for it.

As a drive-by fix, the logging in GStreamerRegistryScanner::refresh()
has been fixed: all codecs were being reported as being hardware-based
due to leftovers from a refactor.

* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::refresh):
(WebCore::GStreamerRegistryScanner::initializeDecoders):

Canonical link: https://commits.webkit.org/311571@main

9a0d64a

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 ios-safer-cpp ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@ntrrgc
ntrrgc requested a review from philn as a code owner April 16, 2026 19:25
@ntrrgc ntrrgc self-assigned this Apr 16, 2026
@ntrrgc ntrrgc added the WebKitGTK Bugs related to the Gtk API layer. label Apr 16, 2026
@ntrrgc ntrrgc added the merge-queue Applied to send a pull request to merge-queue label Apr 20, 2026
https://bugs.webkit.org/show_bug.cgi?id=312501

Reviewed by Xabier Rodriguez-Calvar.

https://commits.webkit.org/310634@main made it so that we no longer mark
all codec strings starting with "mp4a." as supported the moment we find
an MPEG-4 AAC decoder, instead allowing only the specific codec strings
used by AAC.

There are however other audio codec that use strings that start with
"mp4a.", that were already working, and for which WebKit reported
support, even if only accidentally due to finding an AAC decoder.

Notably, this the case for MP3 (mp4a.6b and mp4a.69), AC-3 (mp4a.a5) and
EAC-3 (mp4a.a6). This regression was identified with the MVT test suite:
https://github.com/rdkcentral/MVT

This patch adds those codec strings to GStreamerRegistryScanner when
appropriate decoders are found, both fixing the regression and ensuring
support is not reported accidentally.

Previously the code for initializeDecoders() implied MPEG-1 and MPEG-2
audio is not supported with MSE, even though it was already working and
reported as supported. This patch moves the support check code to the
part of the function common for both MSE and non-MSE.

Support for mp4a.67 has been moved to the check for audio/mpeg,
mpegversion=2. Although in practice virtually all AAC decoders will
support both mpegversion=2 and mpegversion=4, this is the technically
correct place for it.

As a drive-by fix, the logging in GStreamerRegistryScanner::refresh()
has been fixed: all codecs were being reported as being hardware-based
due to leftovers from a refactor.

* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::refresh):
(WebCore::GStreamerRegistryScanner::initializeDecoders):

Canonical link: https://commits.webkit.org/311571@main
@webkit-commit-queue

Copy link
Copy Markdown
Collaborator

Committed 311571@main (2566042): https://commits.webkit.org/311571@main

Reviewed commits have been landed. Closing PR #62913 and removing active labels.

@aperezdc

Copy link
Copy Markdown
Contributor

Backported into webkitglib/2.52 as commit b7ef457

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebKitGTK Bugs related to the Gtk API layer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants