diff -urp webkitgtk-2.42.5.orig/Source/cmake/GStreamerChecks.cmake webkitgtk-2.42.5/Source/cmake/GStreamerChecks.cmake
--- webkitgtk-2.42.5.orig/Source/cmake/GStreamerChecks.cmake	2024-02-06 11:11:23.489925286 -0600
+++ webkitgtk-2.42.5/Source/cmake/GStreamerChecks.cmake	2024-02-06 11:11:58.373383928 -0600
@@ -36,7 +36,7 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
               list(APPEND GSTREAMER_COMPONENTS webrtc)
           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)
diff -urp webkitgtk-2.42.5.orig/Source/cmake/OptionsGTK.cmake webkitgtk-2.42.5/Source/cmake/OptionsGTK.cmake
--- webkitgtk-2.42.5.orig/Source/cmake/OptionsGTK.cmake	2024-02-06 11:11:23.446591797 -0600
+++ webkitgtk-2.42.5/Source/cmake/OptionsGTK.cmake	2024-02-06 11:11:58.373383928 -0600
@@ -369,8 +369,6 @@ if (USE_OPENGL_OR_ES)
         if (NOT LIBDRM_FOUND)
             message(FATAL_ERROR "libdrm is required for USE_GBM")
         endif ()
-
-        SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_DMABUF ON)
     endif ()
 endif ()
 
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp	2023-09-19 03:27:49.763694000 -0500
+++ webkitgtk-2.42.5/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp	2024-02-06 11:11:58.376717274 -0600
@@ -212,7 +212,7 @@ static inline std::optional<int> channel
 
 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.42.5.orig/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp	2024-02-06 11:11:23.473258560 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp	2024-02-06 11:11:58.376717274 -0600
@@ -242,7 +242,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.42.5.orig/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp	2024-02-06 11:11:23.493258632 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp	2024-02-06 11:11:58.376717274 -0600
@@ -218,7 +218,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.42.5.orig/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp	2023-09-19 03:27:49.851692200 -0500
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp	2024-02-06 11:11:58.376717274 -0600
@@ -53,6 +53,7 @@ AudioTrackPrivateGStreamer::AudioTrackPr
     ensureDebugCategoryInitialized();
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer> player, unsigned index, GstStream* stream)
     : TrackPrivateBaseGStreamer(TrackPrivateBaseGStreamer::TrackType::Audio, this, index, stream)
     , m_player(player)
@@ -81,7 +82,9 @@ AudioTrackPrivateGStreamer::AudioTrackPr
 void AudioTrackPrivateGStreamer::capsChanged(const String& streamId, const GRefPtr<GstCaps>& caps)
 {
     ASSERT(isMainThread());
+#if GST_CHECK_VERSION(1, 10, 0)
     updateConfigurationFromCaps(caps);
+#endif
 
     if (!m_player)
         return;
@@ -141,11 +144,14 @@ void AudioTrackPrivateGStreamer::updateC
         configuration.numberOfChannels = GST_AUDIO_INFO_CHANNELS(&info);
     }
 }
+#endif
 
 AudioTrackPrivate::Kind AudioTrackPrivateGStreamer::kind() const
 {
+#if GST_CHECK_VERSION(1, 10, 0)
     if (m_stream && gst_stream_get_stream_flags(m_stream.get()) & GST_STREAM_FLAG_SELECT)
         return AudioTrackPrivate::Kind::Main;
+#endif
 
     return AudioTrackPrivate::kind();
 }
@@ -154,8 +160,10 @@ void AudioTrackPrivateGStreamer::disconn
 {
     m_taskQueue.startAborting();
 
+#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.42.5.orig/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h	2023-09-19 03:27:49.851692200 -0500
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h	2024-02-06 11:11:58.376717274 -0600
@@ -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, GstStream* stream)
     {
         return adoptRef(*new AudioTrackPrivateGStreamer(player, index, stream));
     }
+#endif
 
     Kind kind() const final;
 
@@ -61,15 +63,19 @@ public:
     AtomString language() const final { return m_language; }
 
 protected:
