Title: [228265] trunk/Source/WebCore
- Revision
- 228265
- Author
- ph...@webkit.org
- Date
- 2018-02-08 02:14:01 -0800 (Thu, 08 Feb 2018)
Log Message
[GStreamer][WebAudio] No need for version check in each loop iteration
https://bugs.webkit.org/show_bug.cgi?id=182577
Reviewed by Xabier Rodriguez Calvar.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webkit_web_audio_src_init): Detect version once only, when creating the element.
(webKitWebAudioSrcLoop): Use boolean variable instead of checking the version every time.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (228264 => 228265)
--- trunk/Source/WebCore/ChangeLog 2018-02-08 10:01:43 UTC (rev 228264)
+++ trunk/Source/WebCore/ChangeLog 2018-02-08 10:14:01 UTC (rev 228265)
@@ -1,3 +1,14 @@
+2018-02-08 Philippe Normand <pnorm...@igalia.com>
+
+ [GStreamer][WebAudio] No need for version check in each loop iteration
+ https://bugs.webkit.org/show_bug.cgi?id=182577
+
+ Reviewed by Xabier Rodriguez Calvar.
+
+ * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
+ (webkit_web_audio_src_init): Detect version once only, when creating the element.
+ (webKitWebAudioSrcLoop): Use boolean variable instead of checking the version every time.
+
2018-02-08 Frederic Wang <fw...@igalia.com>
Add scrolling node types to distinguish main frames and subframes.
Modified: trunk/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp (228264 => 228265)
--- trunk/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp 2018-02-08 10:01:43 UTC (rev 228264)
+++ trunk/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp 2018-02-08 10:14:01 UTC (rev 228265)
@@ -69,6 +69,8 @@
guint64 numberOfSamples;
GRefPtr<GstBufferPool> pool;
+
+ bool enableGapBufferSupport;
};
enum {
@@ -193,6 +195,11 @@
g_rec_mutex_init(&priv->mutex);
priv->task = adoptGRef(gst_task_new(reinterpret_cast<GstTaskFunction>(webKitWebAudioSrcLoop), src, nullptr));
+ // GAP buffer support is enabled only for GStreamer 1.12.5 because of a
+ // memory leak that was fixed in that version.
+ // https://bugzilla.gnome.org/show_bug.cgi?id=793067
+ priv->enableGapBufferSupport = webkitGstCheckVersion(1, 12, 5);
+
gst_task_set_lock(priv->task.get(), &priv->mutex);
}
@@ -353,12 +360,8 @@
auto& buffer = channelBufferList[i];
unmapGstBuffer(buffer.get());
- // This is enabled only for GStreamer 1.12.5 because of a memory leak that was fixed in that version.
- // https://bugzilla.gnome.org/show_bug.cgi?id=793067
- if (webkitGstCheckVersion(1, 12, 5)) {
- if (priv->bus->channel(i)->isSilent())
- GST_BUFFER_FLAG_SET(buffer.get(), GST_BUFFER_FLAG_GAP);
- }
+ if (priv->enableGapBufferSupport && priv->bus->channel(i)->isSilent())
+ GST_BUFFER_FLAG_SET(buffer.get(), GST_BUFFER_FLAG_GAP);
if (failed)
continue;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes