Modified: trunk/Source/WebCore/ChangeLog (242788 => 242789)
--- trunk/Source/WebCore/ChangeLog 2019-03-12 08:30:43 UTC (rev 242788)
+++ trunk/Source/WebCore/ChangeLog 2019-03-12 10:25:03 UTC (rev 242789)
@@ -1,3 +1,22 @@
+2019-03-12 Philippe Normand <[email protected]>
+
+ [GStreamer] remove legacy GStreamer version checks
+ https://bugs.webkit.org/show_bug.cgi?id=195552
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ We require GStreamer 1.8.x so version checks below that make
+ little sense. Also checks for odd minor version numbers make sense
+ only for the latest GStreamer git development version.
+
+ * platform/graphics/gstreamer/GStreamerCommon.cpp:
+ (WebCore::initializeGStreamerAndRegisterWebKitElements):
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
+ (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
+ (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
+
2019-03-12 Xabier Rodriguez Calvar <[email protected]>
[EME] generateRequest was not using the sanitized init data
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp (242788 => 242789)
--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp 2019-03-12 08:30:43 UTC (rev 242788)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp 2019-03-12 10:25:03 UTC (rev 242789)
@@ -259,8 +259,7 @@
static std::once_flag onceFlag;
std::call_once(onceFlag, [] {
#if ENABLE(ENCRYPTED_MEDIA)
- if (webkitGstCheckVersion(1, 6, 1))
- gst_element_register(nullptr, "webkitclearkey", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_MEDIA_CK_DECRYPT);
+ gst_element_register(nullptr, "webkitclearkey", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_MEDIA_CK_DECRYPT);
#endif
#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0)
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (242788 => 242789)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2019-03-12 08:30:43 UTC (rev 242788)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2019-03-12 10:25:03 UTC (rev 242789)
@@ -2321,59 +2321,14 @@
g_signal_connect_swapped(m_autoAudioSink.get(), "child-added", G_CALLBACK(setAudioStreamPropertiesCallback), this);
- GstElement* audioSinkBin;
-
- if (webkitGstCheckVersion(1, 4, 2)) {
#if ENABLE(WEB_AUDIO)
- audioSinkBin = gst_bin_new("audio-sink");
- ensureAudioSourceProvider();
- m_audioSourceProvider->configureAudioBin(audioSinkBin, nullptr);
- return audioSinkBin;
-#else
- return m_autoAudioSink.get();
-#endif
- }
-
- // Construct audio sink only if pitch preserving is enabled.
- // If GStreamer 1.4.2 is used the audio-filter playbin property is used instead.
- if (m_preservesPitch) {
- GstElement* scale = gst_element_factory_make("scaletempo", nullptr);
- if (!scale) {
- GST_WARNING("Failed to create scaletempo");
- return m_autoAudioSink.get();
- }
-
- audioSinkBin = gst_bin_new("audio-sink");
- gst_bin_add(GST_BIN(audioSinkBin), scale);
- GRefPtr<GstPad> pad = adoptGRef(gst_element_get_static_pad(scale, "sink"));
- gst_element_add_pad(audioSinkBin, gst_ghost_pad_new("sink", pad.get()));
-
-#if ENABLE(WEB_AUDIO)
- ensureAudioSourceProvider();
- m_audioSourceProvider->configureAudioBin(audioSinkBin, scale);
-#else
- GstElement* convert = gst_element_factory_make("audioconvert", nullptr);
- GstElement* resample = gst_element_factory_make("audioresample", nullptr);
-
- gst_bin_add_many(GST_BIN(audioSinkBin), convert, resample, m_autoAudioSink.get(), nullptr);
-
- if (!gst_element_link_many(scale, convert, resample, m_autoAudioSink.get(), nullptr)) {
- GST_WARNING("Failed to link audio sink elements");
- gst_object_unref(audioSinkBin);
- return m_autoAudioSink.get();
- }
-#endif
- return audioSinkBin;
- }
-
-#if ENABLE(WEB_AUDIO)
- audioSinkBin = gst_bin_new("audio-sink");
+ GstElement* audioSinkBin = gst_bin_new("audio-sink");
ensureAudioSourceProvider();
m_audioSourceProvider->configureAudioBin(audioSinkBin, nullptr);
return audioSinkBin;
+#else
+ return m_autoAudioSink.get();
#endif
- ASSERT_NOT_REACHED();
- return nullptr;
}
GstElement* MediaPlayerPrivateGStreamer::audioSink() const
@@ -2466,7 +2421,7 @@
ASSERT(m_textAppSinkPad);
GRefPtr<GstCaps> textCaps;
- if (webkitGstCheckVersion(1, 13, 0))
+ if (webkitGstCheckVersion(1, 14, 0))
textCaps = adoptGRef(gst_caps_new_empty_simple("application/x-subtitle-vtt"));
else
textCaps = adoptGRef(gst_caps_new_empty_simple("text/vtt"));
@@ -2480,10 +2435,7 @@
configurePlaySink();
- // On 1.4.2 and newer we use the audio-filter property instead.
- // See https://bugzilla.gnome.org/show_bug.cgi?id=735748 for
- // the reason for using >= 1.4.2 instead of >= 1.4.0.
- if (m_preservesPitch && webkitGstCheckVersion(1, 4, 2)) {
+ if (m_preservesPitch) {
GstElement* scale = gst_element_factory_make("scaletempo", nullptr);
if (!scale)
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp (242788 => 242789)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2019-03-12 08:30:43 UTC (rev 242788)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2019-03-12 10:25:03 UTC (rev 242789)
@@ -419,7 +419,7 @@
auto& sharedDisplay = PlatformDisplay::sharedDisplayForCompositing();
// The floating ref removal support was added in https://bugzilla.gnome.org/show_bug.cgi?id=743062.
- bool shouldAdoptRef = webkitGstCheckVersion(1, 13, 1);
+ bool shouldAdoptRef = webkitGstCheckVersion(1, 14, 0);
if (!m_glDisplay) {
#if PLATFORM(X11)
#if USE(GLX)