aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/gstreamer/gstreamer1.0
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/gstreamer/gstreamer1.0')
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch69
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch (renamed from recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch)16
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch110
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch (renamed from recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch)59
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch32
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch (renamed from recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch)28
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch74
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch107
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch58
9 files changed, 231 insertions, 322 deletions
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
deleted file mode 100644
index 23ebd5c6..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From fd8f49dba8c09d47425da80f5faab3bfa4a7c962 Mon Sep 17 00:00:00 2001
-From: Jose Quaresma <quaresma.jose@gmail.com>
-Date: Sat, 10 Oct 2020 19:09:03 +0000
-Subject: [PATCH 1/3] gstpluginloader: when env var is set do not fall through
- to system plugin scanner
-
-If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.
-
-Falling through to the one installed on the system is problamatic in cross-compilation
-environemnts, regardless of whether one pointed to by the env var succeeded or failed.
-
-taken from:
-http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch?id=0db7ba34ca41b107042306d13a6f0162885c123b
-
-Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669>
-
-Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/9f958058697e6fbf5bde325228034572331d1a3a]
-
-Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
----
- gst/gstpluginloader.c | 15 +++++++--------
- 1 file changed, 7 insertions(+), 8 deletions(-)
-
-diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c
-index d1e404d98..c626bf263 100644
---- a/gst/gstpluginloader.c
-+++ b/gst/gstpluginloader.c
-@@ -464,20 +464,19 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
- if (loader->child_running)
- return TRUE;
-
-- /* Find the gst-plugin-scanner: first try the env-var if it is set,
-- * otherwise use the installed version */
-+ /* Find the gst-plugin-scanner */
- env = g_getenv ("GST_PLUGIN_SCANNER_1_0");
- if (env == NULL)
- env = g_getenv ("GST_PLUGIN_SCANNER");
-
- if (env != NULL && *env != '\0') {
-+ /* use the env-var if it is set */
- GST_LOG ("Trying GST_PLUGIN_SCANNER env var: %s", env);
- helper_bin = g_strdup (env);
- res = gst_plugin_loader_try_helper (loader, helper_bin);
- g_free (helper_bin);
-- }
--
-- if (!res) {
-+ } else {
-+ /* use the installed version */
- GST_LOG ("Trying installed plugin scanner");
-
- #ifdef G_OS_WIN32
-@@ -497,10 +496,10 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
- #endif
- res = gst_plugin_loader_try_helper (loader, helper_bin);
- g_free (helper_bin);
-+ }
-
-- if (!res) {
-- GST_INFO ("No gst-plugin-scanner available, or not working");
-- }
-+ if (!res) {
-+ GST_INFO ("No gst-plugin-scanner available, or not working");
- }
-
- return loader->child_running;
---
-2.29.2
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
index 6f571a12..1b9278db 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
@@ -1,20 +1,21 @@
-From 122e5ac3dd16a461b6ae595605490c8f5d1c3a9d Mon Sep 17 00:00:00 2001
+From 559e1dd850b2b9eb3a415aa43e932e5e48f605cd Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sun, 11 Apr 2021 19:48:13 +0100
-Subject: [PATCH 1/4] tests: respect the idententaion used in meson
+Subject: [PATCH] tests: respect the idententaion used in meson
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+
---
tests/check/meson.build | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/check/meson.build b/tests/check/meson.build
-index a617cf159..b2636714b 100644
+index 9787b0a..16caac7 100644
--- a/tests/check/meson.build
+++ b/tests/check/meson.build
-@@ -146,11 +146,11 @@ foreach t : core_tests
+@@ -145,11 +145,11 @@ foreach t : core_tests
if not skip_test
exe = executable(test_name, fname,
@@ -22,15 +23,12 @@ index a617cf159..b2636714b 100644
- cpp_args : gst_c_args + test_defines,
- include_directories : [configinc],
- link_with : link_with_libs,
-- dependencies : test_deps + glib_deps + gst_deps,
+- dependencies : gst_deps + test_deps,
+ c_args : gst_c_args + test_defines,
+ cpp_args : gst_c_args + test_defines,
+ include_directories : [configinc],
+ link_with : link_with_libs,
-+ dependencies : test_deps + glib_deps + gst_deps,
++ dependencies : gst_deps + test_deps,
)
env = environment()
---
-2.31.1
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch
deleted file mode 100644
index 5805e8b6..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From d7f05d09c55d35bbe4e0f856759519ef183d9a56 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
-Date: Fri, 14 Aug 2020 16:38:26 +0100
-Subject: [PATCH] Remove unused valgrind detection
-
-Having this just to log a debug message in case we're
-running inside valgrind doesn't seem very useful, and
-the code that used to use this no longer exists it seems.
-
-Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595>
-
-Upstream-Status: Backport [a2cbf75523cdf8a4df1baa7007d86ef455972245]
-
-Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
-
----
- gst/gst_private.h | 2 --
- gst/gstinfo.c | 39 ---------------------------------------
- meson.build | 1 -
- 3 files changed, 42 deletions(-)
-
-diff --git a/gst/gst_private.h b/gst/gst_private.h
-index eefd044d9..8252ede51 100644
---- a/gst/gst_private.h
-+++ b/gst/gst_private.h
-@@ -116,8 +116,6 @@ G_GNUC_INTERNAL gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin
-
- G_GNUC_INTERNAL gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin);
-
--G_GNUC_INTERNAL gboolean _priv_gst_in_valgrind (void);
--
- /* init functions called from gst_init(). */
- G_GNUC_INTERNAL void _priv_gst_quarks_initialize (void);
- G_GNUC_INTERNAL void _priv_gst_mini_object_initialize (void);
-diff --git a/gst/gstinfo.c b/gst/gstinfo.c
-index eea1a219d..d3035d6db 100644
---- a/gst/gstinfo.c
-+++ b/gst/gstinfo.c
-@@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT;
- static gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT;
- static gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON;
-
--/* FIXME: export this? */
--gboolean
--_priv_gst_in_valgrind (void)
--{
-- static enum
-- {
-- GST_VG_UNCHECKED,
-- GST_VG_NO_VALGRIND,
-- GST_VG_INSIDE
-- }
-- in_valgrind = GST_VG_UNCHECKED;
--
-- if (in_valgrind == GST_VG_UNCHECKED) {
--#ifdef HAVE_VALGRIND_VALGRIND_H
-- if (RUNNING_ON_VALGRIND) {
-- GST_CAT_INFO (GST_CAT_GST_INIT, "we're running inside valgrind");
-- in_valgrind = GST_VG_INSIDE;
-- } else {
-- GST_CAT_LOG (GST_CAT_GST_INIT, "not doing extra valgrind stuff");
-- in_valgrind = GST_VG_NO_VALGRIND;
-- }
--#else
-- in_valgrind = GST_VG_NO_VALGRIND;
--#endif
-- g_assert (in_valgrind == GST_VG_NO_VALGRIND ||
-- in_valgrind == GST_VG_INSIDE);
-- }
-- return (in_valgrind == GST_VG_INSIDE);
--}
--
- static gchar *
- _replace_pattern_in_gst_debug_file_name (gchar * name, const char *token,
- guint val)
-@@ -463,9 +433,6 @@ _priv_gst_debug_init (void)
- _priv_GST_CAT_PROTECTION =
- _gst_debug_category_new ("GST_PROTECTION", 0, "protection");
-
-- /* print out the valgrind message if we're in valgrind */
-- _priv_gst_in_valgrind ();
--
- env = g_getenv ("GST_DEBUG_OPTIONS");
- if (env != NULL) {
- if (strstr (env, "full_tags") || strstr (env, "full-tags"))
-@@ -2505,12 +2472,6 @@ gst_debug_construct_win_color (guint colorinfo)
- return 0;
- }
-
--gboolean
--_priv_gst_in_valgrind (void)
--{
-- return FALSE;
--}
--
- void
- _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file,
- const gchar * func, gint line, GObject * obj, const gchar * msg,
-diff --git a/meson.build b/meson.build
-index 82a17282b..42ae61790 100644
---- a/meson.build
-+++ b/meson.build
-@@ -200,7 +200,6 @@ check_headers = [
- 'sys/wait.h',
- 'ucontext.h',
- 'unistd.h',
-- 'valgrind/valgrind.h',
- 'sys/resource.h',
- 'sys/uio.h',
- ]
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
index b77fb579..568e38cb 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
@@ -1,7 +1,7 @@
-From c9e93c7a3e4d2773abef4f5e1464af24f36700b3 Mon Sep 17 00:00:00 2001
+From 08b1aaff972a7f6349373fc1ad4cc23081adb52c Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sun, 11 Apr 2021 19:48:13 +0100
-Subject: [PATCH 2/4] tests: add support for install the tests
+Subject: [PATCH] tests: add support for install the tests
This will provide to run the tests using the gnome-desktop-testing [1]
@@ -10,53 +10,44 @@ This will provide to run the tests using the gnome-desktop-testing [1]
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+
---
- meson.build | 5 +++++
- meson_options.txt | 1 +
- template.test.in | 3 +++
- tests/check/meson.build | 22 +++++++++++++++++++++-
- 4 files changed, 30 insertions(+), 1 deletion(-)
- create mode 100644 template.test.in
+ meson.build | 4 ++++
+ meson_options.txt | 1 +
+ tests/check/meson.build | 22 +++++++++++++++++++++-
+ tests/check/template.test.in | 3 +++
+ 4 files changed, 29 insertions(+), 1 deletion(-)
+ create mode 100644 tests/check/template.test.in
diff --git a/meson.build b/meson.build
-index c4e8774f5..1abf4eb26 100644
+index f9f591d..3906fb3 100644
--- a/meson.build
+++ b/meson.build
-@@ -562,6 +562,11 @@ if bashcomp_dep.found()
+@@ -606,6 +606,10 @@ if bashcomp_dep.found()
endif
endif
++installed_tests_enabled = get_option('installed_tests')
+installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
+installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
-+installed_tests_enabled = get_option('installed-tests')
-+installed_tests_template = files('template.test.in')
+
plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
pkgconfig = import('pkgconfig')
diff --git a/meson_options.txt b/meson_options.txt
-index c8cee3762..b5da40eaa 100644
+index 7363bdb..a34ba37 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso
option('memory-alignment', type: 'combo',
choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'],
value: 'malloc')
-+option('installed-tests', type : 'boolean', value : false, description : 'Enable installed tests')
++option('installed_tests', type : 'boolean', value : false, description : 'Enable installed tests')
# Feature options
option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
-diff --git a/template.test.in b/template.test.in
-new file mode 100644
-index 000000000..f701627f8
---- /dev/null
-+++ b/template.test.in
-@@ -0,0 +1,3 @@
-+[Test]
-+Type=session
-+Exec=@installed_tests_dir@/@program@
diff --git a/tests/check/meson.build b/tests/check/meson.build
-index b2636714b..a697a7b06 100644
+index 16caac7..f2d400f 100644
--- a/tests/check/meson.build
+++ b/tests/check/meson.build
@@ -124,10 +124,16 @@ test_defines = [
@@ -77,16 +68,16 @@ index b2636714b..a697a7b06 100644
# sanity checking
if get_option('check').disabled()
if get_option('tests').enabled()
-@@ -151,6 +157,8 @@ foreach t : core_tests
+@@ -150,6 +156,8 @@ foreach t : core_tests
include_directories : [configinc],
link_with : link_with_libs,
- dependencies : test_deps + glib_deps + gst_deps,
+ dependencies : gst_deps + test_deps,
+ install_dir: installed_tests_execdir,
+ install: installed_tests_enabled,
)
env = environment()
-@@ -162,6 +170,18 @@ foreach t : core_tests
+@@ -161,6 +169,18 @@ foreach t : core_tests
env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
@@ -95,7 +86,7 @@ index b2636714b..a697a7b06 100644
+ test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir))
+ test_conf.set('program', test_name)
+ configure_file(
-+ input: installed_tests_template,
++ input: 'template.test.in',
+ output: test_name + '.test',
+ install_dir: installed_tests_metadir,
+ configuration: test_conf
@@ -105,6 +96,12 @@ index b2636714b..a697a7b06 100644
test(test_name, exe, env: env, timeout : 3 * 60)
endif
endforeach
---
-2.31.1
-
+diff --git a/tests/check/template.test.in b/tests/check/template.test.in
+new file mode 100644
+index 0000000..f701627
+--- /dev/null
++++ b/tests/check/template.test.in
+@@ -0,0 +1,3 @@
++[Test]
++Type=session
++Exec=@installed_tests_dir@/@program@
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch
deleted file mode 100644
index e0e64e2c..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1db36347d05d88835519368442e9aa89c64091ad Mon Sep 17 00:00:00 2001
-From: Seungha Yang <seungha@centricular.com>
-Date: Tue, 15 Sep 2020 00:54:58 +0900
-Subject: [PATCH] tests: seek: Don't use too strict timeout for validation
-
-Expected segment-done message might not be seen within expected
-time if system is not powerful enough.
-
-Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/625>
-
-Upstream-Status: Backport [https://cgit.freedesktop.org/gstreamer/gstreamer/commit?id=f44312ae5d831438fcf8041162079c65321c588c]
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- tests/check/pipelines/seek.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/check/pipelines/seek.c b/tests/check/pipelines/seek.c
-index 28bb8846d..5f7447bc5 100644
---- a/tests/check/pipelines/seek.c
-+++ b/tests/check/pipelines/seek.c
-@@ -521,7 +521,7 @@ GST_START_TEST (test_loopback_2)
-
- GST_INFO ("wait for segment done message");
-
-- msg = gst_bus_timed_pop_filtered (bus, (GstClockTime) 2 * GST_SECOND,
-+ msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
- GST_MESSAGE_SEGMENT_DONE | GST_MESSAGE_ERROR);
- fail_unless (msg, "no message within the timed window");
- fail_unless_equals_string (GST_MESSAGE_TYPE_NAME (msg), "segment-done");
---
-2.29.2
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
index 46813cec..10a6dcc6 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
@@ -1,4 +1,4 @@
-From e82dedec1803922656e92285fc1bb75b2cdc0aad Mon Sep 17 00:00:00 2001
+From fe830f0f75f3b4b41e3dbef8d4cf6ee4103c9e06 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sat, 24 Apr 2021 10:34:47 +0100
Subject: [PATCH 3/4] tests: use a dictionaries for environment
@@ -10,29 +10,31 @@ Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
- tests/check/meson.build | 19 +++++++++++--------
- 1 file changed, 11 insertions(+), 8 deletions(-)
+ subprojects/gstreamer/tests/check/meson.build | 21 ++++++++++++-------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
-diff --git a/tests/check/meson.build b/tests/check/meson.build
-index a697a7b06..f64524904 100644
---- a/tests/check/meson.build
-+++ b/tests/check/meson.build
-@@ -161,14 +161,17 @@ foreach t : core_tests
+diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
+index 00a138a568..48ec2532f8 100644
+--- a/subprojects/gstreamer/tests/check/meson.build
++++ b/subprojects/gstreamer/tests/check/meson.build
+@@ -161,14 +161,19 @@ foreach t : core_tests
install: installed_tests_enabled,
)
- env = environment()
-- env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
+- env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root())
- env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
- env.set('GST_STATE_IGNORE_ELEMENTS', '')
- env.set('CK_DEFAULT_TIMEOUT', '20')
- env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
- env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
-+ # environment() can't be passed to configure_file and it is needed for installed_tests
-+ # use a dictionary as this is simplest solution to install the environment
++ # meson environment object can't be passed to configure_file and
++ # installed tests uses configure_file to install the environment.
++ # use a dictionary as this is the simplest solution
++ # to install the environment.
+ env = {
-+ 'GST_PLUGIN_PATH_1_0': meson.build_root(),
++ 'GST_PLUGIN_PATH_1_0': meson.project_build_root(),
+ 'GST_PLUGIN_SYSTEM_PATH_1_0': '',
+ 'GST_STATE_IGNORE_ELEMENTS': '',
+ 'CK_DEFAULT_TIMEOUT': '20',
@@ -44,5 +46,5 @@ index a697a7b06..f64524904 100644
if installed_tests_enabled
test_conf = configuration_data()
--
-2.31.1
+2.33.1
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
new file mode 100644
index 00000000..efa004f8
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
@@ -0,0 +1,74 @@
+From 4dcbabebca2ad6f1fdd59ee35a858082e87db7b6 Mon Sep 17 00:00:00 2001
+From: Jose Quaresma <quaresma.jose@gmail.com>
+Date: Sun, 2 May 2021 01:58:01 +0100
+Subject: [PATCH 4/4] tests: add helper script to run the installed_tests
+
+- this is a bash script that will run the installed_tests
+with some of the environment variables used in the meson
+testing framework.
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
+
+Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
+---
+ subprojects/gstreamer/tests/check/meson.build | 17 +++++++++++++++++
+ .../gstreamer/tests/check/template.sh.in | 9 +++++++++
+ .../gstreamer/tests/check/template.test.in | 2 +-
+ 3 files changed, 27 insertions(+), 1 deletion(-)
+ create mode 100755 subprojects/gstreamer/tests/check/template.sh.in
+
+diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
+index 48ec2532f8..7dc4990d4e 100644
+--- a/subprojects/gstreamer/tests/check/meson.build
++++ b/subprojects/gstreamer/tests/check/meson.build
+@@ -185,6 +185,23 @@ foreach t : core_tests
+ install_dir: installed_tests_metadir,
+ configuration: test_conf
+ )
++
++ # All the tests will be deployed on the target machine and
++ # we use the home folder ~ for the registry which will then expand at runtime.
++ # Using the /tmp/gstreamer-1.0/@0@.registry can be problematic as it mostly
++ # is mounted using tmpfs and if the machine crash from some reason we can lost the registry
++ # that is useful for debug propose of the tests itself.
++ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)}
++
++ # Set the full path for the test it self.
++ env += {'TEST': '@0@/@1@'.format(join_paths(prefix, installed_tests_execdir), test_name)}
++
++ configure_file(
++ input : 'template.sh.in',
++ output: test_name + '.sh',
++ install_dir: installed_tests_execdir,
++ configuration : env,
++ )
+ endif
+
+ test(test_name, exe, env: env, timeout : 3 * 60)
+diff --git a/subprojects/gstreamer/tests/check/template.sh.in b/subprojects/gstreamer/tests/check/template.sh.in
+new file mode 100755
+index 0000000000..cf7d31b0ea
+--- /dev/null
++++ b/subprojects/gstreamer/tests/check/template.sh.in
+@@ -0,0 +1,9 @@
++#!/bin/sh
++
++set -ax
++
++CK_DEFAULT_TIMEOUT="@CK_DEFAULT_TIMEOUT@"
++GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@"
++GST_REGISTRY=@GST_REGISTRY@
++GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@"
++exec @TEST@
+diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in
+index f701627f87..b74ef6ad73 100644
+--- a/subprojects/gstreamer/tests/check/template.test.in
++++ b/subprojects/gstreamer/tests/check/template.test.in
+@@ -1,3 +1,3 @@
+ [Test]
+ Type=session
+-Exec=@installed_tests_dir@/@program@
++Exec=@installed_tests_dir@/@program@.sh
+--
+2.33.1
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch
new file mode 100644
index 00000000..f51df6d2
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch
@@ -0,0 +1,107 @@
+From b935abba3d8fa3ea1ce384c08e650afd8c20b78a Mon Sep 17 00:00:00 2001
+From: Claudius Heine <ch@denx.de>
+Date: Wed, 2 Feb 2022 13:47:02 +0100
+Subject: [PATCH] tests: remove gstbin:test_watch_for_state_change testcase
+
+This testcase seems to be flaky, and upstream marked it as such:
+https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/778
+
+This patch removes the testcase to avoid it interfering with out ptest.
+
+Signed-off-by: Claudius Heine <ch@denx.de>
+
+Upstream-Status: Inappropriate [needs proper upstream fix]
+---
+ tests/check/gst/gstbin.c | 69 -------------------
+ 1 file changed, 69 deletions(-)
+
+diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c
+index e366d5fe20..ac29d81474 100644
+--- a/tests/check/gst/gstbin.c
++++ b/tests/check/gst/gstbin.c
+@@ -691,74 +691,6 @@ GST_START_TEST (test_message_state_changed_children)
+
+ GST_END_TEST;
+
+-GST_START_TEST (test_watch_for_state_change)
+-{
+- GstElement *src, *sink, *bin;
+- GstBus *bus;
+- GstStateChangeReturn ret;
+-
+- bin = gst_element_factory_make ("bin", NULL);
+- fail_unless (bin != NULL, "Could not create bin");
+-
+- bus = g_object_new (gst_bus_get_type (), NULL);
+- gst_object_ref_sink (bus);
+- gst_element_set_bus (GST_ELEMENT_CAST (bin), bus);
+-
+- src = gst_element_factory_make ("fakesrc", NULL);
+- fail_if (src == NULL, "Could not create fakesrc");
+- sink = gst_element_factory_make ("fakesink", NULL);
+- fail_if (sink == NULL, "Could not create fakesink");
+-
+- gst_bin_add (GST_BIN (bin), sink);
+- gst_bin_add (GST_BIN (bin), src);
+-
+- fail_unless (gst_element_link (src, sink), "could not link src and sink");
+-
+- /* change state, spawning two times three messages */
+- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
+- fail_unless (ret == GST_STATE_CHANGE_ASYNC);
+- ret =
+- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
+- GST_CLOCK_TIME_NONE);
+- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+-
+- pop_state_changed (bus, 6);
+- pop_async_done (bus);
+- pop_latency (bus);
+-
+- fail_unless (gst_bus_have_pending (bus) == FALSE,
+- "Unexpected messages on bus");
+-
+- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
+- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+-
+- pop_state_changed (bus, 3);
+-
+- /* 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);
+- if (ret == GST_STATE_CHANGE_ASYNC) {
+- pop_async_done (bus);
+- pop_latency (bus);
+- }
+-
+- fail_unless (gst_bus_have_pending (bus) == FALSE,
+- "Unexpected messages on bus");
+-
+- gst_bus_set_flushing (bus, TRUE);
+-
+- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL);
+- fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
+-
+- /* clean up */
+- gst_object_unref (bus);
+- gst_object_unref (bin);
+-}
+-
+-GST_END_TEST;
+-
+ GST_START_TEST (test_state_change_error_message)
+ {
+ GstElement *src, *sink, *bin;
+@@ -1956,7 +1888,6 @@ gst_bin_suite (void)
+ tcase_add_test (tc_chain, test_message_state_changed);
+ tcase_add_test (tc_chain, test_message_state_changed_child);
+ tcase_add_test (tc_chain, test_message_state_changed_children);
+- tcase_add_test (tc_chain, test_watch_for_state_change);
+ tcase_add_test (tc_chain, test_state_change_error_message);
+ tcase_add_test (tc_chain, test_add_linked);
+ tcase_add_test (tc_chain, test_add_self);
+--
+2.33.1
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch
deleted file mode 100644
index eabe7bcb..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 57d2965e979f886e03eecd7e351bf01812053971 Mon Sep 17 00:00:00 2001
-From: Jose Quaresma <quaresma.jose@gmail.com>
-Date: Sun, 2 May 2021 01:58:01 +0100
-Subject: [PATCH 4/4] tests: install the environment for installed_tests
-
-- adapt the test environment for installed_tests
-- install the test environment for installed_tests
-- run the tests using the installed environment
-
-Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
-
-Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
----
- template.test.in | 2 +-
- tests/check/meson.build | 18 ++++++++++++++++++
- 2 files changed, 19 insertions(+), 1 deletion(-)
-
-diff --git a/template.test.in b/template.test.in
-index f701627f8..9a3fbdd09 100644
---- a/template.test.in
-+++ b/template.test.in
-@@ -1,3 +1,3 @@
- [Test]
- Type=session
--Exec=@installed_tests_dir@/@program@
-+Exec=sh -c 'set -aex && source @installed_tests_dir@/@program@.env && exec @installed_tests_dir@/@program@'
-diff --git a/tests/check/meson.build b/tests/check/meson.build
-index f64524904..a67e0f8dd 100644
---- a/tests/check/meson.build
-+++ b/tests/check/meson.build
-@@ -183,6 +183,24 @@ foreach t : core_tests
- install_dir: installed_tests_metadir,
- configuration: test_conf
- )
-+
-+ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)}
-+ configure_file(
-+ output: test_name + '.env',
-+ install_dir: installed_tests_execdir,
-+ configuration : env,
-+ )
-+ # helper to convert a meson environment dictionay object exported with configure_file
-+ # this also remove not needed variables for the installed tests
-+ meson.add_postconf_script('sed', '-i',
-+ '-e', '/^#define/!d',
-+ '-e', 's/^#define //g',
-+ '-e', '/^GST_PLUGIN_PATH_1_0/d',
-+ '-e', '/^GST_PLUGIN_SYSTEM_PATH_1_0/d',
-+ '-e', '/^GST_PLUGIN_SCANNER_1_0/d',
-+ '-e', 's/ /=/',
-+ join_paths(meson.current_build_dir(), test_name + '.env')
-+ )
- endif
-
- test(test_name, exe, env: env, timeout : 3 * 60)
---
-2.31.1
-