Branch: refs/heads/webkitglib/2.46
Home: https://github.com/WebKit/WebKit
Commit: c432757d342850e41fae43d04e65f7ed43d0b523
https://github.com/WebKit/WebKit/commit/c432757d342850e41fae43d04e65f7ed43d0b523
Author: Enrique Ocaña González <[email protected]>
Date: 2025-01-10 (Fri, 10 Jan 2025)
Changed paths:
M Source/WebCore/platform/SourcesGStreamer.txt
M Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
A Source/WebCore/platform/gstreamer/GStreamerQuirkOpenMAX.cpp
A Source/WebCore/platform/gstreamer/GStreamerQuirkOpenMAX.h
M Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp
M Source/WebCore/platform/gstreamer/GStreamerQuirks.h
Log Message:
-----------
Cherry-pick 288713@main (45b9cba6ef32).
https://bugs.webkit.org/show_bug.cgi?id=285030
[GStreamer][WebAudio][Quirks] Fix initial WebAudio cut on Raspberry Pi
https://bugs.webkit.org/show_bug.cgi?id=285030
Reviewed by Philippe Normand.
WebAudio playback eats up a portion of the start of a sound after a
silence on Raspberry Pi when using OpenMAX. This is because the silence
buffers are marked with the GAP flag by WebKitWebAudioSourceGStreamer
and that causes them not to be rendered by the audio sink. This, in
turn, causes OpenMAX (the platform media framework used on Raspbery Pi
32 bit) to cool down and when the first audible buffer arrives, it takes
a fraction of a second to warm up again and play audio back.
This patch avoids marking the buffers as GAP on these platforms, fixing
the issue. Inserting non-gap buffers periodically (even with a frequency
of one non-gap per every gap) is not enough to solve the problem, so the
only alternative is to avoid gap buffers completely.
* Source/WebCore/platform/SourcesGStreamer.txt: Added new
GStreamerQuirkOpenMAX.cpp file.
* Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcRenderAndPushFrames): Resort to quirks to process the
buffers (marking them as gap and drop there or not). Do it in-place if quirks
are disabled.
* Source/WebCore/platform/gstreamer/GStreamerQuirkOpenMAX.cpp: Added.
(WebCore::GStreamerQuirkOpenMAX::GStreamerQuirkOpenMAX): Constructor.
Initialize debug category.
(WebCore::GStreamerQuirkOpenMAX::processWebAudioSilentBuffer const): Mark
the buffers as no gap and no drop.
* Source/WebCore/platform/gstreamer/GStreamerQuirkOpenMAX.h: Added.
* Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp:
(WebCore::GStreamerQuirksManager::GStreamerQuirksManager): Initialize
OpenMAX quirk backend.
(WebCore::GStreamerQuirksManager::processWebAudioSilentBuffer const): Ask
all backends to process the buffers. The backends will return true if they
consider themselves as preferred, avoiding remaining backends after them to be
queried.
* Source/WebCore/platform/gstreamer/GStreamerQuirks.h:
(WebCore::GStreamerQuirk::processWebAudioSilentBuffer const): Added default
implementation that marks the buffers as gap and drop.
Canonical link: https://commits.webkit.org/288713@main
Canonical link: https://commits.webkit.org/282416.387@webkitglib/2.46
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes