Title: [201281] releases/WebKitGTK/webkit-2.12/Source/WebCore
- Revision
- 201281
- Author
- [email protected]
- Date
- 2016-05-23 06:34:07 -0700 (Mon, 23 May 2016)
Log Message
Merge r201077 - [GStreamer] webaudio playback improvements
https://bugs.webkit.org/show_bug.cgi?id=155228
Reviewed by Michael Catanzaro.
* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::autoAudioSinkChildAddedCallback): Fix sink buffer-time
to 100ms to reduce playback latency.
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
Connect to child-added signal of autoaudiosink to be notified when
a real sink is added into the bin.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcConstructed): Fine-tune blocksize of appsrc
according to the buffer size already configured on the src element.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (201280 => 201281)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-05-23 13:22:40 UTC (rev 201280)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-05-23 13:34:07 UTC (rev 201281)
@@ -1,3 +1,20 @@
+2016-05-18 Philippe Normand <[email protected]>
+
+ [GStreamer] webaudio playback improvements
+ https://bugs.webkit.org/show_bug.cgi?id=155228
+
+ Reviewed by Michael Catanzaro.
+
+ * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
+ (WebCore::autoAudioSinkChildAddedCallback): Fix sink buffer-time
+ to 100ms to reduce playback latency.
+ (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
+ Connect to child-added signal of autoaudiosink to be notified when
+ a real sink is added into the bin.
+ * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
+ (webKitWebAudioSrcConstructed): Fine-tune blocksize of appsrc
+ according to the buffer size already configured on the src element.
+
2016-05-17 Chris Dumez <[email protected]>
Regression(r177786): GlyphMetricsMap<T>::locatePageSlowCase() fills existing pages with unknown metrics
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp (201280 => 201281)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp 2016-05-23 13:22:40 UTC (rev 201280)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp 2016-05-23 13:34:07 UTC (rev 201281)
@@ -28,6 +28,7 @@
#include "GRefPtrGStreamer.h"
#include "Logging.h"
#include "WebKitWebAudioSourceGStreamer.h"
+#include <gst/audio/gstaudiobasesink.h>
#include <gst/gst.h>
#include <wtf/glib/GUniquePtr.h>
@@ -42,6 +43,12 @@
return destination->handleMessage(message);
}
+static void autoAudioSinkChildAddedCallback(GstChildProxy*, GObject* object, gchar*, gpointer)
+{
+ if (GST_IS_AUDIO_BASE_SINK(object))
+ g_object_set(GST_AUDIO_BASE_SINK(object), "buffer-time", static_cast<gint64>(100000), nullptr);
+}
+
std::unique_ptr<AudioDestination> AudioDestination::create(AudioIOCallback& callback, const String&, unsigned numberOfInputChannels, unsigned numberOfOutputChannels, float sampleRate)
{
// FIXME: make use of inputDeviceId as appropriate.
@@ -94,6 +101,8 @@
return;
}
+ g_signal_connect(audioSink.get(), "child-added", G_CALLBACK(autoAudioSinkChildAddedCallback), nullptr);
+
// Autoaudiosink does the real sink detection in the GST_STATE_NULL->READY transition
// so it's best to roll it to READY as soon as possible to ensure the underlying platform
// audiosink was loaded correctly.
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp (201280 => 201281)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp 2016-05-23 13:22:40 UTC (rev 201280)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp 2016-05-23 13:34:07 UTC (rev 201281)
@@ -230,6 +230,7 @@
// Configure the appsrc for minimal latency.
g_object_set(appsrc, "max-bytes", 2 * priv->bufferSize, "block", TRUE,
+ "blocksize", priv->bufferSize,
"format", GST_FORMAT_TIME, "caps", caps.get(), nullptr);
priv->sources = g_slist_prepend(priv->sources, gst_object_ref(appsrc));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes