diff -urp webkitgtk-2.48.4.glib244/Source/cmake/GStreamerChecks.cmake webkitgtk-2.48.4.gstreamer1.8/Source/cmake/GStreamerChecks.cmake
--- webkitgtk-2.48.4.glib244/Source/cmake/GStreamerChecks.cmake	2025-07-30 14:44:42.474767660 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/cmake/GStreamerChecks.cmake	2025-07-30 14:55:27.750575345 -0500
@@ -1,7 +1,7 @@
 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO OR ENABLE_WEB_CODECS)
     SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE)
       if (USE_GSTREAMER_FULL)
-          find_package(GStreamer 1.16.1 REQUIRED COMPONENTS full)
+          find_package(GStreamer 1.8.3 REQUIRED COMPONENTS full)
           if (NOT PC_GSTREAMER_FULL_FOUND)
               message(FATAL_ERROR "GStreamer static library libgstreamer-full-1.0 not found")
           else ()
@@ -25,7 +25,7 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO OR
               list(APPEND GSTREAMER_COMPONENTS webrtc)
           endif ()
 
-          find_package(GStreamer 1.16.1 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.48.4.glib244/Source/WebCore/Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp	2025-03-20 04:15:05.064212000 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp	2025-07-30 14:55:27.752308180 -0500
@@ -61,7 +61,9 @@ void MediaStreamAudioSource::consumeAudi
         })));
     }
 
+#if GST_CHECK_VERSION(1, 16, 0)
     gst_buffer_add_audio_meta(buffer.get(), &m_info, numberOfFrames, nullptr);
+#endif
 #if GST_CHECK_VERSION(1, 20, 0)
     if (bus.isSilent())
         gst_buffer_add_audio_level_meta(buffer.get(), 127, FALSE);
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp	2025-02-25 06:10:30.170958300 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp	2025-07-30 14:55:27.753205721 -0500
@@ -206,7 +206,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.48.4.glib244/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp	2025-07-30 14:44:42.475274751 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp	2025-07-30 14:55:27.753968506 -0500
@@ -244,7 +244,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.48.4.glib244/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp	2025-02-25 06:10:30.172958400 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp	2025-07-30 14:55:27.754698960 -0500
@@ -80,6 +80,7 @@ struct _WebKitWebAudioSrcPrivate {
 
     GRefPtr<GstBufferPool> pool;
 
+    bool enableGapBufferSupport;
     bool hasRenderedAudibleFrame { false };
 
     Lock dispatchToRenderThreadLock;
@@ -94,6 +95,11 @@ struct _WebKitWebAudioSrcPrivate {
         sourcePad = webkitGstGhostPadFromStaticTemplate(&webAudioSrcTemplate, "src", nullptr);
 
         g_rec_mutex_init(&mutex);
+
+        // 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
+        enableGapBufferSupport = webkitGstCheckVersion(1, 12, 5);
     }
 
     ~_WebKitWebAudioSrcPrivate()
@@ -207,7 +213,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);
 
@@ -296,7 +301,9 @@ static GRefPtr<GstBuffer> webKitWebAudio
     }
 
     ASSERT(buffer);
+#if GST_CHECK_VERSION (1, 16, 0)
     gst_buffer_add_audio_meta(buffer.get(), &priv->info, priv->framesToPull, nullptr);
+#endif
 
     {
         GstMappedBuffer mappedBuffer(buffer.get(), GST_MAP_READ);
@@ -355,7 +362,8 @@ static void webKitWebAudioSrcRenderAndPu
         if (quirksManager.isEnabled())
             quirksManager.processWebAudioSilentBuffer(buffer.get());
         else {
-            GST_BUFFER_FLAG_SET(buffer.get(), GST_BUFFER_FLAG_GAP);
+            if (priv->enableGapBufferSupport)
+                GST_BUFFER_FLAG_SET(buffer.get(), GST_BUFFER_FLAG_GAP);
             GST_BUFFER_FLAG_SET(buffer.get(), GST_BUFFER_FLAG_DROPPABLE);
         }
     }
@@ -412,7 +420,9 @@ static GstStateChangeReturn webKitWebAud
     auto* src = WEBKIT_WEB_AUDIO_SRC(element);
     auto* priv = src->priv;
 
+#if GST_CHECK_VERSION(1, 14, 0)
     GST_DEBUG_OBJECT(element, "%s", gst_state_change_get_name(transition));
+#endif
 
     switch (transition) {
     case GST_STATE_CHANGE_NULL_TO_READY:
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp	2025-02-25 06:10:30.398528600 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp	2025-07-30 14:55:27.755336027 -0500
@@ -64,6 +64,7 @@ AudioTrackPrivateGStreamer::AudioTrackPr
     installUpdateConfigurationHandlers();
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer(ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer>&& player, unsigned index, GstStream* stream)
     : TrackPrivateBaseGStreamer(TrackPrivateBaseGStreamer::TrackType::Audio, this, index, stream)
     , m_player(WTFMove(player))
@@ -81,7 +82,9 @@ AudioTrackPrivateGStreamer::AudioTrackPr
 void AudioTrackPrivateGStreamer::capsChanged(TrackID streamId, GRefPtr<GstCaps>&& caps)
 {
     ASSERT(isMainThread());
+#if GST_CHECK_VERSION(1, 10, 0)
     updateConfigurationFromCaps(WTFMove(caps));
+#endif
 
     RefPtr player = m_player.get();
     if (!player)
@@ -154,11 +157,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();
 }
@@ -167,8 +173,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.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h	2025-02-25 06:10:30.398923200 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h	2025-07-30 14:55:27.755743179 -0500
@@ -48,10 +48,12 @@ public:
         return adoptRef(*new AudioTrackPrivateGStreamer(WTFMove(player), index, WTFMove(pad), trackId));
     }
 
+#if GST_CHECK_VERSION(1, 10, 0)
     static Ref<AudioTrackPrivateGStreamer> create(ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer>&& player, unsigned index, GstStream* stream)
     {
         return adoptRef(*new AudioTrackPrivateGStreamer(WTFMove(player), index, stream));
     }
+#endif
 
     Kind kind() const final;
 
@@ -76,18 +78,24 @@ public:
     AtomString label() const final { return m_label; }
     AtomString language() const final { return m_language; }
 
+#if GST_CHECK_VERSION(1, 10, 0)
     void updateConfigurationFromCaps(GRefPtr<GstCaps>&&) final;
+#endif
 
 protected:
+#if GST_CHECK_VERSION(1, 10, 0)
     void updateConfigurationFromTags(GRefPtr<GstTagList>&&) final;
 
     void tagsChanged(GRefPtr<GstTagList>&& tags) final { updateConfigurationFromTags(WTFMove(tags)); }
     void capsChanged(TrackID streamId, GRefPtr<GstCaps>&&) final;
+#endif
 
 private:
     AudioTrackPrivateGStreamer(ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer>&&, unsigned index, GRefPtr<GstPad>&&, bool shouldHandleStreamStartEvent);
     AudioTrackPrivateGStreamer(ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer>&&, unsigned index, GRefPtr<GstPad>&&, TrackID);
+#if GST_CHECK_VERSION(1, 16, 0)
     AudioTrackPrivateGStreamer(ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer>&&, unsigned index, GstStream*);
+#endif
 
     ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer> m_player;
 };
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h	2025-02-25 06:10:30.411958700 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h	2025-07-30 14:55:27.756145511 -0500
@@ -62,8 +62,10 @@ public:
     const String& systemId() const { return m_systemId; }
     String payloadContainerType() const
     {
+#if GST_CHECK_VERSION(1, 16, 0)
         if (m_systemId == GST_PROTECTION_UNSPECIFIED_SYSTEM_ID ""_s)
             return "webm"_s;
+#endif
         return "cenc"_s;
     }
 
@@ -112,8 +114,10 @@ public:
     static constexpr auto s_WidevineKeySystem = "com.widevine.alpha"_s;
     static constexpr auto s_PlayReadyUUID = WEBCORE_GSTREAMER_EME_UTILITIES_PLAYREADY_UUID ""_s;
     static constexpr std::array<ASCIILiteral, 2> s_PlayReadyKeySystems = { "com.microsoft.playready"_s,  "com.youtube.playready"_s };
+#if GST_CHECK_VERSION(1, 16, 0)
     static constexpr auto s_unspecifiedUUID = GST_PROTECTION_UNSPECIFIED_SYSTEM_ID ""_s;
     static constexpr auto s_unspecifiedKeySystem = GST_PROTECTION_UNSPECIFIED_SYSTEM_ID ""_s;
+#endif
 
     static bool isClearKeyKeySystem(const String& keySystem)
     {
@@ -145,6 +149,7 @@ public:
         return equalIgnoringASCIICase(uuid, s_PlayReadyUUID);
     }
 
+#if GST_CHECK_VERSION(1, 16, 0)
     static bool isUnspecifiedKeySystem(const String& keySystem)
     {
         return equalIgnoringASCIICase(keySystem, s_unspecifiedKeySystem);
@@ -154,6 +159,7 @@ public:
     {
         return equalIgnoringASCIICase(uuid, s_unspecifiedUUID);
     }
+#endif
 
     static const char* keySystemToUuid(const String& keySystem)
     {
@@ -166,8 +172,10 @@ public:
         if (isPlayReadyKeySystem(keySystem))
             return s_PlayReadyUUID;
 
+#if GST_CHECK_VERSION(1, 16, 0)
         if (isUnspecifiedKeySystem(keySystem))
             return s_unspecifiedUUID;
+#endif
 
         ASSERT_NOT_REACHED();
         return { };
@@ -184,8 +192,10 @@ public:
         if (isPlayReadyUUID(uuid))
             return s_PlayReadyKeySystems[0];
 
+#if GST_CHECK_VERSION(1, 16, 0)
         if (isUnspecifiedUUID(uuid))
             return s_unspecifiedKeySystem;
+#endif
 
         ASSERT_NOT_REACHED();
         return ""_s;
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp	2025-03-04 03:09:52.253487000 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp	2025-07-30 14:55:27.756617776 -0500
@@ -177,8 +177,11 @@ static GstCaps* transformCaps(GstBaseTra
 
                 // GST_PROTECTION_UNSPECIFIED_SYSTEM_ID was added in the GStreamer
                 // developement git master which will ship as version 1.16.0.
-                gst_structure_set_name(outgoingStructure.get(), !g_strcmp0(klass->protectionSystemId(self),
-                    GST_PROTECTION_UNSPECIFIED_SYSTEM_ID) ? "application/x-webm-enc" : "application/x-cenc");
+                gst_structure_set_name(outgoingStructure.get(),
+#if GST_CHECK_VERSION(1, 16, 0)
+                    !g_strcmp0(klass->protectionSystemId(self), GST_PROTECTION_UNSPECIFIED_SYSTEM_ID) ? "application/x-webm-enc" :
+#endif
+                    "application/x-cenc");
             }
         }
 
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp	2025-07-30 14:44:42.475806228 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp	2025-07-30 14:55:27.757049484 -0500
@@ -165,11 +165,15 @@ void webKitGLVideoSinkFinalize(GObject*
 
 static GstStateChangeReturn webKitGLVideoSinkChangeState(GstElement* element, GstStateChange transition)
 {
+#if GST_CHECK_VERSION(1, 14, 0)
     GST_DEBUG_OBJECT(element, "%s", gst_state_change_get_name(transition));
+#endif
 
     switch (transition) {
     case GST_STATE_CHANGE_NULL_TO_READY:
+#if GST_CHECK_VERSION(1, 14, 0)
     case GST_STATE_CHANGE_READY_TO_READY:
+#endif
     case GST_STATE_CHANGE_READY_TO_PAUSED: {
         if (!setGstElementGLContext(element, GST_GL_DISPLAY_CONTEXT_TYPE))
             return GST_STATE_CHANGE_FAILURE;
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp	2025-07-04 07:17:03.988733000 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp	2025-07-30 14:55:27.757437900 -0500
@@ -445,6 +445,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);
@@ -482,6 +483,7 @@ template <> void derefGPtr<GstStreamColl
     if (ptr)
         gst_object_unref(ptr);
 }
+#endif
 
 template <>
 GRefPtr<GstClock> adoptGRef(GstClock* ptr)
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h	2025-07-04 07:17:03.988733000 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h	2025-07-30 14:55:27.757816587 -0500
@@ -153,6 +153,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*);
@@ -160,6 +161,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.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp	2025-02-25 06:10:30.401958700 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp	2025-07-30 14:55:27.758152093 -0500
@@ -182,7 +182,9 @@ static gboolean gstAllocatorFastMallocMe
 static void gstAllocatorFastMallocConstructed(GObject* object)
 {
     G_OBJECT_CLASS(gst_allocator_fast_malloc_parent_class)->constructed(object);
+#if GST_CHECK_VERSION(1, 10, 0)
     GST_OBJECT_FLAG_SET(GST_OBJECT_CAST(object), GST_OBJECT_FLAG_MAY_BE_LEAKED);
+#endif
 
     auto allocator = GST_ALLOCATOR_CAST(object);
     allocator->mem_type = "FastMalloc";
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp	2025-07-30 14:44:42.476043027 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GStreamerAudioMixer.cpp	2025-07-30 14:55:27.758456800 -0500
@@ -58,8 +58,9 @@ GStreamerAudioMixer::GStreamerAudioMixer
 
 void GStreamerAudioMixer::ensureState(GstStateChange stateChange)
 {
+#if GST_CHECK_VERSION(1, 14, 0)
     GST_DEBUG_OBJECT(m_pipeline.get(), "Handling %s transition (%u mixer pads)", gst_state_change_get_name(stateChange), m_mixer->numsinkpads);
-
+#endif
     switch (stateChange) {
     case GST_STATE_CHANGE_READY_TO_PAUSED:
         gst_element_set_state(m_pipeline.get(), GST_STATE_PAUSED);
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2025-07-30 14:44:42.476365047 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2025-07-30 14:55:27.759113555 -0500
@@ -273,6 +273,7 @@ std::optional<TrackID> getStreamIdFromPa
     return streamId;
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 std::optional<TrackID> getStreamIdFromStream(const GRefPtr<GstStream>& stream)
 {
     const gchar* streamIdAsCharacters = gst_stream_get_stream_id(stream.get());
@@ -287,6 +288,7 @@ std::optional<TrackID> getStreamIdFromSt
 
     return streamId;
 }
+#endif
 
 std::optional<TrackID> parseStreamId(StringView stringId)
 {
@@ -649,7 +651,6 @@ void deinitializeGStreamer()
     teardownGStreamerRegistryScanner();
 #if ENABLE(VIDEO)
     teardownVideoEncoderSingleton();
-    teardownGStreamerImageDecoders();
 #endif
 }
 
@@ -795,6 +796,7 @@ int GstMappedFrame::planeStride(uint32_t
 
 WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
 
+#if GST_CHECK_VERSION(1, 16, 0)
 GstMappedAudioBuffer::GstMappedAudioBuffer(GstBuffer* buffer, GstAudioInfo info, GstMapFlags flags)
 {
     m_isValid = gst_audio_buffer_map(&m_buffer, &info, buffer, flags);
@@ -876,6 +878,7 @@ template Vector<std::span<uint8_t>> GstM
 template Vector<std::span<int16_t>> GstMappedAudioBuffer::samples(size_t) const;
 template Vector<std::span<int32_t>> GstMappedAudioBuffer::samples(size_t) const;
 template Vector<std::span<float>> GstMappedAudioBuffer::samples(size_t) const;
+#endif
 
 static GQuark customMessageHandlerQuark()
 {
@@ -944,10 +947,7 @@ void connectSimpleBusMessageCallback(Gst
             // This can happen if the latency of live elements changes, or
             // for one reason or another a new live element is added or
             // removed from the pipeline.
-            gst_element_call_async(pipeline.get(), reinterpret_cast<GstElementCallAsyncFunc>(+[](GstElement* pipeline, gpointer userData) {
-                UNUSED_PARAM(userData);
-                gst_bin_recalculate_latency(GST_BIN_CAST(pipeline));
-            }), nullptr, nullptr);
+            gst_bin_recalculate_latency(GST_BIN_CAST(pipeline.get()));
             break;
         default:
             break;
@@ -1401,7 +1401,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;
@@ -1428,7 +1428,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;
@@ -1480,7 +1480,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;
@@ -1499,12 +1499,14 @@ PlatformVideoColorSpace videoColorSpaceF
     case GST_VIDEO_COLOR_PRIMARIES_SMPTE170M:
         colorSpace.primaries = PlatformVideoColorPrimaries::Smpte170m;
         break;
+#if GST_CHECK_VERSION(1, 16, 0)
     case GST_VIDEO_COLOR_PRIMARIES_SMPTERP431:
         colorSpace.primaries = PlatformVideoColorPrimaries::SmpteRp431;
         break;
     case GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432:
         colorSpace.primaries = PlatformVideoColorPrimaries::SmpteEg432;
         break;
+#endif
     case GST_VIDEO_COLOR_PRIMARIES_FILM:
         colorSpace.primaries = PlatformVideoColorPrimaries::Film;
         break;
@@ -1514,14 +1516,16 @@ PlatformVideoColorSpace videoColorSpaceF
     case GST_VIDEO_COLOR_PRIMARIES_SMPTE240M:
         colorSpace.primaries = PlatformVideoColorPrimaries::Smpte240m;
         break;
+#if GST_CHECK_VERSION(1, 16, 0)
     case GST_VIDEO_COLOR_PRIMARIES_EBU3213:
         colorSpace.primaries = PlatformVideoColorPrimaries::JedecP22Phosphors;
         break;
+#endif
     case GST_VIDEO_COLOR_PRIMARIES_UNKNOWN:
         colorSpace.primaries = PlatformVideoColorPrimaries::Unspecified;
         break;
     default:
-#ifndef GST_DISABLE_GST_DEBUG
+#if 0
         GST_WARNING("Unhandled colorspace primaries from %s", colorimetry.get());
 #endif
         break;
@@ -1631,12 +1635,14 @@ void fillVideoInfoColorimetryFromColorSp
         case PlatformVideoColorPrimaries::Smpte170m:
             GST_VIDEO_INFO_COLORIMETRY(info).primaries = GST_VIDEO_COLOR_PRIMARIES_SMPTE170M;
             break;
+#if GST_CHECK_VERSION(1, 16, 0)
         case PlatformVideoColorPrimaries::SmpteRp431:
             GST_VIDEO_INFO_COLORIMETRY(info).primaries = GST_VIDEO_COLOR_PRIMARIES_SMPTERP431;
             break;
         case PlatformVideoColorPrimaries::SmpteEg432:
             GST_VIDEO_INFO_COLORIMETRY(info).primaries = GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432;
             break;
+#endif
         case PlatformVideoColorPrimaries::Film:
             GST_VIDEO_INFO_COLORIMETRY(info).primaries = GST_VIDEO_COLOR_PRIMARIES_FILM;
             break;
@@ -1646,9 +1652,11 @@ void fillVideoInfoColorimetryFromColorSp
         case PlatformVideoColorPrimaries::Smpte240m:
             GST_VIDEO_INFO_COLORIMETRY(info).primaries = GST_VIDEO_COLOR_PRIMARIES_SMPTE240M;
             break;
+#if GST_CHECK_VERSION(1, 16, 0)
         case PlatformVideoColorPrimaries::JedecP22Phosphors:
             GST_VIDEO_INFO_COLORIMETRY(info).primaries = GST_VIDEO_COLOR_PRIMARIES_EBU3213;
             break;
+#endif
         case PlatformVideoColorPrimaries::Unspecified:
             GST_VIDEO_INFO_COLORIMETRY(info).primaries = GST_VIDEO_COLOR_PRIMARIES_UNKNOWN;
             break;
@@ -1956,7 +1964,9 @@ static std::optional<GRefPtr<GstContext>
 
     return std::nullopt;
 }
+#endif
 
+#if USE(GSTREAMER_GL)
 bool setGstElementGLContext(GstElement* element, const char* contextType)
 {
     GRefPtr<GstContext> oldContext = adoptGRef(gst_element_get_context(element, contextType));
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h	2025-07-30 14:44:42.476979722 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h	2025-07-30 14:55:27.760262562 -0500
@@ -85,7 +85,9 @@ bool getSampleVideoInfo(GstSample*, GstV
 #endif
 StringView capsMediaType(const GstCaps*);
 std::optional<TrackID> getStreamIdFromPad(const GRefPtr<GstPad>&);
+#if GST_CHECK_VERSION(1, 10, 0)
 std::optional<TrackID> getStreamIdFromStream(const GRefPtr<GstStream>&);
+#endif
 std::optional<TrackID> parseStreamId(StringView stringId);
 bool doCapsHaveType(const GstCaps*, const char*);
 bool areEncryptedCaps(const GstCaps*);
@@ -254,6 +256,7 @@ private:
     GstVideoFrame m_frame;
 };
 
+#if GST_CHECK_VERSION(1, 16, 0)
 class GstMappedAudioBuffer {
     WTF_MAKE_TZONE_ALLOCATED(GstMappedAudioBuffer);
     WTF_MAKE_NONCOPYABLE(GstMappedAudioBuffer);
@@ -273,6 +276,7 @@ private:
     GstAudioBuffer m_buffer;
     bool m_isValid { false };
 };
+#endif
 
 void connectSimpleBusMessageCallback(GstElement*, Function<void(GstMessage*)>&& = [](GstMessage*) { });
 void disconnectSimpleBusMessageCallback(GstElement*);
@@ -481,4 +485,7 @@ private:
 GstBuffer* gst_buffer_new_memdup(gconstpointer data, gsize size);
 #endif
 
+#if !GST_CHECK_VERSION(1, 16, 0)
+#define         gst_sample_make_writable(sample)   GST_SAMPLE_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (sample)))
+#endif
 #endif // USE(GSTREAMER)
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp	2025-03-04 03:09:52.252487000 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp	2025-07-30 14:55:27.761091733 -0500
@@ -528,8 +528,6 @@ void GStreamerRegistryScanner::initializ
         { ElementFactories::Type::AudioDecoder, "audio/x-dts"_s, { }, { } },
         { ElementFactories::Type::AudioDecoder, "audio/x-sbc"_s, { }, { } },
         { ElementFactories::Type::AudioDecoder, "audio/x-sid"_s, { }, { } },
-        { ElementFactories::Type::AudioDecoder, "audio/x-alaw"_s, { }, { "alaw"_s } },
-        { ElementFactories::Type::AudioDecoder, "audio/x-mulaw"_s, { }, { "ulaw"_s } },
         { ElementFactories::Type::AudioDecoder, "audio/x-speex"_s, { "audio/speex"_s, "audio/x-speex"_s }, { } },
         { ElementFactories::Type::AudioDecoder, "audio/x-wavpack"_s, { "audio/x-wavpack"_s }, { } },
         { ElementFactories::Type::VideoDecoder, "video/mpeg, mpegversion=(int){1,2}, systemstream=(boolean)false"_s, { "video/mpeg"_s }, { "mpeg"_s } },
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp	2025-02-25 06:10:30.401958700 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp	2025-07-30 14:55:27.761952945 -0500
@@ -298,9 +298,11 @@ void ImageDecoderGStreamer::storeDecoded
 
 void ImageDecoderGStreamer::pushEncodedData(const FragmentedSharedBuffer& sharedBuffer)
 {
+    gsize size;
     auto data = sharedBuffer.makeContiguous();
     auto bytes = data->createGBytes();
-    auto buffer = adoptGRef(gst_buffer_new_wrapped_bytes(bytes.get()));
+  guint8 *bytes_data = (guint8 *) g_bytes_get_data (bytes.get(), &size);
+    auto buffer = adoptGRef(gst_buffer_new_wrapped_full(GST_MEMORY_FLAG_READONLY, bytes_data, size, 0, size, g_bytes_ref (bytes.get()), (GDestroyNotify) g_bytes_unref));
     m_eos = false;
     m_error = false;
 
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp	2025-02-25 06:10:30.402958600 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp	2025-07-30 14:55:27.762476256 -0500
@@ -63,6 +63,7 @@ InbandTextTrackPrivateGStreamer::InbandT
     installUpdateConfigurationHandlers();
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer(unsigned index, GstStream* stream)
     : InbandTextTrackPrivate(CueFormat::WebVTT)
     , TrackPrivateBaseGStreamer(TrackPrivateBaseGStreamer::TrackType::Text, this, index, stream)
@@ -76,6 +77,7 @@ InbandTextTrackPrivateGStreamer::InbandT
     auto caps = adoptGRef(gst_stream_get_caps(m_stream.get()));
     m_kind = doCapsHaveType(caps.get(), "closedcaption/"_s) ? Kind::Captions : Kind::Subtitles;
 }
+#endif
 
 void InbandTextTrackPrivateGStreamer::tagsChanged(GRefPtr<GstTagList>&& tags)
 {
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h	2025-02-25 06:10:30.402958600 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h	2025-07-30 14:55:27.762899829 -0500
@@ -52,10 +52,12 @@ public:
         return create(index, WTFMove(pad));
     }
 
+#if GST_CHECK_VERSION(1, 10, 0)
     static Ref<InbandTextTrackPrivateGStreamer> create(ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer>&&, unsigned index, GstStream* stream)
     {
         return adoptRef(*new InbandTextTrackPrivateGStreamer(index, stream));
     }
+#endif
 
     Kind kind() const final { return m_kind; }
     TrackID id() const final { return m_trackID.value_or(m_id); }
@@ -72,7 +74,9 @@ protected:
 private:
     InbandTextTrackPrivateGStreamer(unsigned index, GRefPtr<GstPad>&&, bool shouldHandleStreamStartEvent);
     InbandTextTrackPrivateGStreamer(unsigned index, GRefPtr<GstPad>&&, TrackID);
+#if GST_CHECK_VERSION(1, 16, 0)
     InbandTextTrackPrivateGStreamer(unsigned index, GstStream*);
+#endif
 
     void notifyTrackOfSample();
 
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2025-07-30 14:55:00.350021926 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2025-07-30 14:59:14.050245112 -0500
@@ -50,7 +50,6 @@
 #include "TextCombinerGStreamer.h"
 #include "TextSinkGStreamer.h"
 #include "TimeRanges.h"
-#include "VideoFrameMetadataGStreamer.h"
 #include "VideoSinkGStreamer.h"
 #include "VideoTrackPrivateGStreamer.h"
 #include "WebKitAudioSinkGStreamer.h"
@@ -158,6 +157,14 @@ MediaLogObserver& mediaLogObserverSingle
 }
 #endif // GST_DISABLE_GST_DEBUG
 
+static void convertToInternalProtocol(URL& url)
+{
+    if (webkitGstCheckVersion(1, 12, 0))
+        return;
+    if (url.protocolIsInHTTPFamily() || url.protocolIsBlob())
+        url.setProtocol(makeString("webkit+"_s, url.protocol()));
+}
+
 MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer(MediaPlayer* player)
     : m_notifier(MainThreadNotifier<MainThreadNotification>::create())
     , m_player(player)
@@ -377,6 +384,7 @@ void MediaPlayerPrivateGStreamer::load(c
     m_readyState = MediaPlayer::ReadyState::HaveNothing;
     player->readyStateChanged();
     m_areVolumeAndMuteInitialized = false;
+    m_hasTaintedOrigin = std::nullopt;
 
     if (!m_isDelayingLoad)
         commitLoad();
@@ -469,7 +477,7 @@ void MediaPlayerPrivateGStreamer::play()
         if (player) {
             if (player->isLooping()) {
                 GST_DEBUG_OBJECT(pipeline(), "Scheduling initial SEGMENT seek");
-                doSeek(SeekTarget { playbackPosition() }, m_playbackRate, true);
+                doSeek(SeekTarget { playbackPosition() }, m_playbackRate);
             } else
                 updateDownloadBufferingFlag();
         }
@@ -540,7 +548,7 @@ bool MediaPlayerPrivateGStreamer::paused
     return !m_isPipelinePlaying;
 }
 
-bool MediaPlayerPrivateGStreamer::doSeek(const SeekTarget& target, float rate, bool isAsync)
+bool MediaPlayerPrivateGStreamer::doSeek(const SeekTarget& target, float rate)
 {
     RefPtr player = m_player.get();
 
@@ -588,19 +596,8 @@ bool MediaPlayerPrivateGStreamer::doSeek
 
     auto seekStart = toGstClockTime(startTime);
     auto seekStop = toGstClockTime(endTime);
-    GstEvent* event = gst_event_new_seek(rate, GST_FORMAT_TIME, m_seekFlags, GST_SEEK_TYPE_SET, seekStart, GST_SEEK_TYPE_SET, seekStop);
-
-
-    if (isAsync) {
-        gst_element_call_async(m_pipeline.get(), reinterpret_cast<GstElementCallAsyncFunc>(+[](GstElement* pipeline, gpointer userData) {
-            GstEvent* event = static_cast<GstEvent*>(userData);
-            gst_element_send_event(pipeline, event);
-        }), event, nullptr);
-
-        return true;
-    }
 
-    return gst_element_send_event(m_pipeline.get(), event);
+    return gst_element_seek(m_pipeline.get(), rate, GST_FORMAT_TIME, m_seekFlags, GST_SEEK_TYPE_SET, seekStart, GST_SEEK_TYPE_SET, seekStop);
 }
 
 void MediaPlayerPrivateGStreamer::seekToTarget(const SeekTarget& inTarget)
@@ -989,6 +986,12 @@ unsigned long long MediaPlayerPrivateGSt
 
 std::optional<bool> MediaPlayerPrivateGStreamer::isCrossOrigin(const SecurityOrigin& origin) const
 {
+    // GStreamer < 1.12 has an incomplete uridownloader implementation so we
+    // can't use WebKitWebSrc for adaptive fragments downloading if this
+    // version is detected.
+    if (m_hasTaintedOrigin)
+        return true;
+
     if (WEBKIT_IS_WEB_SRC(m_source.get()))
         return webKitSrcIsCrossOrigin(WEBKIT_WEB_SRC(m_source.get()), origin);
     return false;
@@ -1107,6 +1110,7 @@ void MediaPlayerPrivateGStreamer::setPla
         cleanURLString = cleanURLString.left(url.pathEnd());
 
     m_url = URL { cleanURLString };
+    convertToInternalProtocol(m_url);
     GST_INFO_OBJECT(pipeline(), "Load %s", m_url.string().utf8().data());
     g_object_set(m_pipeline.get(), "uri", m_url.string().utf8().data(), nullptr);
 }
@@ -1662,6 +1666,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);
@@ -1694,8 +1699,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([[maybe_unused]] const GRefPtr<GstObject>& collectionOwner)
 {
     ASSERT(!m_isLegacyPlaybin);
@@ -1800,7 +1807,9 @@ void MediaPlayerPrivateGStreamer::update
     }
 #undef CREATE_OR_SELECT_TRACK
 }
+#endif // GST_CHECK_VERSION(1, 10, 0)
 
+#if GST_CHECK_VERSION(1, 10, 0)
 void MediaPlayerPrivateGStreamer::handleStreamCollectionMessage(GstMessage* message)
 {
     if (m_isLegacyPlaybin)
@@ -1832,6 +1841,7 @@ void MediaPlayerPrivateGStreamer::handle
     callOnMainThreadAndWait(WTFMove(callback));
     GST_DEBUG_OBJECT(pipeline(), "Updating tracks DONE");
 }
+#endif
 
 bool MediaPlayerPrivateGStreamer::handleNeedContextMessage(GstMessage* message)
 {
@@ -2122,6 +2132,7 @@ void MediaPlayerPrivateGStreamer::handle
         GstState newState;
         gst_message_parse_state_changed(message, &currentState, &newState, nullptr);
 
+#if GST_CHECK_VERSION(1, 16, 0)
         if (isHolePunchRenderingEnabled() && currentState <= GST_STATE_READY && newState >= GST_STATE_READY) {
             // If we didn't create a video sink, store a reference to the created one.
             if (!m_videoSink) {
@@ -2152,9 +2163,12 @@ void MediaPlayerPrivateGStreamer::handle
                     m_audioSink = element;
             }
         }
+#endif
 
+#if GST_CHECK_VERSION(1, 10, 0)
         if (quirksManager.isEnabled() && quirksManager.needsBufferingPercentageCorrection())
             quirksManager.setupBufferingPercentageCorrection(this, currentState, newState, GRefPtr<GstElement>(GST_ELEMENT(GST_MESSAGE_SRC(message))));
+#endif
 
         if (!messageSourceIsPlaybin || m_isDelayingLoad)
             break;
@@ -2211,6 +2225,7 @@ void MediaPlayerPrivateGStreamer::handle
             GST_DEBUG_OBJECT(pipeline(), "Processing HTTP headers: %" GST_PTR_FORMAT, structure);
             if (auto uri = gstStructureGetString(structure, "uri"_s)) {
                 URL url { makeString(uri) };
+                convertToInternalProtocol(m_url);
 
                 if (url != m_url) {
                     GST_DEBUG_OBJECT(pipeline(), "Ignoring HTTP response headers for non-main URI.");
@@ -2262,6 +2277,11 @@ void MediaPlayerPrivateGStreamer::handle
                 }
             }
         } else if (gst_structure_has_name(structure, "GstCacheDownloadComplete")) {
+        } else if (gst_structure_has_name(structure, "adaptive-streaming-statistics")) {
+            if (WEBKIT_IS_WEB_SRC(m_source.get()) && !webkitGstCheckVersion(1, 12, 0)) {
+                if (const char* uri = gst_structure_get_string(structure, "uri"))
+                    m_hasTaintedOrigin = webKitSrcIsCrossOrigin(WEBKIT_WEB_SRC_CAST(m_source.get()), SecurityOrigin::create(URL(URL(), String::fromLatin1(uri))));
+            }
             GST_INFO_OBJECT(pipeline(), "Stream is fully downloaded, stopping monitoring downloading progress.");
             m_fillTimer.stop();
             m_bufferingPercentage = 100;
@@ -2275,6 +2295,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;
@@ -2313,6 +2334,7 @@ void MediaPlayerPrivateGStreamer::handle
         notifyPlayerOfTrack<InbandTextTrackPrivateGStreamer>();
         break;
     }
+#endif
     default:
         GST_DEBUG_OBJECT(pipeline(), "Unhandled GStreamer message type: %s", GST_MESSAGE_TYPE_NAME(message));
         break;
@@ -2518,6 +2540,7 @@ void MediaPlayerPrivateGStreamer::proces
         processTableOfContentsEntry(static_cast<GstTocEntry*>(i->data));
 }
 
+#if 0
 void MediaPlayerPrivateGStreamer::configureElement(GstElement* element)
 {
     configureElementPlatformQuirks(element);
@@ -2573,6 +2596,7 @@ void MediaPlayerPrivateGStreamer::config
     if (!g_strcmp0(G_OBJECT_TYPE_NAME(G_OBJECT(element)), "GstQueue2"))
         g_object_set(G_OBJECT(element), "high-watermark", 0.10, nullptr);
 }
+#endif
 
 void MediaPlayerPrivateGStreamer::configureElementPlatformQuirks(GstElement* element)
 {
@@ -3233,8 +3257,10 @@ void MediaPlayerPrivateGStreamer::create
     auto usePlaybin3 = StringView::fromLatin1(g_getenv("WEBKIT_GST_USE_PLAYBIN3"));
     bool isMediaStream = url.protocolIs("mediastream"_s);
     bool isBlob = url.protocolIs("blob"_s);
+#if GST_CHECK_VERSION(1, 10, 0)
     if (isMediaSource() || isMediaStream || isBlob || usePlaybin3 == "1"_s)
         playbinName = "playbin3"_s;
+#endif
 
     ASSERT(!m_pipeline);
 
@@ -3302,20 +3328,50 @@ 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);
 
     // From GStreamer 1.22.0, uridecodebin3 is created in playbin3's _init(), so "element-setup" isn't called with it.
+#if GST_CHECK_VERSION(1, 10, 0)
     if (!m_isLegacyPlaybin && webkitGstCheckVersion(1, 22, 0)) {
         if (auto uriDecodeBin3 = adoptGRef(gst_bin_get_by_name(GST_BIN_CAST(m_pipeline.get()), "uridecodebin3")))
             configureElement(uriDecodeBin3.get());
     }
+#endif
 
-    g_signal_connect(GST_BIN_CAST(m_pipeline.get()), "element-setup", G_CALLBACK(+[](GstBin*, GstElement* element, MediaPlayerPrivateGStreamer* player) {
-        player->configureElement(element);
+    g_signal_connect(GST_BIN_CAST(m_pipeline.get()), "deep-element-added", G_CALLBACK(+[](GstBin*, GstBin* subBin, GstElement* element, MediaPlayerPrivateGStreamer* player) {
+        GUniquePtr<char> binName(gst_element_get_name(GST_ELEMENT_CAST(subBin)));
+        GUniquePtr<char> elementName(gst_element_get_name(element));
+
+        if (g_str_has_prefix(elementName.get(), "downloadbuffer")) {
+            player->configureDownloadBuffer(element);
+            return;
+        }
+
+        if (g_str_has_prefix(elementName.get(), "uridecodebin")) {
+            // This will set the multiqueue size to the default value.
+            g_object_set(element, "buffer-size", 2 * MB, nullptr);
+            return;
+        }
+
+        if (!g_str_has_prefix(binName.get(), "decodebin"))
+            return;
+
+        if (g_str_has_prefix(elementName.get(), "v4l2"))
+            player->m_videoDecoderPlatform = GstVideoDecoderPlatform::Video4Linux;
+        else if (g_str_has_prefix(elementName.get(), "imxvpudec"))
+            player->m_videoDecoderPlatform = GstVideoDecoderPlatform::ImxVPU;
+        else if (g_str_has_prefix(elementName.get(), "omx"))
+            player->m_videoDecoderPlatform = GstVideoDecoderPlatform::OpenMAX;
+
+#if USE(TEXTURE_MAPPER_GL)
+        player->updateTextureMapperFlags();
+#endif
     }), this);
 
     g_signal_connect_swapped(m_pipeline.get(), "source-setup", G_CALLBACK(sourceSetupCallback), this);
@@ -3378,6 +3434,7 @@ void MediaPlayerPrivateGStreamer::config
     setupCodecProbe(decoder);
 }
 
+#if 0
 void MediaPlayerPrivateGStreamer::configureVideoDecoder(GstElement* decoder)
 {
     GUniquePtr<char> name(gst_element_get_name(decoder));
@@ -3442,6 +3499,7 @@ void MediaPlayerPrivateGStreamer::config
         return GST_PAD_PROBE_OK;
     }, this, nullptr);
 }
+#endif
 
 bool MediaPlayerPrivateGStreamer::didPassCORSAccessCheck() const
 {
@@ -3836,7 +3894,7 @@ void MediaPlayerPrivateGStreamer::flushC
 {
     Locker sampleLocker { m_sampleMutex };
 
-    if (m_sample && gst_sample_get_buffer(m_sample.get())) {
+    if (m_sample) {
         // Allocate a new copy of the sample which has to be released. The copy is necessary so that
         // the video dimensions can still be fetched and also for canvas rendering. The release is
         // necessary because the sample might have been allocated by a hardware decoder and memory
@@ -4054,9 +4112,11 @@ GstElement* MediaPlayerPrivateGStreamer:
     else
         sink = GStreamerQuirksManager::singleton().createHolePunchVideoSink(m_isLegacyPlaybin, player.get());
 
+#if GST_CHECK_VERSION(1, 10, 0)
     // Configure sink before it allocates resources.
     if (sink)
         configureElement(sink);
+#endif
     return sink;
 }
 
@@ -4412,6 +4472,7 @@ WTFLogChannel& MediaPlayerPrivateGStream
 }
 #endif
 
+#if 0
 std::optional<VideoFrameMetadata> MediaPlayerPrivateGStreamer::videoFrameMetadata()
 {
     Locker sampleLocker { m_sampleMutex };
@@ -4441,6 +4502,7 @@ std::optional<VideoFrameMetadata> MediaP
 
     return metadata;
 }
+#endif
 
 static bool areAllSinksPlayingForBin(GstBin* bin)
 {
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2025-07-30 14:44:42.478143176 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h	2025-07-30 14:55:27.765216328 -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
     };
 
     enum class PlaybackRatePausedState {
@@ -332,7 +336,7 @@ protected:
     void ensureAudioSourceProvider();
     virtual void checkPlayingConsistency();
 
-    virtual bool doSeek(const SeekTarget& position, float rate, bool isAsync = false);
+    virtual bool doSeek(const SeekTarget& position, float rate);
     void invalidateCachedPosition() const;
     void ensureSeekFlags();
 
@@ -524,7 +528,6 @@ private:
     static void downloadBufferFileCreatedCallback(MediaPlayerPrivateGStreamer*);
 
     void configureAudioDecoder(GstElement*);
-    void configureVideoDecoder(GstElement*);
     void configureElement(GstElement*);
 
     void configureElementPlatformQuirks(GstElement*);
@@ -533,7 +536,9 @@ private:
 
     void setPlaybinURL(const URL& urlString);
 
+#if GST_CHECK_VERSION(1, 10, 0)
     void updateTracks(const GRefPtr<GstObject>& collectionOwner);
+#endif
     void updateVideoSizeAndOrientationFromCaps(const GstCaps*);
     bool hasFirstVideoSampleReachedSink() const;
 
@@ -622,6 +627,8 @@ private:
     uint64_t m_networkReadPosition { 0 };
     mutable uint64_t m_readPositionAtLastDidLoadingProgress { 0 };
 
+    std::optional<bool> m_hasTaintedOrigin { std::nullopt };
+
     GRefPtr<GstElement> m_fpsSink { nullptr };
     uint64_t m_totalVideoFrames { 0 };
     uint64_t m_droppedVideoFrames { 0 };
@@ -630,9 +637,7 @@ private:
     DataMutex<TaskAtMediaTimeScheduler> m_TaskAtMediaTimeSchedulerDataMutex;
 
 private:
-    std::optional<VideoFrameMetadata> videoFrameMetadata() final;
     uint64_t m_sampleCount { 0 };
-    uint64_t m_lastVideoFrameMetadataSampleCount { 0 };
     mutable PlatformTimeRanges m_buffered;
 #if !RELEASE_LOG_DISABLED
     Ref<const Logger> m_logger;
@@ -641,7 +646,9 @@ private:
 
     String m_errorMessage;
 
+#if GST_CHECK_VERSION (1, 10, 0)
     GRefPtr<GstStreamCollection> m_streamCollection;
+#endif
 
     AbortableTaskQueue m_sinkTaskQueue;
 
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp	2025-05-21 04:41:53.698903300 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp	2025-07-30 14:55:27.765739659 -0500
@@ -235,9 +235,8 @@ void MediaPlayerPrivateGStreamerMSE::see
     doSeek(target, m_playbackRate);
 }
 
-bool MediaPlayerPrivateGStreamerMSE::doSeek(const SeekTarget& target, float rate, bool isAsync)
+bool MediaPlayerPrivateGStreamerMSE::doSeek(const SeekTarget& target, float rate)
 {
-    UNUSED_PARAM(isAsync);
     // This method should only be called outside of MediaPlayerPrivateGStreamerMSE by MediaPlayerPrivateGStreamer::setRate().
 
     // Note: An important difference between seek with WebKitMediaSrc and regular playback is that seeking before
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h	2025-05-21 04:41:53.699903200 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h	2025-07-30 14:55:27.766091476 -0500
@@ -57,7 +57,7 @@ public:
     void play() override;
     void pause() override;
     void seekToTarget(const SeekTarget&) override;
-    bool doSeek(const SeekTarget&, float rate, bool isAsync = false) override;
+    bool doSeek(const SeekTarget&, float rate) override;
 
     void updatePipelineState(GstState);
 
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp	2025-03-24 04:49:13.158525500 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp	2025-07-30 14:55:27.766458972 -0500
@@ -45,11 +45,12 @@ static void ensureDebugCategoryInitializ
     });
 }
 
+#if ENABLE(VIDEO) && USE(GSTREAMER_GL)
 GstGLDisplay* PlatformDisplay::gstGLDisplay() const
 {
     ensureDebugCategoryInitialized();
     if (!m_gstGLDisplay)
-        m_gstGLDisplay = adoptGRef(GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(eglDisplay())));
+        m_gstGLDisplay = GST_GL_DISPLAY(gst_gl_display_egl_new_with_egl_display(eglDisplay()));
     GST_TRACE("Using GL display %" GST_PTR_FORMAT, m_gstGLDisplay.get());
     return m_gstGLDisplay.get();
 }
@@ -73,7 +74,7 @@ GstGLContext* PlatformDisplay::gstGLCont
         return nullptr;
     }
 
-    m_gstGLContext = adoptGRef(gst_gl_context_new_wrapped(gstDisplay, reinterpret_cast<guintptr>(context->platformContext()), GST_GL_PLATFORM_EGL, GST_GL_API_GLES2));
+    m_gstGLContext = gst_gl_context_new_wrapped(gstDisplay, reinterpret_cast<guintptr>(context->platformContext()), GST_GL_PLATFORM_EGL, GST_GL_API_GLES2);
     {
         GLContext::ScopedGLContextCurrent scopedCurrent(*context);
         if (gst_gl_context_activate(m_gstGLContext.get(), TRUE)) {
@@ -86,6 +87,7 @@ GstGLContext* PlatformDisplay::gstGLCont
     GST_DEBUG("Created GL context %" GST_PTR_FORMAT, m_gstGLContext.get());
     return m_gstGLContext.get();
 }
+#endif
 
 void PlatformDisplay::clearGStreamerGLState()
 {
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp	2025-02-25 06:10:30.406958600 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp	2025-07-30 14:55:27.766751647 -0500
@@ -87,6 +87,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)
@@ -105,6 +106,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)
 {
@@ -158,8 +160,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());
@@ -167,8 +171,10 @@ 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);
+#endif
 
     m_tags.clear();
 
@@ -206,8 +212,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());
@@ -327,6 +336,7 @@ void TrackPrivateBaseGStreamer::installU
                 track->updateConfigurationFromTags(getAllTags(track->m_pad));
             });
         }), this);
