diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/cmake/GStreamerChecks.cmake webkitgtk-2.36.0.gstreamer1.8/Source/cmake/GStreamerChecks.cmake
--- webkitgtk-2.36.0.gstreamer1.12/Source/cmake/GStreamerChecks.cmake	2022-03-28 15:09:13.774120807 -0500
+++ webkitgtk-2.36.0.gstreamer1.8/Source/cmake/GStreamerChecks.cmake	2022-03-28 15:09:37.018244574 -0500
@@ -28,7 +28,7 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
               list(APPEND GSTREAMER_COMPONENTS audio fft)
           endif ()
 
-          find_package(GStreamer 1.10.0 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
+          find_package(GStreamer 1.8.3 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
 
           if (ENABLE_WEB_AUDIO)
               if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND)
@@ -42,19 +42,24 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
               endif ()
           endif ()
 
-          if (USE_GSTREAMER_MPEGTS AND NOT PC_GSTREAMER_MPEGTS_FOUND)
-              message(FATAL_ERROR "GStreamer MPEG-TS is needed for USE_GSTREAMER_MPEGTS.")
+    if (USE_GSTREAMER_MPEGTS)
+        if (NOT PC_GSTREAMER_MPEGTS_FOUND)
+            message(FATAL_ERROR "GStreamer MPEG-TS is needed for USE_GSTREAMER_MPEGTS.")
+        endif ()
           endif ()
 
-          if (USE_GSTREAMER_GL AND NOT PC_GSTREAMER_GL_FOUND)
-              message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.")
+    if (USE_GSTREAMER_GL)
+        if (PC_GSTREAMER_VERSION VERSION_LESS "1.10")
+            message(FATAL_ERROR "GStreamer 1.10 is needed for USE_GSTREAMER_GL.")
+        else ()
+            if (NOT PC_GSTREAMER_GL_FOUND)
+                message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.")
+            endif ()
+        endif ()
           endif ()
       endif ()
 endif ()
 
-if (ENABLE_MEDIA_SOURCE AND PC_GSTREAMER_VERSION VERSION_LESS "1.14")
-    message(FATAL_ERROR "GStreamer 1.14 is needed for ENABLE_MEDIA_SOURCE.")
-endif ()
 
 if (ENABLE_MEDIA_STREAM AND ENABLE_WEB_RTC)
     if (PC_GSTREAMER_VERSION VERSION_LESS "1.12")
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp	2022-02-23 02:59:01.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp	2022-03-28 15:09:37.018244574 -0500
@@ -143,7 +143,7 @@ AudioFileReader::~AudioFileReader()
 
 GstFlowReturn AudioFileReader::handleSample(GstAppSink* sink)
 {
-    auto sample = adoptGRef(gst_app_sink_try_pull_sample(sink, 0));
+    auto sample = adoptGRef(gst_app_sink_pull_sample(sink));
     if (!sample)
         return gst_app_sink_is_eos(sink) ? GST_FLOW_EOS : GST_FLOW_ERROR;
 
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp	2022-02-23 02:59:01.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp	2022-03-28 15:09:37.022244594 -0500
@@ -171,7 +171,7 @@ void AudioSourceProviderGStreamer::provi
 GstFlowReturn AudioSourceProviderGStreamer::handleSample(GstAppSink* sink, bool isPreroll)
 {
     GST_TRACE("Pulling audio sample from the sink");
-    auto sample = adoptGRef(isPreroll ? gst_app_sink_try_pull_preroll(sink, 0) : gst_app_sink_try_pull_sample(sink, 0));
+    auto sample = adoptGRef(isPreroll ? gst_app_sink_pull_preroll(sink) : gst_app_sink_pull_sample(sink));
     if (!sample)
         return gst_app_sink_is_eos(sink) ? GST_FLOW_EOS : GST_FLOW_ERROR;
 
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp	2022-03-28 15:09:13.774120807 -0500
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp	2022-03-31 14:40:51.944995787 -0500
@@ -210,7 +210,6 @@ static void webKitWebAudioSrcConstructed
     ASSERT(priv->sampleRate);
 
     GST_OBJECT_FLAG_SET(GST_OBJECT_CAST(src), GST_ELEMENT_FLAG_SOURCE);
-    gst_bin_set_suppressed_flags(GST_BIN_CAST(src), static_cast<GstElementFlags>(GST_ELEMENT_FLAG_SOURCE | GST_ELEMENT_FLAG_SINK));
 
     gst_element_add_pad(GST_ELEMENT(src), priv->sourcePad);
 
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp	2022-03-28 15:09:37.022244594 -0500
@@ -40,6 +40,7 @@ AudioTrackPrivateGStreamer::AudioTrackPr
 {
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer> player, unsigned index, GRefPtr<GstStream>&& stream)
     : TrackPrivateBaseGStreamer(TrackPrivateBaseGStreamer::TrackType::Audio, this, index, WTFMove(stream))
     , m_player(player)
@@ -99,19 +100,24 @@ void AudioTrackPrivateGStreamer::updateC
         setConfiguration(WTFMove(configuration));
     });
 }
+#endif
 
 AudioTrackPrivate::Kind AudioTrackPrivateGStreamer::kind() const
 {
+#if GST_CHECK_VERSION(1, 10, 0)
     if (m_stream.get() && gst_stream_get_stream_flags(m_stream.get()) & GST_STREAM_FLAG_SELECT)
         return AudioTrackPrivate::Kind::Main;
+#endif
 
     return AudioTrackPrivate::kind();
 }
 
 void AudioTrackPrivateGStreamer::disconnect()
 {
+#if GST_CHECK_VERSION(1, 10, 0)
     if (m_stream)
         g_signal_handlers_disconnect_matched(m_stream.get(), G_SIGNAL_MATCH_DATA, 0, 0, nullptr, nullptr, this);
+#endif
 
     m_player = nullptr;
     TrackPrivateBaseGStreamer::disconnect();
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h	2022-03-28 15:09:37.022244594 -0500
@@ -42,10 +42,12 @@ public:
         return adoptRef(*new AudioTrackPrivateGStreamer(player, index, WTFMove(pad), shouldHandleStreamStartEvent));
     }
 
+#if GST_CHECK_VERSION(1, 10, 0)
     static Ref<AudioTrackPrivateGStreamer> create(WeakPtr<MediaPlayerPrivateGStreamer> player, unsigned index, GRefPtr<GstStream>&& stream)
     {
         return adoptRef(*new AudioTrackPrivateGStreamer(player, index, WTFMove(stream)));
     }
+#endif
 
     Kind kind() const final;
 
@@ -66,7 +68,9 @@ protected:
 
 private:
     AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, unsigned index, GRefPtr<GstPad>&&, bool shouldHandleStreamStartEvent);
+#if GST_CHECK_VERSION(1, 10, 0)
     AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, unsigned index, GRefPtr<GstStream>&&);
