Title: [289154] trunk
Revision
289154
Author
[email protected]
Date
2022-02-05 01:25:12 -0800 (Sat, 05 Feb 2022)

Log Message

[Flatpak SDK] Update to FDO 21.08.10 and GStreamer 1.20 releases
https://bugs.webkit.org/show_bug.cgi?id=236136

Patch by Philippe Normand <[email protected]> on 2022-02-05
Reviewed by Adrian Perez de Castro.

Source/WebCore:

Switch GStreamer 1.19 version checks to 1.20 now that it is officially released. Also
include a couple fixes that are needed with GStreamer 1.20 and one that is useful whatever
the GStreamer version:

- GStreamer 1.20 ships a vp8alphadecodebin element able to handle video/x-vp8 caps, so our
  libwebrtc decoder factory needs to account for its presence, in addition to vp8dec.
- With GStreamer 1.20 media/media-source/media-source-seek-back.html started racy crashing
  in the VideoTrackPrivateGStreamer configuration update, where the track was disconnected
  (hence its stream was cleared) and then a GObject notification was emitted by decodebin3. We
  should actually disconnect the GObject signal handlers before clearing the stream, to
  prevent potential null pointer access.

* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::handleNewDeinterleavePad):
* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
(WebCore::AudioTrackPrivateGStreamer::updateConfigurationFromCaps):
(WebCore::AudioTrackPrivateGStreamer::disconnect):
* platform/graphics/gstreamer/GStreamerCommon.h:
* platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
(WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad):
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
(WebCore::VideoTrackPrivateGStreamer::updateConfigurationFromCaps):
(WebCore::VideoTrackPrivateGStreamer::disconnect):
* platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:
(WebCore::VP8Decoder::Create):

Tools/buildstream:

Update from GStreamer 1.18.5 to 1.20.0, along with the FDO SDK 21.08.10 release, allowing us
to remove 3 vendored patches, all upstreamed.

* elements/freedesktop-sdk.bst:
* elements/sdk/gst-libav.bst:
* elements/sdk/gst-plugins-bad.bst:
* elements/sdk/gst-plugins-base.bst:
* elements/sdk/gst-plugins-good.bst:
* elements/sdk/gst-plugins-ugly.bst:
* elements/sdk/gstreamer.bst:
* patches/0001-binutils-import-upstream-patches-for-thin-archive-su.patch: Removed.
* patches/gst-plugins-bad-0001-debugutils-Add-fakeaudiosink-element.patch: Removed.
* patches/gstreamer-0001-devicemonitor-Stop-only-the-already-started-provider.patch: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (289153 => 289154)


--- trunk/Source/WebCore/ChangeLog	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Source/WebCore/ChangeLog	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,3 +1,38 @@
+2022-02-05  Philippe Normand  <[email protected]>
+
+        [Flatpak SDK] Update to FDO 21.08.10 and GStreamer 1.20 releases
+        https://bugs.webkit.org/show_bug.cgi?id=236136
+
+        Reviewed by Adrian Perez de Castro.
+
+        Switch GStreamer 1.19 version checks to 1.20 now that it is officially released. Also
+        include a couple fixes that are needed with GStreamer 1.20 and one that is useful whatever
+        the GStreamer version:
+
+        - GStreamer 1.20 ships a vp8alphadecodebin element able to handle video/x-vp8 caps, so our
+          libwebrtc decoder factory needs to account for its presence, in addition to vp8dec.
+        - With GStreamer 1.20 media/media-source/media-source-seek-back.html started racy crashing
+          in the VideoTrackPrivateGStreamer configuration update, where the track was disconnected
+          (hence its stream was cleared) and then a GObject notification was emitted by decodebin3. We
+          should actually disconnect the GObject signal handlers before clearing the stream, to
+          prevent potential null pointer access.
+
+        * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
+        (WebCore::AudioFileReader::handleNewDeinterleavePad):
+        * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
+        (WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):
+        * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
+        (WebCore::AudioTrackPrivateGStreamer::updateConfigurationFromCaps):
+        (WebCore::AudioTrackPrivateGStreamer::disconnect):
+        * platform/graphics/gstreamer/GStreamerCommon.h:
+        * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
+        (WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad):
+        * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
+        (WebCore::VideoTrackPrivateGStreamer::updateConfigurationFromCaps):
+        (WebCore::VideoTrackPrivateGStreamer::disconnect):
+        * platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp:
+        (WebCore::VP8Decoder::Create):
+
 2022-02-05  Brady Eidson  <[email protected]>
 
         Notification refactoring

Modified: trunk/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp (289153 => 289154)


--- trunk/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp	2022-02-05 09:25:12 UTC (rev 289154)
@@ -258,7 +258,7 @@
         [](GstAppSink* sink, gpointer userData) -> GstFlowReturn {
             return static_cast<AudioFileReader*>(userData)->handleSample(sink);
         },
-#if GST_CHECK_VERSION(1, 19, 1)
+#if GST_CHECK_VERSION(1, 20, 0)
         // new_event
         nullptr,
 #endif

Modified: trunk/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp (289153 => 289154)


--- trunk/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp	2022-02-05 09:25:12 UTC (rev 289154)
@@ -311,7 +311,7 @@
         [](GstAppSink* sink, gpointer userData) -> GstFlowReturn {
             return static_cast<AudioSourceProviderGStreamer*>(userData)->handleSample(sink, false);
         },
-#if GST_CHECK_VERSION(1, 19, 0)
+#if GST_CHECK_VERSION(1, 20, 0)
         // new_event
         nullptr,
 #endif

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp (289153 => 289154)


--- trunk/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp	2022-02-05 09:25:12 UTC (rev 289154)
@@ -90,7 +90,7 @@
         configuration.numberOfChannels = GST_AUDIO_INFO_CHANNELS(&info);
     }
 
-#if GST_CHECK_VERSION(1, 19, 0)
+#if GST_CHECK_VERSION(1, 20, 0)
     GUniquePtr<char> codec(gst_codec_utils_caps_get_mime_codec(caps.get()));
     configuration.codec = codec.get();
 #endif
@@ -110,6 +110,9 @@
 
 void AudioTrackPrivateGStreamer::disconnect()
 {
+    if (m_stream)
+        g_signal_handlers_disconnect_matched(m_stream.get(), G_SIGNAL_MATCH_DATA, 0, 0, nullptr, nullptr, this);
+
     m_player = nullptr;
     TrackPrivateBaseGStreamer::disconnect();
 }

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h (289153 => 289154)


--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h	2022-02-05 09:25:12 UTC (rev 289154)
@@ -329,7 +329,7 @@
 
 // In GStreamer 1.20 gst_audio_format_fill_silence() will be deprecated in favor of
 // gst_audio_format_info_fill_silence().
-#if GST_CHECK_VERSION(1, 19, 0)
+#if GST_CHECK_VERSION(1, 20, 0)
 #define webkitGstAudioFormatFillSilence gst_audio_format_info_fill_silence
 #else
 #define webkitGstAudioFormatFillSilence gst_audio_format_fill_silence
@@ -337,7 +337,7 @@
 
 // In GStreamer 1.20 gst_element_get_request_pad() was renamed to gst_element_request_pad_simple(),
 // so create an alias for older versions.
-#if !GST_CHECK_VERSION(1, 19, 0)
+#if !GST_CHECK_VERSION(1, 20, 0)
 #define gst_element_request_pad_simple gst_element_get_request_pad
 #endif
 

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp (289153 => 289154)


--- trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp	2022-02-05 09:25:12 UTC (rev 289154)
@@ -261,7 +261,7 @@
             static_cast<ImageDecoderGStreamer*>(userData)->notifySample(WTFMove(sample));
             return GST_FLOW_OK;
         },
-#if GST_CHECK_VERSION(1, 19, 1)
+#if GST_CHECK_VERSION(1, 20, 0)
         // new_event
         nullptr,
 #endif

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp (289153 => 289154)


--- trunk/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp	2022-02-05 09:25:12 UTC (rev 289154)
@@ -153,7 +153,7 @@
         configuration.colorSpace = WTFMove(colorSpace);
     }
 
-#if GST_CHECK_VERSION(1, 19, 0)
+#if GST_CHECK_VERSION(1, 20, 0)
     GUniquePtr<char> codec(gst_codec_utils_caps_get_mime_codec(caps.get()));
     configuration.codec = codec.get();
 #endif
@@ -173,6 +173,9 @@
 
 void VideoTrackPrivateGStreamer::disconnect()
 {
+    if (m_stream)
+        g_signal_handlers_disconnect_matched(m_stream.get(), G_SIGNAL_MATCH_DATA, 0, 0, nullptr, nullptr, this);
+
     m_player = nullptr;
     TrackPrivateBaseGStreamer::disconnect();
 }

Modified: trunk/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp (289153 => 289154)


--- trunk/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoDecoderFactory.cpp	2022-02-05 09:25:12 UTC (rev 289154)
@@ -367,11 +367,12 @@
     static std::unique_ptr<webrtc::VideoDecoder> Create()
     {
         auto factory = GstDecoderFactory("video/x-vp8");
-
-        if (factory && !g_strcmp0(GST_OBJECT_NAME(GST_OBJECT(factory.get())), "vp8dec")) {
-            GST_INFO("Our best GStreamer VP8 decoder is vp8dec, better use the one from LibWebRTC");
-
-            return std::unique_ptr<webrtc::VideoDecoder>(new webrtc::LibvpxVp8Decoder());
+        if (!factory) {
+            const auto* factoryName = GST_OBJECT_NAME(GST_OBJECT(factory.get()));
+            if (!g_strcmp0(factoryName, "vp8dec") || !g_strcmp0(factoryName, "vp8alphadecodebin")) {
+                GST_INFO("Our best GStreamer VP8 decoder is vp8dec, better use the one from LibWebRTC");
+                return std::unique_ptr<webrtc::VideoDecoder>(new webrtc::LibvpxVp8Decoder());
+            }
         }
 
         return std::unique_ptr<webrtc::VideoDecoder>(new VP8Decoder());

Modified: trunk/Tools/buildstream/ChangeLog (289153 => 289154)


--- trunk/Tools/buildstream/ChangeLog	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Tools/buildstream/ChangeLog	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,3 +1,24 @@
+2022-02-05  Philippe Normand  <[email protected]>
+
+        [Flatpak SDK] Update to FDO 21.08.10 and GStreamer 1.20 releases
+        https://bugs.webkit.org/show_bug.cgi?id=236136
+
+        Reviewed by Adrian Perez de Castro.
+
+        Update from GStreamer 1.18.5 to 1.20.0, along with the FDO SDK 21.08.10 release, allowing us
+        to remove 3 vendored patches, all upstreamed.
+
+        * elements/freedesktop-sdk.bst:
+        * elements/sdk/gst-libav.bst:
+        * elements/sdk/gst-plugins-bad.bst:
+        * elements/sdk/gst-plugins-base.bst:
+        * elements/sdk/gst-plugins-good.bst:
+        * elements/sdk/gst-plugins-ugly.bst:
+        * elements/sdk/gstreamer.bst:
+        * patches/0001-binutils-import-upstream-patches-for-thin-archive-su.patch: Removed.
+        * patches/gst-plugins-bad-0001-debugutils-Add-fakeaudiosink-element.patch: Removed.
+        * patches/gstreamer-0001-devicemonitor-Stop-only-the-already-started-provider.patch: Removed.
+
 2022-02-04  Philippe Normand  <[email protected]>
 
         [Flatpak SDK] Extension points for the Flatpak Sparkle-CDM extension

Modified: trunk/Tools/buildstream/elements/freedesktop-sdk.bst (289153 => 289154)


--- trunk/Tools/buildstream/elements/freedesktop-sdk.bst	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Tools/buildstream/elements/freedesktop-sdk.bst	2022-02-05 09:25:12 UTC (rev 289154)
@@ -3,9 +3,7 @@
 - kind: git_tag
   url: gitlab_com:freedesktop-sdk/freedesktop-sdk.git
   track: 'release/21.08'
-  ref: freedesktop-sdk-21.08.9-25-gfb49cd02a3869721e08be44e068979ce98da6da6
-- kind: patch
-  path: patches/0001-binutils-import-upstream-patches-for-thin-archive-su.patch
+  ref: freedesktop-sdk-21.08.10-21-g7f2b952d70b0cd71ef9156983947b1dc713a393f
 config:
   options:
     target_arch: '%{arch}'

Modified: trunk/Tools/buildstream/elements/sdk/gst-libav.bst (289153 => 289154)


--- trunk/Tools/buildstream/elements/sdk/gst-libav.bst	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Tools/buildstream/elements/sdk/gst-libav.bst	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,8 +1,8 @@
 kind: meson
 sources:
 - kind: tar
-  url: gst_downloads:gst-libav/gst-libav-1.18.5.tar.xz
-  ref: 822e008a910e9dd13aedbdd8dc63fedef4040c0ee2e927bab3112e9de693a548
+  url: gst_downloads:gst-libav/gst-libav-1.20.0.tar.xz
+  ref: 5eee5ed8d5082a31b500448e41535c722ee30cd5f8224f32982bbaba2eedef17
 build-depends:
 - freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
 - freedesktop-sdk.bst:components/nasm.bst

Modified: trunk/Tools/buildstream/elements/sdk/gst-plugins-bad.bst (289153 => 289154)


--- trunk/Tools/buildstream/elements/sdk/gst-plugins-bad.bst	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Tools/buildstream/elements/sdk/gst-plugins-bad.bst	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,11 +1,8 @@
 kind: meson
 sources:
 - kind: tar
-  url: gst_downloads:gst-plugins-bad/gst-plugins-bad-1.18.5.tar.xz
-  ref: a164923b94f0d08578a6fcaeaac6e0c05da788a46903a1086870e9ca45ad678e
-# Should be shipped in GStreamer 1.20. https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2125
-- kind: patch
-  path: patches/gst-plugins-bad-0001-debugutils-Add-fakeaudiosink-element.patch
+  url: gst_downloads:gst-plugins-bad/gst-plugins-bad-1.20.0.tar.xz
+  ref: 015b8d4d9a395ebf444d40876867a2034dd3304b3ad48bc3a0dd0c1ee71dc11d
 build-depends:
 - freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
 depends:
@@ -62,9 +59,12 @@
     -Dflite=disabled
     -Dfluidsynth=disabled
     -Dgme=disabled
+    -Dgs=disabled
     -Dgsm=disabled
     -Diqa=disabled
+    -Disac=disabled
     -Dladspa=disabled
+    -Dldac=disabled
     -Dlibde265=disabled
     -Dlibmms=disabled
     -Dlv2=disabled
@@ -80,7 +80,9 @@
     -Dnvdec=disabled
     -Dnvenc=disabled
     -Dofa=disabled
+    -Donnx=disabled
     -Dopenal=disabled
+    -Dopenaptx=disabled
     -Dopencv=disabled
     -Dopenexr=disabled
     -Dopenh264=disabled
@@ -87,6 +89,7 @@
     -Dopenmpt=disabled
     -Dopenni2=disabled
     -Dopensles=disabled
+    -Dqroverlay=disabled
     -Dresindvd=disabled
     -Drsvg=disabled
     -Drtmp=disabled

Modified: trunk/Tools/buildstream/elements/sdk/gst-plugins-base.bst (289153 => 289154)


--- trunk/Tools/buildstream/elements/sdk/gst-plugins-base.bst	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Tools/buildstream/elements/sdk/gst-plugins-base.bst	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,8 +1,8 @@
 kind: meson
 sources:
 - kind: tar
-  url: gst_downloads:gst-plugins-base/gst-plugins-base-1.18.5.tar.xz
-  ref: 960b7af4585700db0fdd5b843554e11e2564fed9e061f591fae88a7be6446fa3
+  url: gst_downloads:gst-plugins-base/gst-plugins-base-1.20.0.tar.xz
+  ref: 4cb66fccf730b1037e6533862c2128990912a6db4e5bbd14e0ef914450eb4c7c
 build-depends:
 - freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
 depends:

Modified: trunk/Tools/buildstream/elements/sdk/gst-plugins-good.bst (289153 => 289154)


--- trunk/Tools/buildstream/elements/sdk/gst-plugins-good.bst	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Tools/buildstream/elements/sdk/gst-plugins-good.bst	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,8 +1,8 @@
 kind: meson
 sources:
 - kind: tar
-  url: gst_downloads:gst-plugins-good/gst-plugins-good-1.18.5.tar.xz
-  ref: 3aaeeea7765fbf8801acce4a503a9b05f73f04e8a35352e9d00232cfd555796b
+  url: gst_downloads:gst-plugins-good/gst-plugins-good-1.20.0.tar.xz
+  ref: 2d119c15ab8c9e79f8cd3c6bf582ff7a050b28ccae52ab4865e1a1464991659c
 build-depends:
 - freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
 depends:

Modified: trunk/Tools/buildstream/elements/sdk/gst-plugins-ugly.bst (289153 => 289154)


--- trunk/Tools/buildstream/elements/sdk/gst-plugins-ugly.bst	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Tools/buildstream/elements/sdk/gst-plugins-ugly.bst	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,8 +1,8 @@
 kind: meson
 sources:
 - kind: tar
-  url: gst_downloads:gst-plugins-ugly/gst-plugins-ugly-1.18.4.tar.xz
-  ref: 218df0ce0d31e8ca9cdeb01a3b0c573172cc9c21bb3d41811c7820145623d13c
+  url: gst_downloads:gst-plugins-ugly/gst-plugins-ugly-1.20.0.tar.xz
+  ref: 4e8dcb5d26552f0a4937f6bc6279bd9070f55ca6ae0eaa32d72d264c44001c2e
 build-depends:
 - freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
 depends:
@@ -17,8 +17,9 @@
     -Damrnb=disabled
     -Damrwbdec=disabled
     -Dcdio=disabled
+    -Ddoc=disabled
     -Ddvdread=disabled
+    -Dgpl=enabled
     -Dmpeg2dec=disabled
     -Dsidplay=disabled
     -Dtests=disabled
-    -Ddoc=disabled

Modified: trunk/Tools/buildstream/elements/sdk/gstreamer.bst (289153 => 289154)


--- trunk/Tools/buildstream/elements/sdk/gstreamer.bst	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Tools/buildstream/elements/sdk/gstreamer.bst	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,11 +1,8 @@
 kind: meson
 sources:
 - kind: tar
-  url: gst_downloads:gstreamer/gstreamer-1.18.5.tar.xz
-  ref: 55862232a63459bbf56abebde3085ca9aec211b478e891dacea4d6df8cafe80a
-# Backport of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/679 to be shipped in 1.20.
-- kind: patch
-  path: patches/gstreamer-0001-devicemonitor-Stop-only-the-already-started-provider.patch
+  url: gst_downloads:gstreamer/gstreamer-1.20.0.tar.xz
+  ref: edf4bffff85591d4fff7b21bb9ed7f0feabc123ac4a4eff29e73cbce454f9db7
 build-depends:
 - freedesktop-sdk.bst:components/gobject-introspection.bst
 - freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst

Deleted: trunk/Tools/buildstream/patches/0001-binutils-import-upstream-patches-for-thin-archive-su.patch (289153 => 289154)


--- trunk/Tools/buildstream/patches/0001-binutils-import-upstream-patches-for-thin-archive-su.patch	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Tools/buildstream/patches/0001-binutils-import-upstream-patches-for-thin-archive-su.patch	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,294 +0,0 @@
-From c7d1d247bbe4a21727d16bfa123181663f959534 Mon Sep 17 00:00:00 2001
-From: Adrian Perez de Castro <[email protected]>
-Date: Tue, 1 Feb 2022 17:41:35 +0200
-Subject: [PATCH] binutils: import upstream patches for thin archive support
-
-See https://sourceware.org/bugzilla/show_bug.cgi?id=28138
----
- .../bootstrap/include/binutils-source.yml     |   4 +
- ...-bfd_error_malformed_archive-only-if.patch |  34 +++
- ...le-descriptor-if-there-is-no-archive.patch | 219 ++++++++++++++++++
- 3 files changed, 257 insertions(+)
- create mode 100644 patches/binutils/0001-bfd-Set-error-to-bfd_error_malformed_archive-only-if.patch
- create mode 100644 patches/binutils/0002-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch
-
-diff --git a/elements/bootstrap/include/binutils-source.yml b/elements/bootstrap/include/binutils-source.yml
-index 339746847..5c5a9e2e6 100644
---- a/elements/bootstrap/include/binutils-source.yml
-+++ b/elements/bootstrap/include/binutils-source.yml
-@@ -17,3 +17,7 @@ sources:
-   track-extra:
-   - binutils-2_37-branch
-   ref: binutils-2_37-0-g116a737f438d03a1bd6aa706b6ea0b4022f3b7e2
-+- kind: patch
-+  path: patches/binutils/0001-bfd-Set-error-to-bfd_error_malformed_archive-only-if.patch
-+- kind: patch
-+  path: patches/binutils/0002-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch
-diff --git a/patches/binutils/0001-bfd-Set-error-to-bfd_error_malformed_archive-only-if.patch b/patches/binutils/0001-bfd-Set-error-to-bfd_error_malformed_archive-only-if.patch
-new file mode 100644
-index 000000000..aa1edf914
---- /dev/null
-+++ b/patches/binutils/0001-bfd-Set-error-to-bfd_error_malformed_archive-only-if.patch
-@@ -0,0 +1,34 @@
-+From 1554891774c6f7c7c131c4d855411bbe04239b10 Mon Sep 17 00:00:00 2001
-+From: "H.J. Lu" <[email protected]>
-+Date: Mon, 26 Jul 2021 05:37:57 -0700
-+Subject: [PATCH 1/2] bfd: Set error to bfd_error_malformed_archive only if
-+ unset
-+
-+When reading an archive member, set error to bfd_error_malformed_archive
-+on open_nested_file failure only if the error is unset.
-+
-+	PR ld/28138
-+	* archive.c (_bfd_get_elt_at_filepos): Don't set error to
-+	bfd_error_malformed_archive if it has been set.
-+---
-+ bfd/archive.c | 3 ++-
-+ 1 file changed, 2 insertions(+), 1 deletion(-)
-+
-+diff --git a/bfd/archive.c b/bfd/archive.c
-+index 5f350b8e5ce..3868fc9f7ed 100644
-+--- a/bfd/archive.c
-++++ b/bfd/archive.c
-+@@ -713,8 +713,9 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
-+ 
-+       /* It's not an element of a nested archive;
-+ 	 open the external file as a bfd.  */
-++      bfd_set_error (bfd_error_no_error);
-+       n_bfd = open_nested_file (filename, archive);
-+-      if (n_bfd == NULL)
-++      if (n_bfd == NULL && bfd_get_error () == bfd_error_no_error)
-+ 	bfd_set_error (bfd_error_malformed_archive);
-+     }
-+   else
-+-- 
-+2.35.1
-+
-diff --git a/patches/binutils/0002-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch b/patches/binutils/0002-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch
-new file mode 100644
-index 000000000..e4886151f
---- /dev/null
-+++ b/patches/binutils/0002-bfd-Close-the-file-descriptor-if-there-is-no-archive.patch
-@@ -0,0 +1,219 @@
-+From 4d70a667aa6e434840411107d6f6c0b85556f7f0 Mon Sep 17 00:00:00 2001
-+From: "H.J. Lu" <[email protected]>
-+Date: Mon, 26 Jul 2021 05:59:55 -0700
-+Subject: [PATCH 2/2] bfd: Close the file descriptor if there is no archive fd
-+
-+Close the file descriptor if there is no archive plugin file descriptor
-+to avoid running out of file descriptors on thin archives with many
-+archive members.
-+
-+bfd/
-+
-+	PR ld/28138
-+	* plugin.c (bfd_plugin_close_file_descriptor): Close the file
-+	descriptor there is no archive plugin file descriptor.
-+
-+ld/
-+
-+	PR ld/28138
-+	* testsuite/ld-plugin/lto.exp: Run ld/28138 tests.
-+	* testsuite/ld-plugin/pr28138.c: New file.
-+	* testsuite/ld-plugin/pr28138-1.c: Likewise.
-+	* testsuite/ld-plugin/pr28138-2.c: Likewise.
-+	* testsuite/ld-plugin/pr28138-3.c: Likewise.
-+	* testsuite/ld-plugin/pr28138-4.c: Likewise.
-+	* testsuite/ld-plugin/pr28138-5.c: Likewise.
-+	* testsuite/ld-plugin/pr28138-6.c: Likewise.
-+	* testsuite/ld-plugin/pr28138-7.c: Likewise.
-+---
-+ bfd/plugin.c                       |  8 ++++++++
-+ ld/testsuite/ld-plugin/lto.exp     | 30 ++++++++++++++++++++++++++++++
-+ ld/testsuite/ld-plugin/pr28138-1.c |  6 ++++++
-+ ld/testsuite/ld-plugin/pr28138-2.c |  6 ++++++
-+ ld/testsuite/ld-plugin/pr28138-3.c |  6 ++++++
-+ ld/testsuite/ld-plugin/pr28138-4.c |  6 ++++++
-+ ld/testsuite/ld-plugin/pr28138-5.c |  6 ++++++
-+ ld/testsuite/ld-plugin/pr28138-6.c |  6 ++++++
-+ ld/testsuite/ld-plugin/pr28138-7.c |  6 ++++++
-+ ld/testsuite/ld-plugin/pr28138.c   | 20 ++++++++++++++++++++
-+ 10 files changed, 100 insertions(+)
-+ create mode 100644 ld/testsuite/ld-plugin/pr28138-1.c
-+ create mode 100644 ld/testsuite/ld-plugin/pr28138-2.c
-+ create mode 100644 ld/testsuite/ld-plugin/pr28138-3.c
-+ create mode 100644 ld/testsuite/ld-plugin/pr28138-4.c
-+ create mode 100644 ld/testsuite/ld-plugin/pr28138-5.c
-+ create mode 100644 ld/testsuite/ld-plugin/pr28138-6.c
-+ create mode 100644 ld/testsuite/ld-plugin/pr28138-7.c
-+ create mode 100644 ld/testsuite/ld-plugin/pr28138.c
-+
-+diff --git a/bfd/plugin.c b/bfd/plugin.c
-+index 6cfa2b66470..3bab8febe88 100644
-+--- a/bfd/plugin.c
-++++ b/bfd/plugin.c
-+@@ -291,6 +291,14 @@ bfd_plugin_close_file_descriptor (bfd *abfd, int fd)
-+ 	     && !bfd_is_thin_archive (abfd->my_archive))
-+ 	abfd = abfd->my_archive;
-+ 
-++      /* Close the file descriptor if there is no archive plugin file
-++	 descriptor.  */
-++      if (abfd->archive_plugin_fd == -1)
-++	{
-++	  close (fd);
-++	  return;
-++	}
-++
-+       abfd->archive_plugin_fd_open_count--;
-+       /* Dup the archive plugin file descriptor for later use, which
-+ 	 will be closed by _bfd_archive_close_and_cleanup.  */
-+diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
-+index def69e43ab3..63be062032b 100644
-+--- a/ld/testsuite/ld-plugin/lto.exp
-++++ b/ld/testsuite/ld-plugin/lto.exp
-+@@ -930,4 +930,34 @@ if { [check_lto_fat_available] } {
-+     }
-+ }
-+ 
-++run_cc_link_tests [list \
-++    [list \
-++	"Build pr28138.a" \
-++	"-T" "" \
-++	{pr28138-1.c pr28138-2.c pr28138-3.c pr28138-4.c pr28138-5.c \
-++	 pr28138-6.c pr28138-7.c} {} "pr28138.a" \
-++    ] \
-++    [list \
-++	"Build pr28138.o" \
-++	"" "" \
-++	{pr28138.c} {} \
-++    ] \
-++]
-++
-++set exec_output [run_host_cmd "sh" \
-++			      "-c \"ulimit -n 20; \
-++			      $CC -Btmpdir/ld -o tmpdir/pr28138 \
-++			      tmpdir/pr28138.o tmpdir/pr28138.a\""]
-++set exec_output [prune_warnings $exec_output]
-++if [string match "" $exec_output] then {
-++    set exec_output [run_host_cmd "tmpdir/pr28138" ""]
-++    if [string match "PASS" $exec_output] then {
-++	pass "PR ld/28138"
-++    } else {
-++	fail "PR ld/28138"
-++    }
-++} else {
-++    fail "PR ld/28138"
-++}
-++
-+ restore_notify
-+diff --git a/ld/testsuite/ld-plugin/pr28138-1.c b/ld/testsuite/ld-plugin/pr28138-1.c
-+new file mode 100644
-+index 00000000000..51d119e1642
-+--- /dev/null
-++++ b/ld/testsuite/ld-plugin/pr28138-1.c
-+@@ -0,0 +1,6 @@
-++extern int a0(void);
-++int
-++a1(void)
-++{
-++  return 1 + a0();
-++}
-+diff --git a/ld/testsuite/ld-plugin/pr28138-2.c b/ld/testsuite/ld-plugin/pr28138-2.c
-+new file mode 100644
-+index 00000000000..1120cd797e9
-+--- /dev/null
-++++ b/ld/testsuite/ld-plugin/pr28138-2.c
-+@@ -0,0 +1,6 @@
-++extern int a1(void);
-++int
-++a2(void)
-++{
-++  return 1 + a1();
-++}
-+diff --git a/ld/testsuite/ld-plugin/pr28138-3.c b/ld/testsuite/ld-plugin/pr28138-3.c
-+new file mode 100644
-+index 00000000000..ec464947ee6
-+--- /dev/null
-++++ b/ld/testsuite/ld-plugin/pr28138-3.c
-+@@ -0,0 +1,6 @@
-++extern int a2(void);
-++int
-++a3(void)
-++{
-++  return 1 + a2();
-++}
-+diff --git a/ld/testsuite/ld-plugin/pr28138-4.c b/ld/testsuite/ld-plugin/pr28138-4.c
-+new file mode 100644
-+index 00000000000..475701b2c5c
-+--- /dev/null
-++++ b/ld/testsuite/ld-plugin/pr28138-4.c
-+@@ -0,0 +1,6 @@
-++extern int a3(void);
-++int
-++a4(void)
-++{
-++  return 1 + a3();
-++}
-+diff --git a/ld/testsuite/ld-plugin/pr28138-5.c b/ld/testsuite/ld-plugin/pr28138-5.c
-+new file mode 100644
-+index 00000000000..e24f86c363e
-+--- /dev/null
-++++ b/ld/testsuite/ld-plugin/pr28138-5.c
-+@@ -0,0 +1,6 @@
-++extern int a4(void);
-++int
-++a5(void)
-++{
-++  return 1 + a4();
-++}
-+diff --git a/ld/testsuite/ld-plugin/pr28138-6.c b/ld/testsuite/ld-plugin/pr28138-6.c
-+new file mode 100644
-+index 00000000000..b5b938bdb21
-+--- /dev/null
-++++ b/ld/testsuite/ld-plugin/pr28138-6.c
-+@@ -0,0 +1,6 @@
-++extern int a5(void);
-++int
-++a6(void)
-++{
-++  return 1 + a5();
-++}
-+diff --git a/ld/testsuite/ld-plugin/pr28138-7.c b/ld/testsuite/ld-plugin/pr28138-7.c
-+new file mode 100644
-+index 00000000000..4ef75bf0f0c
-+--- /dev/null
-++++ b/ld/testsuite/ld-plugin/pr28138-7.c
-+@@ -0,0 +1,6 @@
-++extern int a6(void);
-++int
-++a7(void)
-++{
-++  return 1 + a6();
-++}
-+diff --git a/ld/testsuite/ld-plugin/pr28138.c b/ld/testsuite/ld-plugin/pr28138.c
-+new file mode 100644
-+index 00000000000..68252c9f382
-+--- /dev/null
-++++ b/ld/testsuite/ld-plugin/pr28138.c
-+@@ -0,0 +1,20 @@
-++#include <stdio.h>
-++
-++extern int a7(void);
-++
-++int
-++a0(void)
-++{
-++  return 0;
-++}
-++
-++int
-++main()
-++{
-++  if (a7() == 7)
-++    {
-++      printf ("PASS\n");
-++      return 0;
-++    }
-++  return 1;
-++}
-+-- 
-+2.35.1
-+
--- 
-2.35.1
-

