Modified: trunk/LayoutTests/ChangeLog (284364 => 284365)
--- trunk/LayoutTests/ChangeLog 2021-10-18 10:47:58 UTC (rev 284364)
+++ trunk/LayoutTests/ChangeLog 2021-10-18 11:33:38 UTC (rev 284365)
@@ -1,3 +1,15 @@
+2021-10-18 Enrique Ocaña González <[email protected]>
+
+ [GLIB][GStreamer] test http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html is a flaky timeout since r278004
+ https://bugs.webkit.org/show_bug.cgi?id=229219
+ <rdar://problem/82059333>
+
+ Reviewed by Philippe Normand.
+
+ Give some more time to the frequency analyzer to detect activity.
+
+ * http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html:
+
2021-10-18 Kiet Ho <[email protected]>
Implement parsing and animation support for offset-distance, offset-position, offset-anchor
Modified: trunk/LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html (284364 => 284365)
--- trunk/LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html 2021-10-18 10:47:58 UTC (rev 284364)
+++ trunk/LayoutTests/http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html 2021-10-18 11:33:38 UTC (rev 284365)
@@ -37,11 +37,13 @@
}, 30);
audio.addEventListener("ended", event => {
- clearInterval(intervalToken);
- context.suspend().then(() => {
- shouldNotBe("outputArray", "silentArray");
- finishJSTest();
- });
+ setTimeout(function() {
+ clearInterval(intervalToken);
+ context.suspend().then(() => {
+ shouldNotBe("outputArray", "silentArray");
+ finishJSTest();
+ });
+ }, 100);
});
}
window.addEventListener('load', go);
Modified: trunk/Source/WebCore/ChangeLog (284364 => 284365)
--- trunk/Source/WebCore/ChangeLog 2021-10-18 10:47:58 UTC (rev 284364)
+++ trunk/Source/WebCore/ChangeLog 2021-10-18 11:33:38 UTC (rev 284365)
@@ -1,3 +1,20 @@
+2021-10-18 Enrique Ocaña González <[email protected]>
+
+ [GLIB][GStreamer] test http/tests/security/webaudio-render-remote-audio-allowed-crossorigin-redirect.html is a flaky timeout since r278004
+ https://bugs.webkit.org/show_bug.cgi?id=229219
+ <rdar://problem/82059333>
+
+ Reviewed by Philippe Normand.
+
+ Forward EOS from webaudio appsink to the main pipeline. For some reason, some intermediate
+ GstBin isn't forwarding the GST_MESSAGE_EOS emitted by the appsink added by webaudio, so
+ the code at MediaPlayerPrivateGStreamer::handleMessage() can't detect EOS properly and signal
+ it to the player and the HTMLMediaElement.
+
+ * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
+ (WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad): Listen to the EOS signal of each created appsink and forward it to the main pipeline bus as GST_MESSAGE_EOS.
+ (WebCore::AudioSourceProviderGStreamer::handleRemovedDeinterleavePad): Remove the signal handler on pad destruction.
+
2021-10-18 Kiet Ho <[email protected]>
Implement parsing and animation support for offset-distance, offset-position, offset-anchor
Modified: trunk/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp (284364 => 284365)
--- trunk/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp 2021-10-18 10:47:58 UTC (rev 284364)
+++ trunk/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp 2021-10-18 11:33:38 UTC (rev 284365)
@@ -322,6 +322,16 @@
// should process buffers as fast as possible.
g_object_set(sink, "async", FALSE, "sync", FALSE, nullptr);
+ // Some intermediate bins are eating up the EOS message posted to the bus of the inner bin that
+ // holds the appsink. Make sure that the main pipeline gets notified about it, so the player
+ // private can properly handle EOS.
+ g_signal_connect_swapped(GST_APP_SINK(sink), "eos", G_CALLBACK(+[](GstElement*, GstElement* appsink) {
+ GstElement* pipeline;
+ for (pipeline = appsink; pipeline && GST_ELEMENT_PARENT(pipeline); pipeline = GST_ELEMENT_PARENT(pipeline)) { }
+ if (pipeline && pipeline->bus)
+ gst_bus_post(pipeline->bus, gst_message_new_eos(GST_OBJECT(appsink)));
+ }), sink);
+
auto caps = adoptGRef(gst_caps_new_simple("audio/x-raw", "rate", G_TYPE_INT, static_cast<int>(gSampleBitRate),
"channels", G_TYPE_INT, 1, "format", G_TYPE_STRING, GST_AUDIO_NE(F32), "layout", G_TYPE_STRING, "interleaved", nullptr));
gst_app_sink_set_caps(GST_APP_SINK(sink), caps.get());
@@ -373,6 +383,9 @@
auto srcPad = adoptGRef(gst_element_get_static_pad(queue.get(), "src"));
auto sinkSinkPad = adoptGRef(gst_pad_get_peer(srcPad.get()));
auto sink = adoptGRef(gst_pad_get_parent_element(sinkSinkPad.get()));
+
+ g_signal_handlers_disconnect_by_data(sink.get(), sink.get());
+
gst_pad_unlink(srcPad.get(), sinkSinkPad.get());
gst_element_set_state(queue.get(), GST_STATE_NULL);
gst_element_set_state(sink.get(), GST_STATE_NULL);