- Revision
- 290325
- Author
- [email protected]
- Date
- 2022-02-22 11:34:47 -0800 (Tue, 22 Feb 2022)
Log Message
[GStreamer] Switch media player to playbin3
https://bugs.webkit.org/show_bug.cgi?id=236884
Patch by Philippe Normand <[email protected]> on 2022-02-22
Reviewed by Xabier Rodriguez-Calvar.
Source/WebCore:
With GStreamer 1.20 playbin3 is quite usable now, so give it a try as default playback
engine during the 2.38 cycle. If one wants to opt out, set the WEBKIT_GST_USE_PLAYBIN2
environment variable to 1.
No new tests, covered by existing media layout tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
Tools:
Replace WEBKIT_GST_USE_PLAYBIN3 with WEBKIT_GST_USE_PLAYBIN2 that allows to opt-out of
playbin3, if this is desired.
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
* Scripts/webkitpy/port/wpe.py:
(WPEPort.setup_environ_for_server):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (290324 => 290325)
--- trunk/Source/WebCore/ChangeLog 2022-02-22 19:34:17 UTC (rev 290324)
+++ trunk/Source/WebCore/ChangeLog 2022-02-22 19:34:47 UTC (rev 290325)
@@ -1,3 +1,19 @@
+2022-02-22 Philippe Normand <[email protected]>
+
+ [GStreamer] Switch media player to playbin3
+ https://bugs.webkit.org/show_bug.cgi?id=236884
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ With GStreamer 1.20 playbin3 is quite usable now, so give it a try as default playback
+ engine during the 2.38 cycle. If one wants to opt out, set the WEBKIT_GST_USE_PLAYBIN2
+ environment variable to 1.
+
+ No new tests, covered by existing media layout tests.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
+
2022-02-22 Nikolas Zimmermann <[email protected]>
[LBSE] Activate LBSE for <rect> painting
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (290324 => 290325)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2022-02-22 19:34:17 UTC (rev 290324)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2022-02-22 19:34:47 UTC (rev 290325)
@@ -94,6 +94,7 @@
#include <wtf/text/StringConcatenateNumbers.h>
#include <wtf/URL.h>
#include <wtf/WallTime.h>
+#include <wtf/text/StringToIntegerConversion.h>
#if USE(GSTREAMER_MPEGTS)
#define GST_USE_UNSTABLE_API
@@ -2662,13 +2663,14 @@
void MediaPlayerPrivateGStreamer::createGSTPlayBin(const URL& url)
{
GST_INFO("Creating pipeline for %s player", m_player->isVideoPlayer() ? "video" : "audio");
- const char* playbinName = "playbin";
- // MSE and Mediastream require playbin3. Regular playback can use playbin3 on-demand with the
- // WEBKIT_GST_USE_PLAYBIN3 environment variable.
- const char* usePlaybin3 = g_getenv("WEBKIT_GST_USE_PLAYBIN3");
- if ((isMediaSource() || url.protocolIs("mediastream") || (usePlaybin3 && equal(usePlaybin3, "1"))))
- playbinName = "playbin3";
+ // MSE and Mediastream require playbin3. Regular playback uses playbin3 if GStreamer >= 1.20 is
+ // detected, unless the WEBKIT_GST_USE_PLAYBIN2 environment variable is set to 1.
+ const char* playbinName = "playbin3";
+ const char* usePlaybin2Override = g_getenv("WEBKIT_GST_USE_PLAYBIN2");
+ auto usePlaybin2 = usePlaybin2Override ? parseInteger<unsigned>(usePlaybin2Override) : 0;
+ if ((usePlaybin2 || !webkitGstCheckVersion(1, 20, 0)) && !isMediaSource() && !url.protocolIs("mediastream"))
+ playbinName = "playbin";
ASSERT(!m_pipeline);
Modified: trunk/Tools/ChangeLog (290324 => 290325)
--- trunk/Tools/ChangeLog 2022-02-22 19:34:17 UTC (rev 290324)
+++ trunk/Tools/ChangeLog 2022-02-22 19:34:47 UTC (rev 290325)
@@ -1,3 +1,18 @@
+2022-02-22 Philippe Normand <[email protected]>
+
+ [GStreamer] Switch media player to playbin3
+ https://bugs.webkit.org/show_bug.cgi?id=236884
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ Replace WEBKIT_GST_USE_PLAYBIN3 with WEBKIT_GST_USE_PLAYBIN2 that allows to opt-out of
+ playbin3, if this is desired.
+
+ * Scripts/webkitpy/port/gtk.py:
+ (GtkPort.setup_environ_for_server):
+ * Scripts/webkitpy/port/wpe.py:
+ (WPEPort.setup_environ_for_server):
+
2022-02-22 Jonathan Bedard <[email protected]>
[git-webkit] Extract revision from `git svn dcommit`
Modified: trunk/Tools/Scripts/webkitpy/port/gtk.py (290324 => 290325)
--- trunk/Tools/Scripts/webkitpy/port/gtk.py 2022-02-22 19:34:17 UTC (rev 290324)
+++ trunk/Tools/Scripts/webkitpy/port/gtk.py 2022-02-22 19:34:47 UTC (rev 290325)
@@ -121,7 +121,7 @@
self._copy_value_from_environ_if_set(environment, 'WEBKIT_JHBUILD')
self._copy_value_from_environ_if_set(environment, 'WEBKIT_TOP_LEVEL')
self._copy_value_from_environ_if_set(environment, 'WEBKIT_DEBUG')
- self._copy_value_from_environ_if_set(environment, 'WEBKIT_GST_USE_PLAYBIN3')
+ self._copy_value_from_environ_if_set(environment, 'WEBKIT_GST_USE_PLAYBIN2')
for gst_variable in ('DEBUG', 'DEBUG_DUMP_DOT_DIR', 'DEBUG_FILE', 'DEBUG_NO_COLOR',
'PLUGIN_SCANNER', 'PLUGIN_PATH', 'PLUGIN_SYSTEM_PATH', 'REGISTRY',
'PLUGIN_PATH_1_0'):
Modified: trunk/Tools/Scripts/webkitpy/port/wpe.py (290324 => 290325)
--- trunk/Tools/Scripts/webkitpy/port/wpe.py 2022-02-22 19:34:17 UTC (rev 290324)
+++ trunk/Tools/Scripts/webkitpy/port/wpe.py 2022-02-22 19:34:47 UTC (rev 290325)
@@ -92,7 +92,7 @@
self._copy_value_from_environ_if_set(environment, 'PULSE_SERVER')
self._copy_value_from_environ_if_set(environment, 'PULSE_CLIENTCONFIG')
self._copy_value_from_environ_if_set(environment, 'XR_RUNTIME_JSON')
- self._copy_value_from_environ_if_set(environment, 'WEBKIT_GST_USE_PLAYBIN3')
+ self._copy_value_from_environ_if_set(environment, 'WEBKIT_GST_USE_PLAYBIN2')
for gst_variable in ('DEBUG', 'DEBUG_DUMP_DOT_DIR', 'DEBUG_FILE', 'DEBUG_NO_COLOR',
'PLUGIN_SCANNER', 'PLUGIN_PATH', 'PLUGIN_SYSTEM_PATH', 'REGISTRY',
'PLUGIN_PATH_1_0'):