+#if GST_CHECK_VERSION(1, 10, 0)
     } else if (m_stream) {
         g_signal_connect_swapped(m_stream.get(), "notify::caps", G_CALLBACK(+[](TrackPrivateBaseGStreamer* track) {
             track->m_taskQueue.enqueueTask([track]() {
@@ -349,6 +359,7 @@ void TrackPrivateBaseGStreamer::installU
                 track->updateConfigurationFromTags(WTFMove(tags));
             });
         }), this);
+#endif
     }
 }
 
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h	2025-02-25 06:10:30.406958600 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h	2025-07-30 14:55:27.767066744 -0500
@@ -60,7 +60,9 @@ public:
     unsigned index() { return m_index; };
     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.
@@ -75,7 +77,9 @@ public:
 protected:
     TrackPrivateBaseGStreamer(TrackType, TrackPrivateBase*, unsigned index, GRefPtr<GstPad>&&, bool shouldHandleStreamStartEvent);
     TrackPrivateBaseGStreamer(TrackType, TrackPrivateBase*, unsigned index, GRefPtr<GstPad>&&, TrackID);
+#if GST_CHECK_VERSION(1, 16, 0)
     TrackPrivateBaseGStreamer(TrackType, TrackPrivateBase*, unsigned index, GstStream*);