Deleted: trunk/Tools/buildstream/patches/gst-plugins-bad-0001-debugutils-Add-fakeaudiosink-element.patch (289153 => 289154)


--- trunk/Tools/buildstream/patches/gst-plugins-bad-0001-debugutils-Add-fakeaudiosink-element.patch	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Tools/buildstream/patches/gst-plugins-bad-0001-debugutils-Add-fakeaudiosink-element.patch	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,743 +0,0 @@
-From 382b844e4c10638730786d61ccc96c8c6b2f428d Mon Sep 17 00:00:00 2001
-From: Philippe Normand <[email protected]>
-Date: Tue, 30 Mar 2021 14:40:53 +0100
-Subject: [PATCH] debugutils: Add fakeaudiosink element
-
-This element can be useful for CI purposes on machines not running any system
-audio daemon. The element implements the GstStreamVolume interface.
----
- docs/plugins/gst_plugins_cache.json | 333 ++++++++++++++++++++++++++++
- gst/debugutils/debugutilsbad.c      |   3 +
- gst/debugutils/gstfakeaudiosink.c   | 262 ++++++++++++++++++++++
- gst/debugutils/gstfakeaudiosink.h   |  63 ++++++
- gst/debugutils/meson.build          |   3 +-
- 5 files changed, 663 insertions(+), 1 deletion(-)
- create mode 100644 gst/debugutils/gstfakeaudiosink.c
- create mode 100644 gst/debugutils/gstfakeaudiosink.h
-
-diff --git a/docs/plugins/gst_plugins_cache.json b/docs/plugins/gst_plugins_cache.json
-index 02da7405d..f46f2a4c7 100644
---- a/docs/plugins/gst_plugins_cache.json
-+++ b/docs/plugins/gst_plugins_cache.json
-@@ -8417,6 +8417,339 @@
-                 },
-                 "rank": "none"
-             },
-+            "fakeaudiosink": {
-+                "author": "Philippe Normand <[email protected]>",
-+                "description": "Fake audio renderer",
-+                "hierarchy": [
-+                    "GstFakeAudioSink",
-+                    "GstBin",
-+                    "GstElement",
-+                    "GstObject",
-+                    "GInitiallyUnowned",
-+                    "GObject"
-+                ],
-+                "interfaces": [
-+                    "GstChildProxy",
-+                    "GstStreamVolume"
-+                ],
-+                "klass": "Audio/Sink",
-+                "long-name": "Fake Audio Sink",
-+                "pad-templates": {
-+                    "sink": {
-+                        "caps": "audio/x-raw:\n         format: { F64LE, F64BE, F32LE, F32BE, S32LE, S32BE, U32LE, U32BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, S16LE, S16BE, U16LE, U16BE, S8, U8 }\n           rate: [ 1, 2147483647 ]\n       channels: [ 1, 2147483647 ]\n",
-+                        "direction": "sink",
-+                        "presence": "always"
-+                    }
-+                },
-+                "properties": {
-+                    "async": {
-+                        "blurb": "Go asynchronously to PAUSED",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "true",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gboolean",
-+                        "writable": true
-+                    },
-+                    "blocksize": {
-+                        "blurb": "Size in bytes to pull per buffer (0 = default)",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "4096",
-+                        "max": "-1",
-+                        "min": "0",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "guint",
-+                        "writable": true
-+                    },
-+                    "can-activate-pull": {
-+                        "blurb": "Can activate in pull mode",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "false",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gboolean",
-+                        "writable": true
-+                    },
-+                    "can-activate-push": {
-+                        "blurb": "Can activate in push mode",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "true",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gboolean",
-+                        "writable": true
-+                    },
-+                    "drop-out-of-segment": {
-+                        "blurb": "Drop and don't render / hand off out-of-segment buffers",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "true",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gboolean",
-+                        "writable": true
-+                    },
-+                    "dump": {
-+                        "blurb": "Dump buffer contents to stdout",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "false",
-+                        "mutable": "playing",
-+                        "readable": true,
-+                        "type": "gboolean",
-+                        "writable": true
-+                    },
-+                    "enable-last-sample": {
-+                        "blurb": "Enable the last-sample property",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "true",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gboolean",
-+                        "writable": true
-+                    },
-+                    "last-message": {
-+                        "blurb": "The message describing current status",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "NULL",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gchararray",
-+                        "writable": false
-+                    },
-+                    "last-sample": {
-+                        "blurb": "The last sample received in the sink",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "GstSample",
-+                        "writable": false
-+                    },
-+                    "max-bitrate": {
-+                        "blurb": "The maximum bits per second to render (0 = disabled)",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "0",
-+                        "max": "18446744073709551615",
-+                        "min": "0",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "guint64",
-+                        "writable": true
-+                    },
-+                    "max-lateness": {
-+                        "blurb": "Maximum number of nanoseconds that a buffer can be late before it is dropped (-1 unlimited)",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "18446744073709551615",
-+                        "max": "9223372036854775807",
-+                        "min": "-1",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gint64",
-+                        "writable": true
-+                    },
-+                    "mute": {
-+                        "blurb": "Mute the audio channel without changing the volume",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "false",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gboolean",
-+                        "writable": true
-+                    },
-+                    "num-buffers": {
-+                        "blurb": "Number of buffers to accept going EOS",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "-1",
-+                        "max": "2147483647",
-+                        "min": "-1",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gint",
-+                        "writable": true
-+                    },
-+                    "processing-deadline": {
-+                        "blurb": "Maximum processing time for a buffer in nanoseconds",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "20000000",
-+                        "max": "18446744073709551615",
-+                        "min": "0",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "guint64",
-+                        "writable": true
-+                    },
-+                    "qos": {
-+                        "blurb": "Generate Quality-of-Service events upstream",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "true",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gboolean",
-+                        "writable": true
-+                    },
-+                    "render-delay": {
-+                        "blurb": "Additional render delay of the sink in nanoseconds",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "0",
-+                        "max": "18446744073709551615",
-+                        "min": "0",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "guint64",
-+                        "writable": true
-+                    },
-+                    "signal-handoffs": {
-+                        "blurb": "Send a signal before unreffing the buffer",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "false",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gboolean",
-+                        "writable": true
-+                    },
-+                    "silent": {
-+                        "blurb": "Don't produce last_message events",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "true",
-+                        "mutable": "playing",
-+                        "readable": true,
-+                        "type": "gboolean",
-+                        "writable": true
-+                    },
-+                    "state-error": {
-+                        "blurb": "Generate a state change error",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "none (0)",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "GstFakeSinkStateError",
-+                        "writable": true
-+                    },
-+                    "stats": {
-+                        "blurb": "Sink Statistics",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "application/x-gst-base-sink-stats, average-rate=(double)0, dropped=(guint64)0, rendered=(guint64)0;",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "GstStructure",
-+                        "writable": false
-+                    },
-+                    "sync": {
-+                        "blurb": "Sync on the clock",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "true",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gboolean",
-+                        "writable": true
-+                    },
-+                    "throttle-time": {
-+                        "blurb": "The time to keep between rendered buffers (0 = disabled)",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "0",
-+                        "max": "18446744073709551615",
-+                        "min": "0",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "guint64",
-+                        "writable": true
-+                    },
-+                    "ts-offset": {
-+                        "blurb": "Timestamp offset in nanoseconds",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "0",
-+                        "max": "9223372036854775807",
-+                        "min": "-9223372036854775808",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gint64",
-+                        "writable": true
-+                    },
-+                    "volume": {
-+                        "blurb": "The audio volume, 1.0=100%%",
-+                        "conditionally-available": false,
-+                        "construct": false,
-+                        "construct-only": false,
-+                        "controllable": false,
-+                        "default": "1",
-+                        "max": "10",
-+                        "min": "0",
-+                        "mutable": "null",
-+                        "readable": true,
-+                        "type": "gdouble",
-+                        "writable": true
-+                    }
-+                },
-+                "rank": "none"
-+            },
-             "fakevideosink": {
-                 "author": "Nicolas Dufresne <[email protected]>",
-                 "description": "Fake video display that allows zero-copy",
-diff --git a/gst/debugutils/debugutilsbad.c b/gst/debugutils/debugutilsbad.c
-index 3774f7bb5..51682e9c8 100644
---- a/gst/debugutils/debugutilsbad.c
-+++ b/gst/debugutils/debugutilsbad.c
-@@ -30,6 +30,7 @@ GType gst_compare_get_type (void);
- GType gst_debug_spy_get_type (void);
- GType gst_error_ignore_get_type (void);
- GType gst_watchdog_get_type (void);
-+GType gst_fake_audio_sink_get_type (void);
- GType gst_fake_video_sink_get_type (void);
- GType gst_test_src_bin_get_type (void);
- GType gst_clock_select_get_type (void);
-@@ -51,6 +52,8 @@ plugin_init (GstPlugin * plugin)
-       gst_watchdog_get_type ());
-   gst_element_register (plugin, "errorignore", GST_RANK_NONE,
-       gst_error_ignore_get_type ());
-+  gst_element_register (plugin, "fakeaudiosink", GST_RANK_NONE,
-+      gst_fake_audio_sink_get_type ());
-   gst_element_register (plugin, "fakevideosink", GST_RANK_NONE,
-       gst_fake_video_sink_get_type ());
-   gst_element_register (plugin, "testsrcbin", GST_RANK_NONE,
-diff --git a/gst/debugutils/gstfakeaudiosink.c b/gst/debugutils/gstfakeaudiosink.c
-new file mode 100644
-index 000000000..8f8c56bf8
---- /dev/null
-+++ b/gst/debugutils/gstfakeaudiosink.c
-@@ -0,0 +1,262 @@
-+/*
-+ * GStreamer
-+ * Copyright (C) 2017 Collabora Inc.
-+ * Copyright (C) 2021 Igalia S.L.
-+ *   Author: Philippe Normand <[email protected]>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-+ * Boston, MA 02110-1301, USA.
-+ */
-+
-+/**
-+ * SECTION:element-fakeaudiosink
-+ * @title: fakeaudiosink
-+ *
-+ * This element is the same as fakesink but will pretend to act as an audio sink
-+ * supporting the `GstStreamVolume` interface. This is useful for throughput
-+ * testing while creating a new pipeline or for CI purposes on machines not
-+ * running a real audio daemon.
-+ *
-+ * ## Example launch lines
-+ * |[
-+ * gst-launch-1.0 audiotestsrc ! fakeaudiosink
-+ * ]|
-+ *
-+ * Since: 1.20
-+ */
-+
-+#include "gstfakeaudiosink.h"
-+
-+#include <gst/audio/audio.h>
-+
-+enum
-+{
-+  PROP_0,
-+  PROP_VOLUME,
-+  PROP_MUTE,
-+  PROP_LAST
-+};
-+
-+
-+static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
-+    GST_PAD_SINK,
-+    GST_PAD_ALWAYS,
-+    GST_STATIC_CAPS (GST_AUDIO_CAPS_MAKE (GST_AUDIO_FORMATS_ALL)));
-+
-+G_DEFINE_TYPE_WITH_CODE (GstFakeAudioSink, gst_fake_audio_sink, GST_TYPE_BIN,
-+    G_IMPLEMENT_INTERFACE (GST_TYPE_STREAM_VOLUME, NULL););
-+
-+/* TODO complete the types and make this an utility */
-+static void
-+gst_fake_audio_sink_proxy_properties (GstFakeAudioSink * self,
-+    GstElement * child)
-+{
-+  static gsize initialized = 0;
-+
-+  if (g_once_init_enter (&initialized)) {
-+    GObjectClass *object_class;
-+    GParamSpec **properties;
-+    guint n_properties, i;
-+
-+    object_class = G_OBJECT_CLASS (GST_FAKE_AUDIO_SINK_GET_CLASS (self));
-+    properties = g_object_class_list_properties (G_OBJECT_GET_CLASS (child),
-+        &n_properties);
-+
-+    for (i = 0; i < n_properties; i++) {
-+      guint property_id = i + PROP_LAST;
-+
-+      if (properties[i]->owner_type != G_OBJECT_TYPE (child) &&
-+          properties[i]->owner_type != GST_TYPE_BASE_SINK)
-+        continue;
-+
-+      if (G_IS_PARAM_SPEC_BOOLEAN (properties[i])) {
-+        GParamSpecBoolean *prop = G_PARAM_SPEC_BOOLEAN (properties[i]);
-+        g_object_class_install_property (object_class, property_id,
-+            g_param_spec_boolean (g_param_spec_get_name (properties[i]),
-+                g_param_spec_get_nick (properties[i]),
-+                g_param_spec_get_blurb (properties[i]),
-+                prop->default_value, properties[i]->flags));
-+      } else if (G_IS_PARAM_SPEC_INT (properties[i])) {
-+        GParamSpecInt *prop = G_PARAM_SPEC_INT (properties[i]);
-+        g_object_class_install_property (object_class, property_id,
-+            g_param_spec_int (g_param_spec_get_name (properties[i]),
-+                g_param_spec_get_nick (properties[i]),
-+                g_param_spec_get_blurb (properties[i]),
-+                prop->minimum, prop->maximum, prop->default_value,
-+                properties[i]->flags));
-+      } else if (G_IS_PARAM_SPEC_UINT (properties[i])) {
-+        GParamSpecUInt *prop = G_PARAM_SPEC_UINT (properties[i]);
-+        g_object_class_install_property (object_class, property_id,
-+            g_param_spec_uint (g_param_spec_get_name (properties[i]),
-+                g_param_spec_get_nick (properties[i]),
-+                g_param_spec_get_blurb (properties[i]),
-+                prop->minimum, prop->maximum, prop->default_value,
-+                properties[i]->flags));
-+      } else if (G_IS_PARAM_SPEC_INT64 (properties[i])) {
-+        GParamSpecInt64 *prop = G_PARAM_SPEC_INT64 (properties[i]);
-+        g_object_class_install_property (object_class, property_id,
-+            g_param_spec_int64 (g_param_spec_get_name (properties[i]),
-+                g_param_spec_get_nick (properties[i]),
-+                g_param_spec_get_blurb (properties[i]),
-+                prop->minimum, prop->maximum, prop->default_value,
-+                properties[i]->flags));
-+      } else if (G_IS_PARAM_SPEC_UINT64 (properties[i])) {
-+        GParamSpecUInt64 *prop = G_PARAM_SPEC_UINT64 (properties[i]);
-+        g_object_class_install_property (object_class, property_id,
-+            g_param_spec_uint64 (g_param_spec_get_name (properties[i]),
-+                g_param_spec_get_nick (properties[i]),
-+                g_param_spec_get_blurb (properties[i]),
-+                prop->minimum, prop->maximum, prop->default_value,
-+                properties[i]->flags));
-+      } else if (G_IS_PARAM_SPEC_ENUM (properties[i])) {
-+        GParamSpecEnum *prop = G_PARAM_SPEC_ENUM (properties[i]);
-+        g_object_class_install_property (object_class, property_id,
-+            g_param_spec_enum (g_param_spec_get_name (properties[i]),
-+                g_param_spec_get_nick (properties[i]),
-+                g_param_spec_get_blurb (properties[i]),
-+                properties[i]->value_type, prop->default_value,
-+                properties[i]->flags));
-+      } else if (G_IS_PARAM_SPEC_STRING (properties[i])) {
-+        GParamSpecString *prop = G_PARAM_SPEC_STRING (properties[i]);
-+        g_object_class_install_property (object_class, property_id,
-+            g_param_spec_string (g_param_spec_get_name (properties[i]),
-+                g_param_spec_get_nick (properties[i]),
-+                g_param_spec_get_blurb (properties[i]),
-+                prop->default_value, properties[i]->flags));
-+      } else if (G_IS_PARAM_SPEC_BOXED (properties[i])) {
-+        g_object_class_install_property (object_class, property_id,
-+            g_param_spec_boxed (g_param_spec_get_name (properties[i]),
-+                g_param_spec_get_nick (properties[i]),
-+                g_param_spec_get_blurb (properties[i]),
-+                properties[i]->value_type, properties[i]->flags));
-+      }
-+    }
-+
-+    g_free (properties);
-+    g_once_init_leave (&initialized, 1);
-+  }
-+}
-+
-+static void
-+gst_fake_audio_sink_init (GstFakeAudioSink * self)
-+{
-+  GstElement *child;
-+  GstPadTemplate *template = gst_static_pad_template_get (&sink_factory);
-+
-+  self->volume = 1.0;
-+  self->mute = FALSE;
-+
-+  child = gst_element_factory_make ("fakesink", "sink");
-+
-+  if (child) {
-+    GstPad *sink_pad = gst_element_get_static_pad (child, "sink");
-+    GstPad *ghost_pad;
-+
-+    /* mimic GstAudioSink base class */
-+    g_object_set (child, "qos", TRUE, "sync", TRUE, NULL);
-+
-+    gst_bin_add (GST_BIN_CAST (self), child);
-+
-+    ghost_pad = gst_ghost_pad_new_from_template ("sink", sink_pad, template);
-+    gst_object_unref (template);
-+    gst_element_add_pad (GST_ELEMENT_CAST (self), ghost_pad);
-+    gst_object_unref (sink_pad);
-+
-+    self->child = child;
-+
-+    gst_fake_audio_sink_proxy_properties (self, child);
-+  } else {
-+    g_warning ("Check your GStreamer installation, "
-+        "core element 'fakesink' is missing.");
-+  }
-+}
-+
-+static void
-+gst_fake_audio_sink_get_property (GObject * object, guint property_id,
-+    GValue * value, GParamSpec * pspec)
-+{
-+  GstFakeAudioSink *self = GST_FAKE_AUDIO_SINK (object);
-+
-+  switch (property_id) {
-+    case PROP_VOLUME:
-+      g_value_set_double (value, self->volume);
-+      break;
-+    case PROP_MUTE:
-+      g_value_set_boolean (value, self->mute);
-+      break;
-+    default:
-+      g_object_get_property (G_OBJECT (self->child), pspec->name, value);
-+      break;
-+  }
-+}
-+
-+static void
-+gst_fake_audio_sink_set_property (GObject * object, guint property_id,
-+    const GValue * value, GParamSpec * pspec)
-+{
-+  GstFakeAudioSink *self = GST_FAKE_AUDIO_SINK (object);
-+
-+  switch (property_id) {
-+    case PROP_VOLUME:
-+      self->volume = g_value_get_double (value);
-+      break;
-+    case PROP_MUTE:
-+      self->mute = g_value_get_boolean (value);
-+      break;
-+    default:
-+      g_object_set_property (G_OBJECT (self->child), pspec->name, value);
-+      break;
-+  }
-+}
-+
-+static void
-+gst_fake_audio_sink_class_init (GstFakeAudioSinkClass * klass)
-+{
-+  GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
-+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
-+
-+  object_class->get_property = gst_fake_audio_sink_get_property;
-+  object_class->set_property = gst_fake_audio_sink_set_property;
-+
-+
-+  /**
-+   * GstFakeAudioSink:volume
-+   *
-+   * Control the audio volume
-+   *
-+   * Since: 1.20
-+   */
-+  g_object_class_install_property (object_class, PROP_VOLUME,
-+      g_param_spec_double ("volume", "Volume", "The audio volume, 1.0=100%",
-+          0, 10, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+
-+  /**
-+   * GstFakeAudioSink:mute
-+   *
-+   * Control the mute state
-+   *
-+   * Since: 1.20
-+   */
-+  g_object_class_install_property (object_class, PROP_MUTE,
-+      g_param_spec_boolean ("mute", "Mute",
-+          "Mute the audio channel without changing the volume", FALSE,
-+          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+
-+
-+  gst_element_class_add_static_pad_template (element_class, &sink_factory);
-+  gst_element_class_set_static_metadata (element_class, "Fake Audio Sink",
-+      "Audio/Sink", "Fake audio renderer",
-+      "Philippe Normand <[email protected]>");
-+}
-diff --git a/gst/debugutils/gstfakeaudiosink.h b/gst/debugutils/gstfakeaudiosink.h
-new file mode 100644
-index 000000000..8fd70d911
---- /dev/null
-+++ b/gst/debugutils/gstfakeaudiosink.h
-@@ -0,0 +1,63 @@
-+/*
-+ * GStreamer
-+ * Copyright (C) 2017 Collabora Inc.
-+ * Copyright (C) 2021 Igalia S.L.
-+ *   Author: Philippe Normand <[email protected]>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Library General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Library General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Library General Public
-+ * License along with this library; if not, write to the
-+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-+ * Boston, MA 02110-1301, USA.
-+ */
-+
-+#ifndef _GST_FAKE_AUDIO_SINK_H_
-+#define _GST_FAKE_AUDIO_SINK_H_
-+
-+#include <gst/gst.h>
-+
-+#define GST_TYPE_FAKE_AUDIO_SINK \
-+  (gst_fake_audio_sink_get_type())
-+#define GST_FAKE_AUDIO_SINK(obj) \
-+  (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_FAKE_AUDIO_SINK, GstFakeAudioSink))
-+#define GST_FAKE_AUDIO_SINK_CLASS(klass) \
-+  (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_FAKE_AUDIO_SINK, GstFakeAudioSinkClass))
-+#define GST_FAKE_AUDIO_SINK_GET_CLASS(obj) \
-+  (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_FAKE_AUDIO_SINK, GstFakeAudioSinkClass))
-+#define GST_IS_FAKE_AUDIO_SINK(obj) \
-+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_FAKE_AUDIO_SINK))
-+#define GST_IS_FAKE_AUDIO_SINK_CLASS(klass) \
-+  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_FAKE_AUDIO_SINK))
-+
-+G_BEGIN_DECLS
-+
-+typedef struct _GstFakeAudioSink GstFakeAudioSink;
-+typedef struct _GstFakeAudioSinkClass GstFakeAudioSinkClass;
-+
-+struct _GstFakeAudioSink
-+{
-+    GstBin parent;
-+    GstElement *child;
-+    gdouble volume;
-+    gboolean mute;
-+};
-+
-+struct _GstFakeAudioSinkClass
-+{
-+    GstBinClass parent;
-+};
-+
-+GType gst_fake_audio_sink_get_type (void);
-+
-+G_END_DECLS
-+
-+#endif
-diff --git a/gst/debugutils/meson.build b/gst/debugutils/meson.build
-index c863556fe..d05161195 100644
---- a/gst/debugutils/meson.build
-+++ b/gst/debugutils/meson.build
-@@ -6,6 +6,7 @@ debugutilsbad_sources = [
-   'gstchecksumsink.c',
-   'gstchopmydata.c',
-   'gstcompare.c',
-+  'gstfakeaudiosink.c',
-   'gstfakevideosink.c',
-   'gstwatchdog.c',
-   'gsttestsrcbin.c',
-@@ -16,7 +17,7 @@ gstdebugutilsbad = library('gstdebugutilsbad',
-   debugutilsbad_sources,
-   c_args : gst_plugins_bad_args,
-   include_directories : [configinc],
--  dependencies : [gstbase_dep, gstvideo_dep, gstnet_dep],
-+  dependencies : [gstbase_dep, gstvideo_dep, gstnet_dep, gstaudio_dep],
-   install : true,
-   install_dir : plugins_install_dir,
- )
--- 
-2.30.2
-

Deleted: trunk/Tools/buildstream/patches/gstreamer-0001-devicemonitor-Stop-only-the-already-started-provider.patch (289153 => 289154)


--- trunk/Tools/buildstream/patches/gstreamer-0001-devicemonitor-Stop-only-the-already-started-provider.patch	2022-02-05 08:10:36 UTC (rev 289153)
+++ trunk/Tools/buildstream/patches/gstreamer-0001-devicemonitor-Stop-only-the-already-started-provider.patch	2022-02-05 09:25:12 UTC (rev 289154)
@@ -1,118 +0,0 @@
-From c66d393e5980aa36e6f2d53cacec6887476bc5e4 Mon Sep 17 00:00:00 2001
-From: Philippe Normand <[email protected]>
-Date: Wed, 21 Oct 2020 09:43:43 +0100
-Subject: [PATCH] devicemonitor: Stop only the already started providers
-
-If a device provider fails to start (for instance the pulseaudio provider unable
-to connect to the PulseAudio daemon) then the monitor should not keep track of
-it in its `started` providers list. Otherwise a false positive critical warning
-would be raised.
-
-This patch also switches the started_count type from bool to int, for
-consistency. This is a counter, after all.
-
-API: gst_device_provider_is_started
----
- gst/gstdevicemonitor.c      |  3 ++-
- gst/gstdeviceprovider.c     | 25 ++++++++++++++++++++++++-
- gst/gstdeviceprovider.h     |  3 +++
- tests/check/gst/gstdevice.c |  2 ++
- 4 files changed, 31 insertions(+), 2 deletions(-)
-
-diff --git a/gst/gstdevicemonitor.c b/gst/gstdevicemonitor.c
-index 43752e15d..fae2f61f5 100644
---- a/gst/gstdevicemonitor.c
-+++ b/gst/gstdevicemonitor.c
-@@ -571,7 +571,8 @@ gst_device_monitor_stop (GstDeviceMonitor * monitor)
-     GstDeviceProvider *provider =
-         g_ptr_array_index (monitor->priv->providers, i);
- 
--    started = g_list_prepend (started, gst_object_ref (provider));
-+    if (gst_device_provider_is_started (provider))
-+      started = g_list_prepend (started, gst_object_ref (provider));
-   }
-   GST_OBJECT_UNLOCK (monitor);
- 
-diff --git a/gst/gstdeviceprovider.c b/gst/gstdeviceprovider.c
-index 4d159fe6c..547b7a174 100644
---- a/gst/gstdeviceprovider.c
-+++ b/gst/gstdeviceprovider.c
-@@ -55,7 +55,7 @@ struct _GstDeviceProviderPrivate
- 
-   GMutex start_lock;
- 
--  gboolean started_count;
-+  gint started_count;
- 
-   GList *hidden_providers;
- };
-@@ -165,6 +165,8 @@ gst_device_provider_init (GstDeviceProvider * provider)
- 
-   g_mutex_init (&provider->priv->start_lock);
- 
-+  provider->priv->started_count = 0;
-+
-   provider->priv->bus = gst_bus_new ();
-   gst_bus_set_flushing (provider->priv->bus, TRUE);
- }
-@@ -854,3 +856,24 @@ gst_device_provider_device_changed (GstDeviceProvider * provider,
-   gst_bus_post (provider->priv->bus, message);
-   gst_object_unparent (GST_OBJECT (changed_device));
- }
-+
-+/**
-+ * gst_device_provider_is_started:
-+ * @provider: a #GstDeviceProvider
-+ *
-+ * This function can be used to know if the @provider was successfully started.
-+ *
-+ * Since: 1.20
-+ */
-+gboolean
-+gst_device_provider_is_started (GstDeviceProvider * provider)
-+{
-+  gboolean started = FALSE;
-+
-+  g_return_val_if_fail (GST_IS_DEVICE_PROVIDER (provider), FALSE);
-+
-+  g_mutex_lock (&provider->priv->start_lock);
-+  started = provider->priv->started_count > 0;
-+  g_mutex_unlock (&provider->priv->start_lock);
-+  return started;
-+}
-diff --git a/gst/gstdeviceprovider.h b/gst/gstdeviceprovider.h
-index 56ad6209a..cafe37e1c 100644
---- a/gst/gstdeviceprovider.h
-+++ b/gst/gstdeviceprovider.h
-@@ -139,6 +139,9 @@ GST_API
- const gchar * gst_device_provider_get_metadata       (GstDeviceProvider * provider,
-                                                       const gchar * key);
- 
-+GST_API
-+gboolean    gst_device_provider_is_started     (GstDeviceProvider * provider);
-+
- /* device provider class meta data */
- 
- GST_API
-diff --git a/tests/check/gst/gstdevice.c b/tests/check/gst/gstdevice.c
-index 70e186ac3..8d4723608 100644
---- a/tests/check/gst/gstdevice.c
-+++ b/tests/check/gst/gstdevice.c
-@@ -244,12 +244,14 @@ GST_START_TEST (test_device_provider)
-   g_list_free_full (devs, (GDestroyNotify) gst_object_unref);
- 
-   fail_if (gst_device_provider_can_monitor (dp));
-+  fail_if (gst_device_provider_is_started (dp));
-   fail_unless (gst_device_provider_start (dp));
- 
-   bus = gst_device_provider_get_bus (dp);
-   fail_unless (GST_IS_BUS (bus));
-   gst_object_unref (bus);
- 
-+  fail_unless (gst_device_provider_is_started (dp));
-   gst_device_provider_stop (dp);
- 
-   gst_object_unref (dp);
--- 
-2.28.0
-
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to