summaryrefslogtreecommitdiff
path: root/media-libs
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/Manifest.gzbin68081 -> 68080 bytes
-rw-r--r--media-libs/gstreamer/Manifest3
-rw-r--r--media-libs/gstreamer/files/gstreamer-1.20.5-tests-race.patch293
-rw-r--r--media-libs/gstreamer/gstreamer-1.20.5.ebuild1
4 files changed, 296 insertions, 1 deletions
diff --git a/media-libs/Manifest.gz b/media-libs/Manifest.gz
index bdd4d82cf526..a49fa94fa5e5 100644
--- a/media-libs/Manifest.gz
+++ b/media-libs/Manifest.gz
Binary files differ
diff --git a/media-libs/gstreamer/Manifest b/media-libs/gstreamer/Manifest
index 83bda998b1b7..abe73ad80adb 100644
--- a/media-libs/gstreamer/Manifest
+++ b/media-libs/gstreamer/Manifest
@@ -1,7 +1,8 @@
+AUX gstreamer-1.20.5-tests-race.patch 10870 BLAKE2B 42f92d42259690af57f9ef5781ee6503265934044b24d573cf5da6b6fefca2a37ecbf2f4d8c08e858e38c9e6f5c770473452a137f249bac5203cdc1f8f5ead2c SHA512 653163d60eae29a943e3b939073d045512b391f4709457388590a4917bd7288d0b964a4b93cbf840cb8fbd2903690b590546b11316f1d2ab398596f421998bba
DIST gstreamer-1.20.3.tar.xz 2681088 BLAKE2B 423669ff2224cc5d9b979a1353eb1dbcaea5dacca374e83630abf23574f813cbecf5144cdd3209f638aeb50e6764004c3d8020db7f11b21726a9f4b56b513d10 SHA512 e93f9fbf2d7a839dcbe2030ed16dd53eb250741db7c2f1cea396c23e4fabf9a0caff6be4babf7c10aec4b56dc8319a970b1b0bfa6eea2e36aed3e6e1265d9278
DIST gstreamer-1.20.4.tar.xz 2686324 BLAKE2B b54da03f93f0062df0ada5534f3eff8a37e4b41f404b4bdd466bb6371e3db61a40741d723392bcc7cf7f46cded26c5d8ca625748670ac98daec136b0fb76a810 SHA512 33ba08e67b21a3e2e5dc5caeeae66e561b9d64ae863331a209e711f60a652ba38635e8bb963336e73b9afd5cf38e17139fbf933ca621d040f0d6e22a18ba7ad8
DIST gstreamer-1.20.5.tar.xz 2690968 BLAKE2B cca6385b1fcc10928ad19e587ebb6ce202097f4a33d79555c969d3906dacc7e5074fc8f42a0566e40aa333502764ad0b491d610c05ef1921ad370bf5f5883afd SHA512 90c5f5865877170bb0dc570e61c22c27dea5adae2d9c304227da266b5b5b2eccd98ed21943f14bb5dfe169f4e020b8ac457a5d540363dfe2547180f34a3c7b29
EBUILD gstreamer-1.20.3.ebuild 1977 BLAKE2B f2740403870702179a58d8eebf533ca0503fed5575ca322831525b67c9f29d1b426dbeeb634395d59fd9a249b69945dfa7e36db2e0cf61eb2c79e981cdf54ee7 SHA512 e2d251109f86d79dd498b4b13a63cbf24b43aab9ff45710beac88817e9e059cccc50379ed0a3f3687c2d74f53602c2f8837f3dabaca1dee217067fe24ff44736
EBUILD gstreamer-1.20.4.ebuild 1977 BLAKE2B f2740403870702179a58d8eebf533ca0503fed5575ca322831525b67c9f29d1b426dbeeb634395d59fd9a249b69945dfa7e36db2e0cf61eb2c79e981cdf54ee7 SHA512 e2d251109f86d79dd498b4b13a63cbf24b43aab9ff45710beac88817e9e059cccc50379ed0a3f3687c2d74f53602c2f8837f3dabaca1dee217067fe24ff44736
-EBUILD gstreamer-1.20.5.ebuild 1983 BLAKE2B 393553e414c56f30b3ee587bec638aef1c75e35cabdd66bdfb360d2a72871b702461a00850cfd4bf1529df90fb458e4a337aff714d8b48f06caed6d8c169eb72 SHA512 e600f3559077615db6b9c07910ae6fd5f987b868b5d7f206e76f3653ee71bd91adaccdf501593c7ed2692ee1a715050cb9795721fac4b7f9a951d6b01923412b
+EBUILD gstreamer-1.20.5.ebuild 2020 BLAKE2B 6083f67bbbc68c4e2293aedf5b2e66e41287d66ba6113f6df2734fbaf1fceb134fe91dd6b4adc4c8f52cfeaf52544e62c444e83138261b31bbb6e2a8534f88c2 SHA512 7a41ec403447f2e4037305026bd2b7cd0b0a35eddea85b5fc70125605f8e771d78dbc0798d44547b250c3973458816546e803e5dbe51621ecbe68129ecb1f1e6
MISC metadata.xml 587 BLAKE2B 6fbb8876aa30451f9ed4851b8da1698371f1d546fa13674ef87acae0a73f85770e17a5cec2232fabae28fc7cd28e76fdc177b9d016ea35f20094b40aef6a25c2 SHA512 d28f3793ddc86087854b04a2330e158f521761a45192ee32ac947f9affb400443205a3c0911864474738e2494626ba4fea66dac6549934fd5cdb32af6fe2ad4c
diff --git a/media-libs/gstreamer/files/gstreamer-1.20.5-tests-race.patch b/media-libs/gstreamer/files/gstreamer-1.20.5-tests-race.patch
new file mode 100644
index 000000000000..05b183ec3054
--- /dev/null
+++ b/media-libs/gstreamer/files/gstreamer-1.20.5-tests-race.patch
@@ -0,0 +1,293 @@
+https://bugs.gentoo.org/888986
+https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/ccd582c3321312fe96b28ce90fe6f2fd7adfa058
+
+From ccd582c3321312fe96b28ce90fe6f2fd7adfa058 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
+Date: Tue, 21 Jun 2022 11:51:35 +0300
+Subject: [PATCH] bin: Fix race conditions in tests
+
+The latency messages are non-deterministic and can arrive before/after
+async-done or during state-changes as they are posted by e.g. sinks from
+their streaming thread but bins are finishing asynchronous state changes
+from a secondary helper thread.
+
+To solve this, expect latency messages at any time and assert that we
+receive one at some point during the test.
+
+Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3647>
+--- a/tests/check/gst/gstbin.c
++++ b/tests/check/gst/gstbin.c
+@@ -27,50 +27,95 @@
+ #include <gst/base/gstbasesrc.h>
+
+ static void
+-pop_async_done (GstBus * bus)
++pop_async_done (GstBus * bus, gboolean * had_latency)
+ {
+ GstMessage *message;
++ GstMessageType types = GST_MESSAGE_ASYNC_DONE;
++
++ if (!*had_latency)
++ types |= GST_MESSAGE_LATENCY;
+
+ GST_DEBUG ("popping async-done message");
+- message = gst_bus_poll (bus, GST_MESSAGE_ASYNC_DONE, -1);
+
+- fail_unless (message && GST_MESSAGE_TYPE (message)
+- == GST_MESSAGE_ASYNC_DONE, "did not get GST_MESSAGE_ASYNC_DONE");
++ do {
++ message = gst_bus_poll (bus, types, -1);
+
+- gst_message_unref (message);
+- GST_DEBUG ("popped message");
++ fail_unless (message);
++ GST_DEBUG ("popped message %s",
++ gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
++
++ if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_LATENCY) {
++ fail_unless (*had_latency == FALSE);
++ *had_latency = TRUE;
++ gst_clear_message (&message);
++ types &= ~GST_MESSAGE_LATENCY;
++ continue;
++ }
++
++ fail_unless (GST_MESSAGE_TYPE (message)
++ == GST_MESSAGE_ASYNC_DONE, "did not get GST_MESSAGE_ASYNC_DONE");
++
++ gst_clear_message (&message);
++ break;
++ } while (TRUE);
+ }
+
+ static void
+-pop_latency (GstBus * bus)
++pop_latency (GstBus * bus, gboolean * had_latency)
+ {
+ GstMessage *message;
+
+- GST_DEBUG ("popping async-done message");
++ if (*had_latency)
++ return;
++
++ GST_DEBUG ("popping latency message");
+ message = gst_bus_poll (bus, GST_MESSAGE_LATENCY, -1);
+
+- fail_unless (message && GST_MESSAGE_TYPE (message)
++ fail_unless (message);
++ fail_unless (GST_MESSAGE_TYPE (message)
+ == GST_MESSAGE_LATENCY, "did not get GST_MESSAGE_LATENCY");
+
+- gst_message_unref (message);
+- GST_DEBUG ("popped message");
++ GST_DEBUG ("popped message %s",
++ gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
++ gst_clear_message (&message);
++
++ *had_latency = TRUE;
+ }
+
+ static void
+-pop_state_changed (GstBus * bus, int count)
++pop_state_changed (GstBus * bus, int count, gboolean * had_latency)
+ {
+ GstMessage *message;
+-
++ GstMessageType types = GST_MESSAGE_STATE_CHANGED;
+ int i;
+
++ if (!*had_latency)
++ types |= GST_MESSAGE_LATENCY;
++
+ GST_DEBUG ("popping %d messages", count);
+ for (i = 0; i < count; ++i) {
+- message = gst_bus_poll (bus, GST_MESSAGE_STATE_CHANGED, -1);
+-
+- fail_unless (message && GST_MESSAGE_TYPE (message)
+- == GST_MESSAGE_STATE_CHANGED, "did not get GST_MESSAGE_STATE_CHANGED");
+-
+- gst_message_unref (message);
++ do {
++ message = gst_bus_poll (bus, types, -1);
++
++ fail_unless (message);
++ GST_DEBUG ("popped message %s",
++ gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
++
++ if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_LATENCY) {
++ fail_unless (*had_latency == FALSE);
++ *had_latency = TRUE;
++ gst_clear_message (&message);
++ types &= ~GST_MESSAGE_LATENCY;
++ continue;
++ }
++
++ fail_unless (GST_MESSAGE_TYPE (message)
++ == GST_MESSAGE_STATE_CHANGED,
++ "did not get GST_MESSAGE_STATE_CHANGED");
++
++ gst_message_unref (message);
++ break;
++ } while (TRUE);
+ }
+ GST_DEBUG ("popped %d messages", count);
+ }
+@@ -538,6 +583,7 @@ GST_START_TEST (test_message_state_changed_children)
+ GstBus *bus;
+ GstStateChangeReturn ret;
+ GstState current, pending;
++ gboolean had_latency = FALSE;
+
+ pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
+ fail_unless (pipeline != NULL, "Could not create pipeline");
+@@ -576,7 +622,7 @@ GST_START_TEST (test_message_state_changed_children)
+ ASSERT_OBJECT_REFCOUNT (sink, "sink", 2);
+ ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 2);
+
+- pop_state_changed (bus, 3);
++ pop_state_changed (bus, 3, &had_latency);
+ fail_if (gst_bus_have_pending (bus), "unexpected pending messages");
+
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
+@@ -619,9 +665,9 @@ GST_START_TEST (test_message_state_changed_children)
+ * its state_change message */
+ ASSERT_OBJECT_REFCOUNT_BETWEEN (pipeline, "pipeline", 3, 4);
+
+- pop_state_changed (bus, 3);
+- pop_async_done (bus);
+- pop_latency (bus);
++ pop_state_changed (bus, 3, &had_latency);
++ pop_async_done (bus, &had_latency);
++ pop_latency (bus, &had_latency);
+ fail_if ((gst_bus_pop (bus)) != NULL);
+
+ ASSERT_OBJECT_REFCOUNT_BETWEEN (bus, "bus", 2, 3);
+@@ -648,7 +694,7 @@ GST_START_TEST (test_message_state_changed_children)
+ ASSERT_OBJECT_REFCOUNT_BETWEEN (sink, "sink", 2, 4);
+ ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 3);
+
+- pop_state_changed (bus, 3);
++ pop_state_changed (bus, 3, &had_latency);
+ fail_if ((gst_bus_pop (bus)) != NULL);
+
+ ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
+@@ -669,7 +715,7 @@ GST_START_TEST (test_message_state_changed_children)
+ ASSERT_OBJECT_REFCOUNT_BETWEEN (sink, "sink", 3, 4);
+ ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 3);
+
+- pop_state_changed (bus, 6);
++ pop_state_changed (bus, 6, &had_latency);
+ fail_if ((gst_bus_pop (bus)) != NULL);
+
+ ASSERT_OBJECT_REFCOUNT (src, "src", 1);
+@@ -696,6 +742,7 @@ GST_START_TEST (test_watch_for_state_change)
+ GstElement *src, *sink, *bin;
+ GstBus *bus;
+ GstStateChangeReturn ret;
++ gboolean had_latency = FALSE;
+
+ bin = gst_element_factory_make ("bin", NULL);
+ fail_unless (bin != NULL, "Could not create bin");
+@@ -722,9 +769,9 @@ GST_START_TEST (test_watch_for_state_change)
+ GST_CLOCK_TIME_NONE);
+ fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+
+- pop_state_changed (bus, 6);
+- pop_async_done (bus);
+- pop_latency (bus);
++ pop_state_changed (bus, 6, &had_latency);
++ pop_async_done (bus, &had_latency);
++ pop_latency (bus, &had_latency);
+
+ fail_unless (gst_bus_have_pending (bus) == FALSE,
+ "Unexpected messages on bus");
+@@ -732,16 +779,17 @@ GST_START_TEST (test_watch_for_state_change)
+ ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
+ fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+
+- pop_state_changed (bus, 3);
++ pop_state_changed (bus, 3, &had_latency);
+
++ had_latency = FALSE;
+ /* this one might return either SUCCESS or ASYNC, likely SUCCESS */
+ ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
+ gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_CLOCK_TIME_NONE);
+
+- pop_state_changed (bus, 3);
++ pop_state_changed (bus, 3, &had_latency);
+ if (ret == GST_STATE_CHANGE_ASYNC) {
+- pop_async_done (bus);
+- pop_latency (bus);
++ pop_async_done (bus, &had_latency);
++ pop_latency (bus, &had_latency);
+ }
+
+ fail_unless (gst_bus_have_pending (bus) == FALSE,
+@@ -898,6 +946,7 @@ GST_START_TEST (test_children_state_change_order_flagged_sink)
+ GstStateChangeReturn ret;
+ GstState current, pending;
+ GstBus *bus;
++ gboolean had_latency = FALSE;
+
+ pipeline = gst_pipeline_new (NULL);
+ fail_unless (pipeline != NULL, "Could not create pipeline");
+@@ -951,10 +1000,11 @@ GST_START_TEST (test_children_state_change_order_flagged_sink)
+ ASSERT_STATE_CHANGE_MSG (bus, sink, GST_STATE_READY, GST_STATE_PAUSED, 107);
+ #else
+
+- pop_state_changed (bus, 2); /* pop remaining ready => paused messages off the bus */
++ pop_state_changed (bus, 2, &had_latency); /* pop remaining ready => paused messages off the bus */
+ ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_READY, GST_STATE_PAUSED,
+ 108);
+- pop_async_done (bus);
++ pop_async_done (bus, &had_latency);
++ pop_latency (bus, &had_latency);
+ #endif
+ /* PAUSED => PLAYING */
+ GST_DEBUG ("popping PAUSED -> PLAYING messages");
+@@ -972,8 +1022,8 @@ GST_START_TEST (test_children_state_change_order_flagged_sink)
+ fail_if (ret != GST_STATE_CHANGE_SUCCESS, "State change to READY failed");
+
+ /* TODO: do we need to check downwards state change order as well? */
+- pop_state_changed (bus, 4); /* pop playing => paused messages off the bus */
+- pop_state_changed (bus, 4); /* pop paused => ready messages off the bus */
++ pop_state_changed (bus, 4, &had_latency); /* pop playing => paused messages off the bus */
++ pop_state_changed (bus, 4, &had_latency); /* pop paused => ready messages off the bus */
+
+ while (GST_OBJECT_REFCOUNT_VALUE (pipeline) > 1)
+ THREAD_SWITCH ();
+@@ -1002,6 +1052,7 @@ GST_START_TEST (test_children_state_change_order_semi_sink)
+ GstStateChangeReturn ret;
+ GstState current, pending;
+ GstBus *bus;
++ gboolean had_latency = FALSE;
+
+ /* (2) Now again, but check other code path where we don't have
+ * a proper sink correctly flagged as such, but a 'semi-sink' */
+@@ -1056,10 +1107,11 @@ GST_START_TEST (test_children_state_change_order_semi_sink)
+ ASSERT_STATE_CHANGE_MSG (bus, src, GST_STATE_READY, GST_STATE_PAUSED, 206);
+ ASSERT_STATE_CHANGE_MSG (bus, sink, GST_STATE_READY, GST_STATE_PAUSED, 207);
+ #else
+- pop_state_changed (bus, 2); /* pop remaining ready => paused messages off the bus */
++ pop_state_changed (bus, 2, &had_latency); /* pop remaining ready => paused messages off the bus */
+ ASSERT_STATE_CHANGE_MSG (bus, pipeline, GST_STATE_READY, GST_STATE_PAUSED,
+ 208);
+- pop_async_done (bus);
++ pop_async_done (bus, &had_latency);
++ pop_latency (bus, &had_latency);
+
+ /* PAUSED => PLAYING */
+ GST_DEBUG ("popping PAUSED -> PLAYING messages");
+@@ -1076,8 +1128,8 @@ GST_START_TEST (test_children_state_change_order_semi_sink)
+ fail_if (ret != GST_STATE_CHANGE_SUCCESS, "State change to READY failed");
+
+ /* TODO: do we need to check downwards state change order as well? */
+- pop_state_changed (bus, 4); /* pop playing => paused messages off the bus */
+- pop_state_changed (bus, 4); /* pop paused => ready messages off the bus */
++ pop_state_changed (bus, 4, &had_latency); /* pop playing => paused messages off the bus */
++ pop_state_changed (bus, 4, &had_latency); /* pop paused => ready messages off the bus */
+
+ GST_DEBUG ("waiting for pipeline to reach refcount 1");
+ while (GST_OBJECT_REFCOUNT_VALUE (pipeline) > 1)
+--
+GitLab
diff --git a/media-libs/gstreamer/gstreamer-1.20.5.ebuild b/media-libs/gstreamer/gstreamer-1.20.5.ebuild
index 311e94692cbe..8226608a2c54 100644
--- a/media-libs/gstreamer/gstreamer-1.20.5.ebuild
+++ b/media-libs/gstreamer/gstreamer-1.20.5.ebuild
@@ -34,6 +34,7 @@ BDEPEND="
DOCS=( AUTHORS ChangeLog NEWS MAINTAINERS README.md RELEASE )
PATCHES=(
+ "${FILESDIR}"/${P}-tests-race.patch
)
multilib_src_configure() {