+#endif
 
     void notifyTrackOfTagsChanged();
     void notifyTrackOfStreamChanged();
@@ -104,7 +108,9 @@ protected:
     TrackID 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.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp	2025-02-25 06:10:30.407958700 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp	2025-07-30 14:55:27.767421726 -0500
@@ -80,7 +80,7 @@ static RefPtr<ImageGStreamer> convertSam
     auto format = GST_VIDEO_INFO_HAS_ALPHA(&videoInfo) ? "ARGB"_s : "xRGB"_s;
 #endif
     auto caps = adoptGRef(gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING, format.characters(), "framerate", GST_TYPE_FRACTION, GST_VIDEO_INFO_FPS_N(&videoInfo), GST_VIDEO_INFO_FPS_D(&videoInfo), "width", G_TYPE_INT, GST_VIDEO_INFO_WIDTH(&videoInfo), "height", G_TYPE_INT, GST_VIDEO_INFO_HEIGHT(&videoInfo), nullptr));
-    auto convertedSample = GStreamerVideoFrameConverter::singleton().convert(sample, caps);
+    auto convertedSample = adoptGRef(gst_video_convert_sample(sample.get(), caps.get(), GST_CLOCK_TIME_NONE, nullptr));
     if (!convertedSample)
         return nullptr;
 
@@ -383,16 +383,21 @@ RefPtr<VideoFrameGStreamer> VideoFrameGS
             gst_caps_set_simple(outputCaps.get(), "framerate", GST_TYPE_FRACTION, frameRateNumerator, frameRateDenominator, nullptr);
 
         auto inputSample = adoptGRef(gst_sample_new(buffer.get(), caps.get(), nullptr, nullptr));
-        sample = GStreamerVideoFrameConverter::singleton().convert(inputSample, outputCaps);
-        if (!sample)
+        GUniqueOutPtr<GError> error;
+        sample = adoptGRef(gst_video_convert_sample(inputSample.get(), outputCaps.get(), GST_CLOCK_TIME_NONE, &error.outPtr()));
+        if (!sample) {
+            GST_ERROR("Video sample conversion failed: %s", error->message);
             return nullptr;
+        }
 
+#if 0
         GRefPtr buffer = gst_sample_get_buffer(sample.get());
         auto outputBuffer = webkitGstBufferSetVideoFrameTimeMetadata(WTFMove(buffer), WTFMove(metadata));
         gst_buffer_add_video_meta(outputBuffer.get(), GST_VIDEO_FRAME_FLAG_NONE, format, width, height);
         setBufferFields(outputBuffer.get(), presentationTime, frameRate);
         sample = adoptGRef(gst_sample_make_writable(sample.leakRef()));
         gst_sample_set_buffer(sample.get(), outputBuffer.get());