+#if GST_CHECK_VERSION(1, 10, 0)
     void updateConfigurationFromCaps(const GRefPtr<GstCaps>&);
     void updateConfigurationFromTags(const GRefPtr<GstTagList>&);
 
     void tagsChanged(const GRefPtr<GstTagList>& tags) final { updateConfigurationFromTags(tags); }
     void capsChanged(const String& streamId, const GRefPtr<GstCaps>&) final;
+#endif
 
 private:
     AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, unsigned index, GRefPtr<GstPad>&&, bool shouldHandleStreamStartEvent);
+#if GST_CHECK_VERSION(1, 10, 0)
     AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, unsigned index, GstStream*);
+#endif
 
     WeakPtr<MediaPlayerPrivateGStreamer> m_player;
 };
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp	2023-12-05 02:25:26.958405500 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp	2024-02-06 11:11:58.376717274 -0600
@@ -426,6 +426,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);
@@ -463,6 +464,7 @@ template <> void derefGPtr<GstStreamColl
     if (ptr)
         gst_object_unref(ptr);
 }
+#endif
 
 template <>
 GRefPtr<GstClock> adoptGRef(GstClock* ptr)
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h	2023-12-05 02:25:26.958405500 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h	2024-02-06 11:11:58.376717274 -0600
@@ -149,6 +149,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*);
@@ -156,6 +157,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.42.5.orig/Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp	2023-12-15 02:32:15.598474000 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp	2024-02-06 11:11:58.376717274 -0600
@@ -148,7 +148,9 @@ static void gst_allocator_fast_malloc_in
 {
     auto* baseAllocator = GST_ALLOCATOR_CAST(allocator);
 
+#if GST_CHECK_VERSION (1, 10, 0)
     GST_OBJECT_FLAG_SET(allocator, GST_OBJECT_FLAG_MAY_BE_LEAKED);
+#endif
 
     baseAllocator->mem_type = "FastMalloc";
     baseAllocator->mem_map = reinterpret_cast<GstMemoryMapFunction>(gstAllocatorFastMallocMemMap);
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2024-02-06 11:11:23.493258632 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2024-02-06 11:11:58.376717274 -0600
@@ -376,7 +376,6 @@ void registerWebKitGStreamerElements()
 
 #if ENABLE(VIDEO)
         gst_element_register(0, "webkitwebsrc", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_WEB_SRC);
-        gst_element_register(0, "webkitdmabufvideosink", GST_RANK_NONE, WEBKIT_TYPE_DMABUF_VIDEO_SINK);
 #if USE(GSTREAMER_GL)
         gst_element_register(0, "webkitglvideosink", GST_RANK_NONE, WEBKIT_TYPE_GL_VIDEO_SINK);
 #endif
@@ -824,7 +823,7 @@ PlatformVideoColorSpace videoColorSpaceF
 PlatformVideoColorSpace videoColorSpaceFromInfo(const GstVideoInfo& info)
 {
     ensureGStreamerInitialized();
-#ifndef GST_DISABLE_GST_DEBUG
+#if 0
     GUniquePtr<char> colorimetry(gst_video_colorimetry_to_string(&GST_VIDEO_INFO_COLORIMETRY(&info)));
 #endif
     PlatformVideoColorSpace colorSpace;
@@ -851,7 +850,7 @@ PlatformVideoColorSpace videoColorSpaceF
         colorSpace.matrix = PlatformVideoMatrixCoefficients::Unspecified;
         break;
     default:
-#ifndef GST_DISABLE_GST_DEBUG
+#if 0
         GST_WARNING("Unhandled colorspace matrix from %s", colorimetry.get());
 #endif
         break;
@@ -903,7 +902,7 @@ PlatformVideoColorSpace videoColorSpaceF
         colorSpace.transfer = PlatformVideoTransferCharacteristics::Unspecified;
         break;
     default:
-#ifndef GST_DISABLE_GST_DEBUG
+#if 0
         GST_WARNING("Unhandled colorspace transfer from %s", colorimetry.get());
 #endif
         break;
@@ -948,7 +947,7 @@ PlatformVideoColorSpace videoColorSpaceF
         colorSpace.primaries = PlatformVideoColorPrimaries::Unspecified;
         break;
     default:
-#ifndef GST_DISABLE_GST_DEBUG
+#if 0
         GST_WARNING("Unhandled colorspace primaries from %s", colorimetry.get());
 #endif
         break;
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp	2023-09-19 03:27:49.855692100 -0500
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp	2024-02-06 11:11:58.376717274 -0600
@@ -43,6 +43,7 @@ InbandTextTrackPrivateGStreamer::InbandT
 {
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer(unsigned index, GstStream* stream)
     : InbandTextTrackPrivate(CueFormat::WebVTT)
     , TrackPrivateBaseGStreamer(TrackPrivateBaseGStreamer::TrackType::Text, this, index, 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.42.5.orig/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h	2023-09-19 03:27:49.855692100 -0500
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h	2024-02-06 11:11:58.376717274 -0600
@@ -47,10 +47,12 @@ public:
         return create(index, WTFMove(pad));
     }
 
+#if GST_CHECK_VERSION(1, 10, 0)
     static Ref<InbandTextTrackPrivateGStreamer> create(WeakPtr<MediaPlayerPrivateGStreamer>, unsigned index, GstStream* stream)
     {
         return adoptRef(*new InbandTextTrackPrivateGStreamer(index, 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, GstStream*);
+#endif
 
     void notifyTrackOfSample();
 
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2024-02-06 11:11:23.493258632 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2024-02-06 11:11:58.380050619 -0600
@@ -1440,6 +1440,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);
@@ -1469,8 +1470,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<GstObject>& collectionOwner)
 {
     ASSERT(!m_isLegacyPlaybin);
@@ -1569,6 +1572,7 @@ void MediaPlayerPrivateGStreamer::update
     }
 #undef CREATE_OR_SELECT_TRACK
 }
+#endif // GST_CHECK_VERSION(1, 10, 0)
 
 void MediaPlayerPrivateGStreamer::videoChangedCallback(MediaPlayerPrivateGStreamer* player)
 {
@@ -1577,6 +1581,7 @@ void MediaPlayerPrivateGStreamer::videoC
     });
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 void MediaPlayerPrivateGStreamer::handleStreamCollectionMessage(GstMessage* message)
 {
     if (m_isLegacyPlaybin)
@@ -1606,6 +1611,7 @@ void MediaPlayerPrivateGStreamer::handle
     callOnMainThreadAndWait(WTFMove(callback));
     GST_DEBUG_OBJECT(pipeline(), "Updating tracks DONE");
 }
+#endif
 
 bool MediaPlayerPrivateGStreamer::handleNeedContextMessage(GstMessage* message)
 {
@@ -2054,6 +2060,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;
@@ -2082,6 +2089,7 @@ void MediaPlayerPrivateGStreamer::handle
         playbin3SendSelectStreamsIfAppropriate();
         break;
     }
+#endif
     default:
         GST_DEBUG_OBJECT(pipeline(), "Unhandled GStreamer message type: %s", GST_MESSAGE_TYPE_NAME(message));
         break;
@@ -2942,8 +2950,10 @@ void MediaPlayerPrivateGStreamer::create
     // WEBKIT_GST_USE_PLAYBIN3 environment variable.
     const char* usePlaybin3 = g_getenv("WEBKIT_GST_USE_PLAYBIN3");
     bool isMediaStream = url.protocolIs("mediastream"_s);
+#if GST_CHECK_VERSION(1, 10, 0)
     if (isMediaSource() || isMediaStream || (usePlaybin3 && !strcmp(usePlaybin3, "1")))
         playbinName = "playbin3";
+#endif
 
     ASSERT(!m_pipeline);
 
@@ -2997,9 +3007,11 @@ void MediaPlayerPrivateGStreamer::create
     // initilization segment is parsed and "updateend" is fired. We need therefore to handle these
     // synchronously in the same main thread tick to make the tracks information available to JS no
     // later than "updateend".
+#if GST_CHECK_VERSION(1, 10, 0)
     g_signal_connect_swapped(bus.get(), "sync-message::stream-collection", G_CALLBACK(+[](MediaPlayerPrivateGStreamer* player, GstMessage* message) {
         player->handleStreamCollectionMessage(message);
     }), this);
+#endif
 
     g_object_set(m_pipeline.get(), "mute", static_cast<gboolean>(player->muted()), nullptr);
 
@@ -3349,9 +3361,11 @@ static uint32_t fourccValue(GstVideoForm
         return uint32_t(DMABufFormat::FourCC::BGRA8888);
     case GST_VIDEO_FORMAT_ABGR:
         return uint32_t(DMABufFormat::FourCC::RGBA8888);
+#if GST_CHECK_VERSION(1, 10, 0)
     case GST_VIDEO_FORMAT_P010_10LE:
     case GST_VIDEO_FORMAT_P010_10BE:
         return uint32_t(DMABufFormat::FourCC::P010);
+#endif
 #if GST_CHECK_VERSION(1, 18, 0)
     case GST_VIDEO_FORMAT_P016_LE:
     case GST_VIDEO_FORMAT_P016_BE:
@@ -3364,7 +3378,7 @@ static uint32_t fourccValue(GstVideoForm
     return gst_video_format_to_fourcc(format);
 }
 
-static DMABufColorSpace colorSpaceForColorimetry(const GstVideoColorimetry* cinfo)
+static DMABufColorSpace colorSpaceForColorimetry(GstVideoColorimetry* cinfo)
 {
     if (gst_video_colorimetry_matches(cinfo, GST_VIDEO_COLORIMETRY_SRGB))
         return DMABufColorSpace::SRGB;
@@ -3433,8 +3447,12 @@ void MediaPlayerPrivateGStreamer::pushDM
     // the memory:DMABuf feature on the GstCaps object. All sensible decoders yielding DMABufs specify this.
     // For all other decoders, another option is peeking the zero-index GstMemory and testing whether it's
     // a DMABuf memory, i.e. allocated by a DMABuf-capable allocator. If it is, we can proceed the same way.
+#if GST_CHECK_VERSION(1, 10, 0)
     bool isDMABufMemory = gst_caps_features_contains(gst_caps_get_features(caps, 0), GST_CAPS_FEATURE_MEMORY_DMABUF)
         || gst_is_dmabuf_memory(gst_buffer_peek_memory(buffer, 0));
+#else
+    bool isDMABufMemory = false;
+#endif
     if (isDMABufMemory) {
         // In case of a hardware decoder that's yielding dmabuf memory, we can take the relevant data and
         // push it into the composition process.
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2024-02-06 11:11:23.493258632 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2024-02-06 11:11:58.380050619 -0600
@@ -253,8 +253,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();
@@ -490,7 +494,9 @@ private:
 
     void setPlaybinURL(const URL& urlString);
 
+#if GST_CHECK_VERSION(1, 10, 0)
     void updateTracks(const GRefPtr<GstObject>& collectionOwner);
+#endif
     void videoSinkCapsChanged(GstPad*);
     void updateVideoSizeAndOrientationFromCaps(const GstCaps*);
     bool hasFirstVideoSampleReachedSink() const;
@@ -600,7 +606,9 @@ private:
     RefPtr<GBMBufferSwapchain> m_swapchain;
 #endif
 
+#if GST_CHECK_VERSION (1, 10, 0)
     GRefPtr<GstStreamCollection> m_streamCollection;
+#endif
 
     AbortableTaskQueue m_sinkTaskQueue;
 
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp	2024-02-06 11:11:23.493258632 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp	2024-02-06 11:11:58.380050619 -0600
@@ -35,6 +35,7 @@ GST_DEBUG_CATEGORY_EXTERN(webkit_media_p
 
 namespace WebCore {
 
+#if ENABLE(VIDEO) && USE(GSTREAMER_GL)
 GstGLDisplay* PlatformDisplay::gstGLDisplay() const
 {
 #if USE(EGL)
@@ -71,5 +72,6 @@ GstGLContext* PlatformDisplay::gstGLCont
 #endif
     return m_gstGLContext.get();
 }
+#endif
 
 } // namespace WebCore
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp	2024-02-05 02:47:20.535899600 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp	2024-02-06 11:14:30.680597519 -0600
@@ -85,6 +85,7 @@ TrackPrivateBaseGStreamer::TrackPrivateB
     tagsChanged();
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer(TrackType type, TrackPrivateBase* owner, unsigned index, GstStream* stream)
     : m_notifier(MainThreadNotifier<MainThreadNotification>::create())
     , m_index(index)
@@ -102,6 +103,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)
 {
@@ -152,8 +154,10 @@ TrackPrivateBaseGStreamer::~TrackPrivate
 
 GstObject* TrackPrivateBaseGStreamer::objectForLogging() const
 {
+#if GST_CHECK_VERSION(1, 10, 0)
     if (m_stream)
         return GST_OBJECT_CAST(m_stream.get());
+#endif
 
     ASSERT(m_pad);
     return GST_OBJECT_CAST(m_pad.get());
@@ -161,10 +165,12 @@ GstObject* TrackPrivateBaseGStreamer::ob
 
 void TrackPrivateBaseGStreamer::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);
         ASSERT(!g_signal_handler_find(m_stream.get(), G_SIGNAL_MATCH_UNBLOCKED, 0, 0, nullptr, nullptr, nullptr));
     }
+#endif
 
     m_tags.clear();
 
@@ -202,8 +208,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.42.5.orig/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h	2023-09-19 03:27:49.855692100 -0500
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h	2024-02-06 11:11:58.380050619 -0600
@@ -60,7 +60,9 @@ public:
 
     void setIndex(unsigned index) { m_index =  index; }
 
+#if GST_CHECK_VERSION(1, 10, 0)
     GstStream* stream() const { 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.
@@ -69,7 +71,9 @@ public:
 
 protected:
     TrackPrivateBaseGStreamer(TrackType, TrackPrivateBase*, unsigned index, GRefPtr<GstPad>&&, bool shouldHandleStreamStartEvent);
+#if GST_CHECK_VERSION(1, 10, 0)
     TrackPrivateBaseGStreamer(TrackType, TrackPrivateBase*, unsigned index, GstStream*);
+#endif
 
     void notifyTrackOfTagsChanged();
     void notifyTrackOfStreamChanged();
@@ -92,7 +96,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;
     AbortableTaskQueue m_taskQueue;
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp	2023-09-19 03:27:49.855692100 -0500
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp	2024-02-06 11:11:58.380050619 -0600
@@ -53,6 +53,7 @@ VideoTrackPrivateGStreamer::VideoTrackPr
     ensureVideoTrackDebugCategoryInitialized();
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer> player, unsigned index, GstStream* stream)
     : TrackPrivateBaseGStreamer(TrackPrivateBaseGStreamer::TrackType::Video, this, index, stream)
     , m_player(player)
@@ -147,11 +148,14 @@ void VideoTrackPrivateGStreamer::updateC
         configuration.colorSpace = videoColorSpaceFromInfo(info);
     }
 }
+#endif
 
 VideoTrackPrivate::Kind VideoTrackPrivateGStreamer::kind() const
 {
+#if GST_CHECK_VERSION(1, 10, 0)
     if (m_stream && gst_stream_get_stream_flags(m_stream.get()) & GST_STREAM_FLAG_SELECT)
         return VideoTrackPrivate::Kind::Main;
+#endif
 
     return VideoTrackPrivate::kind();
 }
@@ -160,8 +164,10 @@ void VideoTrackPrivateGStreamer::disconn
 {
     m_taskQueue.startAborting();
 
+#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.42.5.orig/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h	2023-09-19 03:27:49.855692100 -0500
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h	2024-02-06 11:11:58.380050619 -0600
@@ -43,10 +43,12 @@ 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, GstStream* stream)
     {
         return adoptRef(*new VideoTrackPrivateGStreamer(player, index, stream));
     }
+#endif
 
     Kind kind() const final;
 
@@ -62,15 +64,19 @@ public:
     AtomString language() const final { return m_language; }
 
 protected:
+#if GST_CHECK_VERSION(1, 10, 0)
     void updateConfigurationFromCaps(const GRefPtr<GstCaps>&);
     void updateConfigurationFromTags(const GRefPtr<GstTagList>&);
 
     void tagsChanged(const GRefPtr<GstTagList>& tags) final { updateConfigurationFromTags(tags); }
     void capsChanged(const String&, const GRefPtr<GstCaps>&) final;
+#endif
 
 private:
     VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, unsigned index, GRefPtr<GstPad>&&, bool shouldHandleStreamStartEvent);
+#if GST_CHECK_VERSION(1, 10, 0)
     VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, unsigned index, GstStream*);