+#endif
 
     WeakPtr<MediaPlayerPrivateGStreamer> m_player;
 };
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp	2022-03-28 15:09:37.022244594 -0500
@@ -397,6 +397,7 @@ template <> void derefGPtr<GstQuery>(Gst
         gst_query_unref(ptr);
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 template <> GRefPtr<GstStream> adoptGRef(GstStream* ptr)
 {
     return GRefPtr<GstStream>(ptr, GRefPtrAdopt);
@@ -434,6 +435,7 @@ template <> void derefGPtr<GstStreamColl
     if (ptr)
         gst_object_unref(ptr);
 }
+#endif
 
 template <>
 GRefPtr<GstClock> adoptGRef(GstClock* ptr)
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h	2022-03-28 15:09:37.022244594 -0500
@@ -120,6 +120,7 @@ GRefPtr<WebKitWebSrc> ensureGRef(WebKitW
 template<> WebKitWebSrc* refGPtr<WebKitWebSrc>(WebKitWebSrc* ptr);
 template<> void derefGPtr<WebKitWebSrc>(WebKitWebSrc* ptr);
 
+#if GST_CHECK_VERSION(1, 10, 0)
 template<> GRefPtr<GstStream> adoptGRef(GstStream*);
 template<> GstStream* refGPtr<GstStream>(GstStream*);
 template<> void derefGPtr<GstStream>(GstStream*);
@@ -127,6 +128,7 @@ template<> void derefGPtr<GstStream>(Gst
 template<> GRefPtr<GstStreamCollection> adoptGRef(GstStreamCollection*);
 template<> GstStreamCollection* refGPtr<GstStreamCollection>(GstStreamCollection*);
 template<> void derefGPtr<GstStreamCollection>(GstStreamCollection*);
+#endif
 
 template<> GRefPtr<GstClock> adoptGRef(GstClock*);
 template<> GstClock* refGPtr<GstClock>(GstClock*);
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2022-03-28 15:09:13.774120807 -0500
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2022-03-31 12:53:10.286882904 -0500
@@ -36,10 +36,10 @@
 #include <gst/gst.h>
 #include <mutex>
 #include <wtf/FileSystem.h>
+#include <wtf/PrintStream.h>
 #include <wtf/Scope.h>
 #include <wtf/glib/GUniquePtr.h>
 #include <wtf/glib/RunLoopSourcePriority.h>
-#include <wtf/PrintStream.h>
 
 #if USE(GSTREAMER_FULL)
 #include <gst/gstinitstaticplugins.h>
@@ -55,7 +55,7 @@
 #include "WebKitMediaSourceGStreamer.h"
 #endif
 
-#if ENABLE(MEDIA_STREAM)
+#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0)
 #include "GStreamerMediaStreamSource.h"
 #include "GStreamerVideoEncoder.h"
 #endif
@@ -325,7 +325,7 @@ void registerWebKitGStreamerElements()
 
 #endif
 
-#if ENABLE(MEDIA_STREAM)
+#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0)
         gst_element_register(nullptr, "mediastreamsrc", GST_RANK_PRIMARY, WEBKIT_TYPE_MEDIA_STREAM_SRC);
         gst_element_register(nullptr, "webrtcvideoencoder", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_WEBRTC_VIDEO_ENCODER);
 #endif
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp	2022-03-28 15:09:37.022244594 -0500
@@ -252,12 +252,12 @@ void ImageDecoderGStreamer::InnerDecoder
     static GstAppSinkCallbacks callbacks = {
         nullptr,
         [](GstAppSink* sink, gpointer userData) -> GstFlowReturn {
-            auto sample = adoptGRef(gst_app_sink_try_pull_preroll(sink, 0));
+            auto sample = adoptGRef(gst_app_sink_pull_preroll(sink));
             static_cast<ImageDecoderGStreamer*>(userData)->notifySample(WTFMove(sample));
             return GST_FLOW_OK;
         },
         [](GstAppSink* sink, gpointer userData) -> GstFlowReturn {
-            auto sample = adoptGRef(gst_app_sink_try_pull_sample(sink, 0));
+            auto sample = adoptGRef(gst_app_sink_pull_sample(sink));
             static_cast<ImageDecoderGStreamer*>(userData)->notifySample(WTFMove(sample));
             return GST_FLOW_OK;
         },
@@ -337,6 +337,7 @@ void ImageDecoderGStreamer::InnerDecoder
         g_warning("Error: %d, %s. Debug output: %s", error->code, error->message, debug.get());
         m_decoder.setHasEOS();
         break;
+#if GST_CHECK_VERSION(1, 10, 0)
     case GST_MESSAGE_STREAM_COLLECTION: {
         GRefPtr<GstStreamCollection> collection;
         gst_message_parse_stream_collection(message, &collection.outPtr());
@@ -349,6 +350,7 @@ void ImageDecoderGStreamer::InnerDecoder
                 if (streamType == GST_STREAM_TYPE_VIDEO) {
                     streams = g_list_append(streams, const_cast<char*>(gst_stream_get_stream_id(stream)));
                     break;
+#endif
                 }
             }
             if (streams) {
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp	2022-03-28 15:09:37.022244594 -0500
@@ -43,6 +43,7 @@ InbandTextTrackPrivateGStreamer::InbandT
 {
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer(unsigned index, GRefPtr<GstStream>&& stream)
     : InbandTextTrackPrivate(CueFormat::WebVTT)
     , TrackPrivateBaseGStreamer(TrackPrivateBaseGStreamer::TrackType::Text, this, index, WTFMove(stream))
@@ -55,6 +56,7 @@ InbandTextTrackPrivateGStreamer::InbandT
     const char* mediaType = capsMediaType(caps.get());
     m_kind = g_str_has_prefix(mediaType, "closedcaption/") ? Kind::Captions : Kind::Subtitles;
 }
+#endif
 
 void InbandTextTrackPrivateGStreamer::handleSample(GRefPtr<GstSample> sample)
 {
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h	2022-03-28 15:09:37.022244594 -0500
@@ -47,10 +47,12 @@ public:
         return create(index, WTFMove(pad));
     }
 
+#if GST_CHECK_VERSION(1, 10, 0)
     static Ref<InbandTextTrackPrivateGStreamer> create(unsigned index, GRefPtr<GstStream>&& stream)
     {
         return adoptRef(*new InbandTextTrackPrivateGStreamer(index, WTFMove(stream)));
     }
+#endif
 
     Kind kind() const final { return m_kind; }
     AtomString id() const final { return m_id; }
@@ -62,7 +64,9 @@ public:
 
 private:
     InbandTextTrackPrivateGStreamer(unsigned index, GRefPtr<GstPad>&&, bool shouldHandleStreamStartEvent);
+#if GST_CHECK_VERSION(1, 10, 0)
     InbandTextTrackPrivateGStreamer(unsigned index, GRefPtr<GstStream>&&);
+#endif
 
     void notifyTrackOfSample();
 
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2022-03-28 15:09:13.774120807 -0500
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2022-03-28 15:09:37.022244594 -0500
@@ -53,7 +53,7 @@
 #include "TextSinkGStreamer.h"
 #include "VideoTrackPrivateGStreamer.h"
 
-#if ENABLE(MEDIA_STREAM)
+#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0)
 #include "GStreamerMediaStreamSource.h"
 #include "MediaStreamPrivate.h"
 #endif
@@ -349,11 +349,18 @@ void MediaPlayerPrivateGStreamer::load(c
 #if ENABLE(MEDIA_STREAM)
 void MediaPlayerPrivateGStreamer::load(MediaStreamPrivate& stream)
 {
+#if GST_CHECK_VERSION(1, 10, 0)
     m_streamPrivate = &stream;
     load(String("mediastream://") + stream.id());
     syncOnClock(false);
 
     m_player->play();
+#else
+    // Properly fail so the global MediaPlayer tries to fallback to the next MediaPlayerPrivate.
+    m_networkState = MediaPlayer::FormatError;
+    m_player->networkStateChanged();
+    notImplemented();
+#endif
 }
 #endif
 
@@ -879,7 +886,7 @@ void MediaPlayerPrivateGStreamer::source
 
     if (WEBKIT_IS_WEB_SRC(m_source.get())) {
         webKitWebSrcSetMediaPlayer(WEBKIT_WEB_SRC_CAST(m_source.get()), m_player, m_referrer);
-#if ENABLE(MEDIA_STREAM)
+#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0)
     } else if (WEBKIT_IS_MEDIA_STREAM_SRC(sourceElement)) {
         auto stream = m_streamPrivate.get();
         ASSERT(stream);
@@ -1372,6 +1379,7 @@ void MediaPlayerPrivateGStreamer::update
 
 void MediaPlayerPrivateGStreamer::playbin3SendSelectStreamsIfAppropriate()
 {
+#if GST_CHECK_VERSION(1, 10, 0)
     ASSERT(!m_isLegacyPlaybin);
 
     bool haveDifferentStreamIds = (m_wantedAudioStreamId != m_currentAudioStreamId || m_wantedVideoStreamId != m_currentVideoStreamId);
@@ -1397,8 +1405,10 @@ void MediaPlayerPrivateGStreamer::playbi
     m_waitingForStreamsSelectedEvent = true;
     gst_element_send_event(m_pipeline.get(), gst_event_new_select_streams(streams));
     g_list_free_full(streams, reinterpret_cast<GDestroyNotify>(g_free));
+#endif
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 void MediaPlayerPrivateGStreamer::updateTracks(const GRefPtr<GstStreamCollection>& streamCollection)
 {
     ASSERT(!m_isLegacyPlaybin);
@@ -1472,6 +1482,7 @@ void MediaPlayerPrivateGStreamer::update
 
     m_player->mediaEngineUpdated();
 }
+#endif // GST_CHECK_VERSION(1, 10, 0)
 
 void MediaPlayerPrivateGStreamer::videoChangedCallback(MediaPlayerPrivateGStreamer* player)
 {
@@ -1480,6 +1491,7 @@ void MediaPlayerPrivateGStreamer::videoC
     });
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 void MediaPlayerPrivateGStreamer::handleStreamCollectionMessage(GstMessage* message)
 {
     if (m_isLegacyPlaybin)
@@ -1519,6 +1531,7 @@ void MediaPlayerPrivateGStreamer::handle
     else
         callOnMainThread(WTFMove(callback));
 }
+#endif
 
 bool MediaPlayerPrivateGStreamer::handleNeedContextMessage(GstMessage* message)
 {
@@ -1934,6 +1947,7 @@ void MediaPlayerPrivateGStreamer::handle
     case GST_MESSAGE_TOC:
         processTableOfContents(message);
         break;
+#if GST_CHECK_VERSION(1, 10, 0)
     case GST_MESSAGE_STREAMS_SELECTED: {
         if (m_isLegacyPlaybin)
             break;
@@ -1961,6 +1975,7 @@ void MediaPlayerPrivateGStreamer::handle
         playbin3SendSelectStreamsIfAppropriate();
         break;
     }
+#endif
     default:
         GST_DEBUG_OBJECT(pipeline(), "Unhandled GStreamer message type: %s", GST_MESSAGE_TYPE_NAME(message));
         break;
@@ -2562,7 +2577,7 @@ MediaPlayer::SupportsType MediaPlayerPri
 #endif
 
     if (parameters.isMediaStream) {
-#if ENABLE(MEDIA_STREAM)
+#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION (1, 10, 0)
         return MediaPlayer::SupportsType::IsSupported;
 #else
         return result;
@@ -2685,9 +2700,11 @@ void MediaPlayerPrivateGStreamer::create
 
     // MSE and Mediastream require playbin3. Regular playback can use playbin3 on-demand with the
     // WEBKIT_GST_USE_PLAYBIN3 environment variable.
+#if GST_CHECK_VERSION(1, 10, 0)
     const char* usePlaybin3 = g_getenv("WEBKIT_GST_USE_PLAYBIN3");
     if ((isMediaSource() || url.protocolIs("mediastream") || (usePlaybin3 && equal(usePlaybin3, "1"))))
         playbinName = "playbin3";
+#endif
 
     ASSERT(!m_pipeline);
 
@@ -2730,10 +2747,12 @@ void MediaPlayerPrivateGStreamer::create
     // synchronously in the same main thread tick to make the tracks information available to JS no
     // later than "updateend". There is no such limitation otherwise (if playbin3 is enabled or in
     // MediaStream cases).
+#if GST_CHECK_VERSION(1, 10, 0)
     auto streamCollectionSignalName = makeString(isMediaSource() ? "sync-" : "", "message::stream-collection");
     g_signal_connect_swapped(bus.get(), streamCollectionSignalName.ascii().data(), G_CALLBACK(+[](MediaPlayerPrivateGStreamer* player, GstMessage* message) {
         player->handleStreamCollectionMessage(message);
     }), this);
+#endif
 
     g_object_set(m_pipeline.get(), "mute", m_player->muted(), nullptr);
 
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2022-03-28 15:09:13.774120807 -0500
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2022-03-28 15:09:37.022244594 -0500
@@ -260,8 +260,12 @@ protected:
         AudioChanged = 1 << 2,
         VolumeChanged = 1 << 3,
         MuteChanged = 1 << 4,
+#if GST_CHECK_VERSION (1, 10, 0)
         TextChanged = 1 << 5,
         StreamCollectionChanged = 1 << 7
+#else
+        TextChanged = 1 << 5
+#endif
     };
 
     static bool isAvailable();
@@ -478,7 +482,9 @@ private:
 
     void setPlaybinURL(const URL& urlString);
 
+#if GST_CHECK_VERSION (1, 10, 0)
     void updateTracks(const GRefPtr<GstStreamCollection>&);
+#endif
     void videoSinkCapsChanged(GstPad*);
     void updateVideoSizeAndOrientationFromCaps(const GstCaps*);
     bool hasFirstVideoSampleReachedSink() const;
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp	2022-03-28 15:09:37.022244594 -0500
@@ -85,6 +85,7 @@ TrackPrivateBaseGStreamer::TrackPrivateB
     tagsChanged();
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer(TrackType type, TrackPrivateBase* owner, unsigned index, GRefPtr<GstStream>&& stream)
     : m_notifier(MainThreadNotifier<MainThreadNotification>::create())
     , m_index(index)
@@ -98,6 +99,7 @@ TrackPrivateBaseGStreamer::TrackPrivateB
     // We can't call notifyTrackOfTagsChanged() directly, because we need tagsChanged() to setup m_tags.
     tagsChanged();
 }
+#endif
 
 void TrackPrivateBaseGStreamer::setPad(GRefPtr<GstPad>&& pad)
 {
@@ -135,8 +137,10 @@ void TrackPrivateBaseGStreamer::disconne
 {
     m_tags.clear();
 
+#if GST_CHECK_VERSION(1, 10, 0)
     if (m_stream)
         m_stream.clear();
+#endif
 
     m_notifier->cancelPendingNotifications();
 
@@ -174,8 +178,11 @@ void TrackPrivateBaseGStreamer::tagsChan
             }
             i++;
         } while (tagEvent);
-    } else if (m_stream)
+    }
+#if GST_CHECK_VERSION(1, 10, 0)
+    else if (m_stream)
         tags = adoptGRef(gst_stream_get_tags(m_stream.get()));
+#endif
 
     if (!tags)
         tags = adoptGRef(gst_tag_list_new_empty());
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h	2022-03-28 15:09:37.022244594 -0500
@@ -59,7 +59,9 @@ public:
 
     void setIndex(unsigned index) { m_index =  index; }
 
+#if GST_CHECK_VERSION(1, 10, 0)
     GstStream* stream() { return m_stream.get(); }
+#endif
 
     // Used for MSE, where the initial caps of the pad are relevant for initializing the matching pad in the
     // playback pipeline.
@@ -68,7 +70,9 @@ public:
 
 protected:
     TrackPrivateBaseGStreamer(TrackType, TrackPrivateBase*, unsigned index, GRefPtr<GstPad>&&, bool shouldHandleStreamStartEvent);
+#if GST_CHECK_VERSION(1, 10, 0)
     TrackPrivateBaseGStreamer(TrackType, TrackPrivateBase*, unsigned index, GRefPtr<GstStream>&&);
+#endif
 
     void notifyTrackOfTagsChanged();
     void notifyTrackOfStreamChanged();
@@ -86,7 +90,9 @@ protected:
     AtomString m_id;
     GRefPtr<GstPad> m_pad;
     GRefPtr<GstPad> m_bestUpstreamPad;
+#if GST_CHECK_VERSION(1, 10, 0)
     GRefPtr<GstStream> m_stream;
+#endif
     unsigned long m_eventProbe { 0 };
     GRefPtr<GstCaps> m_initialCaps;
 
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp	2022-03-28 15:09:37.026244616 -0500
@@ -40,6 +40,7 @@ VideoTrackPrivateGStreamer::VideoTrackPr
 {
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer> player, unsigned index, GRefPtr<GstStream>&& stream)
     : TrackPrivateBaseGStreamer(TrackPrivateBaseGStreamer::TrackType::Video, this, index, WTFMove(stream))
     , m_player(player)
@@ -170,11 +171,14 @@ VideoTrackPrivate::Kind VideoTrackPrivat
 
     return VideoTrackPrivate::kind();
 }
+#endif
 
 void VideoTrackPrivateGStreamer::disconnect()
 {
+#if GST_CHECK_VERSION(1, 10, 0)
     if (m_stream)
         g_signal_handlers_disconnect_matched(m_stream.get(), G_SIGNAL_MATCH_DATA, 0, 0, nullptr, nullptr, this);
+#endif
 
     m_player = nullptr;
     TrackPrivateBaseGStreamer::disconnect();
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h	2022-03-28 15:09:37.026244616 -0500
@@ -43,12 +43,14 @@ public:
         return adoptRef(*new VideoTrackPrivateGStreamer(player, index, WTFMove(pad), shouldHandleStreamStartEvent));
     }
 
+#if GST_CHECK_VERSION(1, 10, 0)
     static Ref<VideoTrackPrivateGStreamer> create(WeakPtr<MediaPlayerPrivateGStreamer> player, unsigned index, GRefPtr<GstStream>&& stream)
     {
         return adoptRef(*new VideoTrackPrivateGStreamer(player, index, WTFMove(stream)));
     }
 
     Kind kind() const final;
+#endif
 
     void disconnect() final;
 
@@ -67,7 +69,9 @@ protected:
 
 private:
     VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, unsigned index, GRefPtr<GstPad>&&, bool shouldHandleStreamStartEvent);
+#if GST_CHECK_VERSION(1, 10, 0)
     VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, unsigned index, GRefPtr<GstStream>&&);
+#endif
 
     WeakPtr<MediaPlayerPrivateGStreamer> m_player;
 };
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp	2022-03-28 15:09:13.774120807 -0500
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp	2022-03-31 14:36:36.575647643 -0500
@@ -300,7 +300,6 @@ static void webKitAudioSinkConstructed(G
     GST_CALL_PARENT(G_OBJECT_CLASS, constructed, (object));
 
     GST_OBJECT_FLAG_SET(GST_OBJECT_CAST(object), GST_ELEMENT_FLAG_SINK);
-    gst_bin_set_suppressed_flags(GST_BIN_CAST(object), static_cast<GstElementFlags>(GST_ELEMENT_FLAG_SOURCE | GST_ELEMENT_FLAG_SINK));
 }
 
 static void webkit_audio_sink_class_init(WebKitAudioSinkClass* klass)
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/ImageDecoder.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/ImageDecoder.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/graphics/ImageDecoder.cpp	2022-02-23 02:59:02.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/graphics/ImageDecoder.cpp	2022-03-28 15:09:37.026244616 -0500
@@ -38,10 +38,6 @@
 #include "ImageDecoderAVFObjC.h"
 #endif
 
-#if USE(GSTREAMER) && ENABLE(VIDEO)
-#include "ImageDecoderGStreamer.h"
-#endif
-
 namespace WebCore {
 
 #if ENABLE(GPU_PROCESS) && HAVE(AVASSETREADER)
@@ -98,11 +94,6 @@ RefPtr<ImageDecoder> ImageDecoder::creat
     }
 #endif
 
-#if USE(GSTREAMER) && ENABLE(VIDEO)
-    if (ImageDecoderGStreamer::canDecodeType(mimeType))
-        return ImageDecoderGStreamer::create(data, mimeType, alphaOption, gammaAndColorProfileOption);
-#endif
-
 #if USE(CG)
     return ImageDecoderCG::create(data, alphaOption, gammaAndColorProfileOption);
 #else
@@ -132,11 +123,6 @@ bool ImageDecoder::supportsMediaType(Med
 #endif
 #endif
 
-#if USE(GSTREAMER) && ENABLE(VIDEO)
-    if (ImageDecoderGStreamer::supportsMediaType(type))
-        return true;
-#endif
-
     return false;
 }
 
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/GStreamer.cmake webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/GStreamer.cmake
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/GStreamer.cmake	2022-03-28 15:09:13.778120828 -0500
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/GStreamer.cmake	2022-03-28 15:09:37.026244616 -0500
@@ -15,7 +15,6 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
         platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp
         platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
         platform/graphics/gstreamer/GStreamerVideoFrameHolder.cpp
-        platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
         platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
         platform/graphics/gstreamer/MediaEngineConfigurationFactoryGStreamer.cpp
         platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp	2022-03-28 15:09:13.778120828 -0500
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp	2022-03-28 15:09:37.026244616 -0500
@@ -22,7 +22,8 @@
 
 #include "config.h"
 
-#if ENABLE(VIDEO) && ENABLE(MEDIA_STREAM) && USE(GSTREAMER)
+#if 0
+
 #include "GStreamerCapturer.h"
 
 #include <gst/app/gstappsink.h>
@@ -238,4 +239,4 @@ void GStreamerCapturer::setInterrupted(b
 
 } // namespace WebCore
 
-#endif // ENABLE(VIDEO) && ENABLE(MEDIA_STREAM) && USE(GSTREAMER)
+#endif // ENABLE(VIDEO) && ENABLE(MEDIA_STREAM) && USE(GSTREAMER) && GST_CHECK_VERSION(1, 10, 0)
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp	2022-03-28 15:09:13.778120828 -0500
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp	2022-03-28 15:09:37.026244616 -0500
@@ -24,7 +24,7 @@
 #include "config.h"
 #include "GStreamerMediaStreamSource.h"
 
-#if ENABLE(VIDEO) && ENABLE(MEDIA_STREAM) && USE(GSTREAMER)
+#if 0
 
 #include "AudioTrackPrivateMediaStream.h"
 #include "GStreamerAudioData.h"
@@ -483,7 +483,9 @@ static void webkitMediaStreamSrcDispose(
 
 static GstStateChangeReturn webkitMediaStreamSrcChangeState(GstElement* element, GstStateChange transition)
 {
+#if GST_CHECK_VERSION(1, 14, 0)
     GST_DEBUG_OBJECT(element, "%s", gst_state_change_get_name(transition));
+#endif
     WebKitMediaStreamSrc* self = WEBKIT_MEDIA_STREAM_SRC_CAST(element);
 
     if (transition == GST_STATE_CHANGE_PAUSED_TO_READY) {
@@ -763,4 +765,4 @@ GstElement* webkitMediaStreamSrcNew()
     return GST_ELEMENT_CAST(g_object_new(webkit_media_stream_src_get_type(), nullptr));
 }
 
-#endif // ENABLE(VIDEO) && ENABLE(MEDIA_STREAM) && USE(GSTREAMER)
+#endif // ENABLE(VIDEO) && ENABLE(MEDIA_STREAM) && USE(GSTREAMER) && GST_CHECK_VERSION(1, 10, 0)
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/MIMETypeRegistry.cpp webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/MIMETypeRegistry.cpp
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/MIMETypeRegistry.cpp	2022-02-23 02:59:01.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/MIMETypeRegistry.cpp	2022-03-28 15:09:37.026244616 -0500
@@ -61,10 +61,6 @@
 #include "PreviewConverter.h"
 #endif
 
-#if USE(GSTREAMER) && ENABLE(VIDEO)
-#include "ImageDecoderGStreamer.h"
-#endif
-
 namespace WebCore {
 
 static String normalizedImageMIMEType(const String&);
@@ -436,11 +432,6 @@ bool MIMETypeRegistry::isSupportedImageV
         return true;
 #endif
 
-#if USE(GSTREAMER) && ENABLE(VIDEO)
-    if (ImageDecoderGStreamer::supportsContainerType(mimeType))
-        return true;
-#endif
-
     return false;
 }
 
diff -urp webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/VideoFrameMetadata.h webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/VideoFrameMetadata.h
--- webkitgtk-2.36.0.gstreamer1.12/Source/WebCore/platform/VideoFrameMetadata.h	2022-02-23 02:59:01.000000000 -0600
+++ webkitgtk-2.36.0.gstreamer1.8/Source/WebCore/platform/VideoFrameMetadata.h	2022-03-28 15:09:37.026244616 -0500
@@ -27,8 +27,6 @@
 
 #if ENABLE(VIDEO)
 
-#include <optional>
-
 namespace WebCore {
 
 struct VideoFrameMetadata {