+#endif
     } else {
         auto outputBuffer = webkitGstBufferSetVideoFrameTimeMetadata(WTFMove(buffer), WTFMove(metadata));
         gst_buffer_add_video_meta(outputBuffer.get(), GST_VIDEO_FRAME_FLAG_NONE, format, width, height);
@@ -417,8 +422,10 @@ VideoFrameGStreamer::VideoFrameGStreamer
     GRefPtr buffer = gst_sample_get_buffer(m_sample.get());
     RELEASE_ASSERT(buffer);
     auto modifiedBuffer = webkitGstBufferSetVideoFrameTimeMetadata(WTFMove(buffer), WTFMove(metadata));
+#if 0
     m_sample = adoptGRef(gst_sample_make_writable(m_sample.leakRef()));
     gst_sample_set_buffer(m_sample.get(), modifiedBuffer.get());
+#endif
 }
 
 VideoFrameGStreamer::VideoFrameGStreamer(const GRefPtr<GstSample>& sample, const IntSize& presentationSize, const MediaTime& presentationTime, Rotation videoRotation, PlatformVideoColorSpace&& colorSpace)
@@ -431,6 +438,7 @@ VideoFrameGStreamer::VideoFrameGStreamer
 
 void VideoFrameGStreamer::setFrameRate(double frameRate)
 {
+#if GST_CHECK_VERSION(1, 16, 0)
     auto caps = adoptGRef(gst_caps_copy(gst_sample_get_caps(m_sample.get())));
     int frameRateNumerator, frameRateDenominator;
     gst_util_double_to_fraction(frameRate, &frameRateNumerator, &frameRateDenominator);
@@ -441,16 +449,19 @@ void VideoFrameGStreamer::setFrameRate(d
 
     m_sample = adoptGRef(gst_sample_make_writable(m_sample.leakRef()));
     gst_sample_set_caps(m_sample.get(), caps.get());
+#endif
 }
 
 void VideoFrameGStreamer::setMaxFrameRate(double maxFrameRate)
 {
+#if GST_CHECK_VERSION(1, 16, 0)
     auto caps = adoptGRef(gst_caps_copy(gst_sample_get_caps(m_sample.get())));
     int frameRateNumerator, frameRateDenominator;
     gst_util_double_to_fraction(maxFrameRate, &frameRateNumerator, &frameRateDenominator);
     gst_caps_set_simple(caps.get(), "framerate", GST_TYPE_FRACTION, 0, 1, "max-framerate", GST_TYPE_FRACTION, frameRateNumerator, frameRateDenominator, nullptr);
     m_sample = adoptGRef(gst_sample_make_writable(m_sample.leakRef()));
     gst_sample_set_caps(m_sample.get(), caps.get());
+#endif
 }
 
 void VideoFrameGStreamer::setPresentationTime(const MediaTime& presentationTime)
@@ -626,7 +637,12 @@ GRefPtr<GstSample> VideoFrameGStreamer::
     if (gst_caps_is_equal(caps, outputCaps.get()))
         return GRefPtr<GstSample>(m_sample);
 
-    return GStreamerVideoFrameConverter::singleton().convert(m_sample, outputCaps);
+    GUniqueOutPtr<GError> error;
+    auto convertedSample = adoptGRef(gst_video_convert_sample(m_sample.get(), outputCaps.get(), GST_CLOCK_TIME_NONE, &error.outPtr()));
+    if (!convertedSample)
+        GST_ERROR("Conversion to %s failed: %s", formatName.data(), error->message);
+
+    return convertedSample;
 }
 
 GRefPtr<GstSample> VideoFrameGStreamer::downloadSample(std::optional<GstVideoFormat> destinationFormat)
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp	2025-02-25 06:10:30.407958700 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp	2025-07-30 14:55:27.767834328 -0500
@@ -65,6 +65,7 @@ VideoTrackPrivateGStreamer::VideoTrackPr
     installUpdateConfigurationHandlers();
 }
 