+#endif
 
     WeakPtr<MediaPlayerPrivateGStreamer> m_player;
 };
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp	2024-02-06 11:11:23.493258632 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp	2024-02-06 11:11:58.380050619 -0600
@@ -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.42.5.orig/Source/WebCore/platform/graphics/ImageDecoder.cpp webkitgtk-2.42.5/Source/WebCore/platform/graphics/ImageDecoder.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/graphics/ImageDecoder.cpp	2023-09-19 03:27:49.799693300 -0500
+++ webkitgtk-2.42.5/Source/WebCore/platform/graphics/ImageDecoder.cpp	2024-02-06 11:11:58.380050619 -0600
@@ -37,10 +37,6 @@
 #include "ImageDecoderAVFObjC.h"
 #endif
 
-#if USE(GSTREAMER) && ENABLE(VIDEO)
-#include "ImageDecoderGStreamer.h"
-#endif
-
 namespace WebCore {
 
 #if ENABLE(GPU_PROCESS) && HAVE(AVASSETREADER)
@@ -97,11 +93,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)
     // ScalableImageDecoder is used on CG ports for some specific image formats which the platform doesn't support directly.
     if (auto imageDecoder = ScalableImageDecoder::create(data, alphaOption, gammaAndColorProfileOption))
@@ -134,11 +125,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.42.5.orig/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp webkitgtk-2.42.5/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp	2023-09-19 03:27:49.875691700 -0500
+++ webkitgtk-2.42.5/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp	2024-02-06 11:11:58.383383964 -0600
@@ -152,12 +152,16 @@ public:
         }
 
         auto caps = adoptGRef(gst_caps_from_string(capsString));