+#if GST_CHECK_VERSION(1, 10, 0)
 VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer(ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer>&& player, unsigned index, GstStream* stream)
     : TrackPrivateBaseGStreamer(TrackPrivateBaseGStreamer::TrackType::Video, this, index, stream)
     , m_player(WTFMove(player))
@@ -172,11 +173,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();
 }
@@ -185,8 +189,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.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h	2025-02-25 06:10:30.407958700 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h	2025-07-30 14:55:27.768119629 -0500
@@ -49,10 +49,12 @@ public:
         return adoptRef(*new VideoTrackPrivateGStreamer(WTFMove(player), index, WTFMove(pad), trackId));
     }
 
+#if GST_CHECK_VERSION(1, 10, 0)
     static Ref<VideoTrackPrivateGStreamer> create(ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer>&& player, unsigned index, GstStream* stream)
     {
         return adoptRef(*new VideoTrackPrivateGStreamer(WTFMove(player), index, stream));
     }
+#endif
 
     Kind kind() const final;
 
@@ -77,18 +79,24 @@ public:
     AtomString label() const final { return m_label; }
     AtomString language() const final { return m_language; }
 
+#if GST_CHECK_VERSION(1, 16, 0)
     void updateConfigurationFromCaps(GRefPtr<GstCaps>&&) final;
+#endif
 
 protected:
+#if GST_CHECK_VERSION(1, 16, 0)
     void updateConfigurationFromTags(GRefPtr<GstTagList>&&) final;
 
     void tagsChanged(GRefPtr<GstTagList>&& tags) final { updateConfigurationFromTags(WTFMove(tags)); }
     void capsChanged(TrackID, GRefPtr<GstCaps>&&) final;
+#endif
 
 private:
     VideoTrackPrivateGStreamer(ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer>&&, unsigned index, GRefPtr<GstPad>&&, bool shouldHandleStreamStartEvent);
     VideoTrackPrivateGStreamer(ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer>&&, unsigned index, GRefPtr<GstPad>&&, TrackID);
+#if GST_CHECK_VERSION(1, 16, 0)
     VideoTrackPrivateGStreamer(ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer>&&, unsigned index, GstStream*);
+#endif
 
     ThreadSafeWeakPtr<MediaPlayerPrivateGStreamer> m_player;
 };
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp	2025-02-25 06:10:30.408958700 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp	2025-07-30 14:55:27.768383218 -0500
@@ -113,7 +113,9 @@ static GstStateChangeReturn webKitAudioS
     auto* sink = WEBKIT_AUDIO_SINK(element);
     auto* priv = sink->priv;
 
+#if GST_CHECK_VERSION(1, 14, 0)
     GST_DEBUG_OBJECT(sink, "Handling %s transition", gst_state_change_get_name(stateChange));
+#endif
 
     auto& mixer = GStreamerAudioMixer::singleton();
     if (priv->interAudioSink && stateChange == GST_STATE_CHANGE_NULL_TO_READY)