+#if GST_CHECK_VERSION(1, 10, 0)
         GST_MINI_OBJECT_FLAG_SET(caps.get(), GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
+#endif
 
         GRefPtr<GstCaps> encodedFormat;
         if (encodedFormatString) {
             encodedFormat = adoptGRef(gst_caps_from_string(encodedFormatString));
+#if GST_CHECK_VERSION(1, 10, 0)
             GST_MINI_OBJECT_FLAG_SET(encodedFormat.get(), GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
+#endif
         }
 
         singleton().emplace(std::make_pair(id, EncoderDefinition {
diff -urp webkitgtk-2.42.5.orig/Source/WebCore/platform/MIMETypeRegistry.cpp webkitgtk-2.42.5/Source/WebCore/platform/MIMETypeRegistry.cpp
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/MIMETypeRegistry.cpp	2023-09-19 03:27:49.743694300 -0500
+++ webkitgtk-2.42.5/Source/WebCore/platform/MIMETypeRegistry.cpp	2024-02-06 11:11:58.383383964 -0600
@@ -59,10 +59,6 @@
 #include "PreviewConverter.h"
 #endif
 
-#if USE(GSTREAMER) && ENABLE(VIDEO)
-#include "ImageDecoderGStreamer.h"
-#endif
-
 namespace WebCore {
 
 static String normalizedImageMIMEType(const String&);
@@ -442,11 +438,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.42.5.orig/Source/WebCore/platform/SourcesGStreamer.txt webkitgtk-2.42.5/Source/WebCore/platform/SourcesGStreamer.txt
--- webkitgtk-2.42.5.orig/Source/WebCore/platform/SourcesGStreamer.txt	2024-02-06 11:11:23.496591977 -0600
+++ webkitgtk-2.42.5/Source/WebCore/platform/SourcesGStreamer.txt	2024-02-06 11:11:58.383383964 -0600
@@ -45,7 +45,6 @@ platform/audio/gstreamer/FFTFrameGStream
 platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp @no-unify
 
 platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
-platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp @no-unify
 platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp @no-unify
 platform/graphics/gstreamer/GRefPtrGStreamer.cpp
 platform/graphics/gstreamer/GStreamerAudioMixer.cpp
@@ -55,7 +54,6 @@ platform/graphics/gstreamer/GStreamerSin
 platform/graphics/gstreamer/GStreamerVideoFrameHolder.cpp @no-unify
 platform/graphics/gstreamer/GStreamerVideoSinkCommon.cpp
 platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp
-platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
 platform/graphics/gstreamer/ImageGStreamerCairo.cpp
 platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
 platform/graphics/gstreamer/MediaEngineConfigurationFactoryGStreamer.cpp