@@ -136,7 +138,6 @@ static void webKitAudioSinkConstructed(G
 {
     G_OBJECT_CLASS(webkit_audio_sink_parent_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.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp	2025-02-25 06:10:30.408958700 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp	2025-07-30 14:55:27.768800940 -0500
@@ -471,7 +471,12 @@ static GstFlowReturn webKitWebSrcCreate(
     //    "source-setup" event. This doesn't work for additional WebKitWebSrc elements created by adaptivedemux.
     //
     // 2) A GstContext query made here.
-    if (!members->loader) {
+    // 2) A GstContext query made here. Because of a bug, this only works in GStreamer >= 1.12.
+    //
+    // As a compatibility workaround, the http: URI protocol is only registered for gst>=1.12; otherwise using
+    // webkit+http:, which is used by MediaPlayerPrivateGStreamer but not by adaptivedemux's additional source
+    // elements, therefore using souphttpsrc instead and not routing traffic through the NetworkProcess.
+    if (webkitGstCheckVersion(1, 12, 0) && !members->loader) {
         members.runUnlocked([src, baseSrc]() {
             GRefPtr<GstQuery> query = adoptGRef(gst_query_new_context(WEBKIT_WEB_SRC_RESOURCE_LOADER_CONTEXT_TYPE_NAME));
             if (gst_pad_peer_query(GST_BASE_SRC_PAD(baseSrc), query.get())) {
@@ -879,13 +884,16 @@ static GstURIType webKitWebSrcUriGetType
 
 const gchar* const* webKitWebSrcGetProtocols(GType)
 {
-    static std::array<const char*, 4> protocols { "http", "https", "blob" };
+    static std::array<const char*, 4> protocols { "webkit+http", "webkit+https", "webkit+blob" };
     return protocols.data();
 }
 
 static URL convertPlaybinURI(const char* uriString)
 {
-    return URL { String::fromLatin1(uriString) };
+    URL url { String::fromLatin1(uriString) };
+    ASSERT(url.protocol().substring(0, 7) == "webkit+");
+    url.setProtocol(url.protocol().substring(7).toString());
+     return url;
 }
 
 static gchar* webKitWebSrcGetUri(GstURIHandler* handler)
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/ImageDecoder.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/ImageDecoder.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/graphics/ImageDecoder.cpp	2025-02-25 06:10:30.265958500 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/graphics/ImageDecoder.cpp	2025-07-30 14:55:27.769280608 -0500
@@ -39,10 +39,6 @@
 #include "ImageDecoderAVFObjC.h"
 #endif
 
-#if USE(GSTREAMER) && ENABLE(VIDEO)
-#include "ImageDecoderGStreamer.h"
-#endif
-
 namespace WebCore {
 
 WTF_MAKE_TZONE_ALLOCATED_IMPL(ImageDecoder);
@@ -106,11 +102,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))
@@ -147,11 +138,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.48.4.glib244/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp	2025-07-30 14:44:42.478769783 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/gstreamer/GStreamerCodecUtilities.cpp	2025-07-30 14:55:27.769623137 -0500
@@ -241,13 +241,13 @@ static std::pair<GRefPtr<GstCaps>, GRefP
     else if (primaries == VPConfigurationColorPrimaries::BT_2020_Nonconstant_Luminance)
         GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_BT2020;
     else if (primaries == VPConfigurationColorPrimaries::SMPTE_ST_428_1)
-        GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_SMPTEST428;
+        GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_UNKNOWN;
     else if (primaries == VPConfigurationColorPrimaries::SMPTE_RP_431_2)
-        GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_SMPTERP431;
+        GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_UNKNOWN;
     else if (primaries == VPConfigurationColorPrimaries::SMPTE_EG_432_1)
-        GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432;
+        GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_UNKNOWN;
     else if (primaries == VPConfigurationColorPrimaries::EBU_Tech_3213_E)
-        GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_EBU3213;
+        GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_UNKNOWN;
     else if (primaries == VPConfigurationColorPrimaries::Unspecified)
         GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_UNKNOWN;
 
@@ -396,6 +396,7 @@ static std::pair<GRefPtr<GstCaps>, GRefP
     case AV1ConfigurationColorPrimaries::BT_2020_Nonconstant_Luminance:
         GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_BT2020;
         break;
+#if GST_CHECK_VERSION(1, 18, 0)
     case AV1ConfigurationColorPrimaries::SMPTE_ST_428_1:
         GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_SMPTEST428;
         break;
@@ -408,6 +409,7 @@ static std::pair<GRefPtr<GstCaps>, GRefP
     case AV1ConfigurationColorPrimaries::EBU_Tech_3213_E:
         GST_VIDEO_INFO_COLORIMETRY(&info).primaries = GST_VIDEO_COLOR_PRIMARIES_EBU3213;
         break;
+#endif
     };
 
     switch (static_cast<AV1ConfigurationTransferCharacteristics>(configurationRecord->transferCharacteristics)) {
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/gstreamer/GStreamerElementHarness.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/gstreamer/GStreamerElementHarness.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/gstreamer/GStreamerElementHarness.cpp	2025-02-25 06:10:30.464670700 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/gstreamer/GStreamerElementHarness.cpp	2025-07-30 14:55:27.770050577 -0500
@@ -374,10 +374,12 @@ const GRefPtr<GstCaps>& GStreamerElement
     if (m_outputCaps)
         return m_outputCaps;
 
+#if GST_CHECK_VERSION (1, 16, 0)
     auto stream = adoptGRef(gst_pad_get_stream(m_pad.get()));
     if (stream)
         m_outputCaps = adoptGRef(gst_stream_get_caps(stream.get()));
     else
+#endif
         m_outputCaps = adoptGRef(gst_pad_get_current_caps(m_pad.get()));
     GST_DEBUG_OBJECT(m_pad.get(), "Output caps: %" GST_PTR_FORMAT, m_outputCaps.get());
     return m_outputCaps;
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp	2025-02-25 06:10:30.467958700 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/gstreamer/GStreamerQuirks.cpp	2025-07-30 14:55:27.770431709 -0500
@@ -80,7 +80,7 @@ GStreamerQuirksManager::GStreamerQuirksM
     if (quirksList) {
         StringView quirks { unsafeSpan(quirksList) };
         if (WTF::equalLettersIgnoringASCIICase(quirks, "help"_s)) {
-            gst_printerrln("Supported quirks for WEBKIT_GST_QUIRKS are: amlogic, broadcom, bcmnexus, openmax, realtek, westeros");
+            WTFLogAlways("Supported quirks for WEBKIT_GST_QUIRKS are: amlogic, broadcom, bcmnexus, openmax, realtek, westeros");
             return;
         }
 
diff -urp webkitgtk-2.48.4.glib244/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp	2025-07-30 14:44:42.479111922 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp	2025-07-30 14:55:27.770845844 -0500
@@ -165,12 +165,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.48.4.glib244/Source/WebCore/platform/MIMETypeRegistry.cpp webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/MIMETypeRegistry.cpp
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/MIMETypeRegistry.cpp	2025-02-25 06:10:30.104958300 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/MIMETypeRegistry.cpp	2025-07-30 14:55:27.771355630 -0500
@@ -61,10 +61,6 @@
 #include "PreviewConverter.h"
 #endif
 
-#if USE(GSTREAMER) && ENABLE(VIDEO)
-#include "ImageDecoderGStreamer.h"
-#endif
-
 namespace WebCore {
 
 WTF_MAKE_TZONE_ALLOCATED_IMPL(MIMETypeRegistryThreadGlobalData);
@@ -439,11 +435,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.48.4.glib244/Source/WebCore/platform/SourcesGStreamer.txt webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/SourcesGStreamer.txt
--- webkitgtk-2.48.4.glib244/Source/WebCore/platform/SourcesGStreamer.txt	2025-02-25 06:10:30.135958400 -0600
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WebCore/platform/SourcesGStreamer.txt	2025-07-30 14:55:27.771760327 -0500
@@ -55,10 +55,8 @@ platform/graphics/gstreamer/GStreamerAud
 platform/graphics/gstreamer/GStreamerCommon.cpp
 platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
 platform/graphics/gstreamer/GStreamerSinksWorkarounds.cpp
-platform/graphics/gstreamer/GStreamerVideoFrameConverter.cpp
 platform/graphics/gstreamer/GStreamerVideoSinkCommon.cpp
 platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp
-platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
 platform/graphics/gstreamer/ImageGStreamerCairo.cpp
 platform/graphics/gstreamer/ImageGStreamerSkia.cpp
 platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
@@ -75,7 +73,7 @@ platform/graphics/gstreamer/VideoEncoder
 platform/graphics/gstreamer/VideoFrameGStreamer.cpp
 platform/graphics/gstreamer/VideoFrameMetadataGStreamer.cpp
 platform/graphics/gstreamer/VideoSinkGStreamer.cpp
-platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp
+platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp @no-unify
 platform/graphics/gstreamer/WebKitAudioSinkGStreamer.cpp
 platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
 
diff -urp webkitgtk-2.48.4.glib244/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml webkitgtk-2.48.4.gstreamer1.8/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
--- webkitgtk-2.48.4.glib244/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml	2025-07-30 14:50:11.949196963 -0500
+++ webkitgtk-2.48.4.gstreamer1.8/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml	2025-07-30 14:55:27.772706199 -0500
@@ -8796,10 +8796,8 @@ WebRTCAV1CodecEnabled:
     WebKitLegacy:
       default: false
     WebKit:
-      "USE(GSTREAMER)": true
       default: false
     WebCore:
-      "USE(GSTREAMER)": true
       default: false
 
 WebRTCAudioLatencyAdaptationEnabled:
