summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2023-03-07 15:29:13 +0000
committerSamuli Piippo <samuli.piippo@qt.io>2023-03-08 06:12:33 +0000
commitb70890533963c59f4f7a72891da4287cdb7a704a (patch)
treee987a2a4e0d58128e6c840a3095e308868adc4ea
parentadf69723cf24f81697aa363a093e939f642e60ab (diff)
downloadmeta-freescale-b70890533963c59f4f7a72891da4287cdb7a704a.tar.gz
gstreamer: add recipes for upstream 1.20.3 versions
oe-core has moved to gstreamer 1.22.0 and recipes which don't have an imx version can no longer be built. Add older version of those components to be used with the gstreamer 1.20.3.imx. Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
-rw-r--r--conf/machine/include/imx-base.inc3
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-libav-Fix-for-APNG-encoder-property-registration.patch86
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.3.bb32
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.20.3.bb48
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.20.3.bb33
5 files changed, 202 insertions, 0 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index 5ed891d9..741d23ac 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -476,6 +476,9 @@ PREFERRED_VERSION_gstreamer1.0:mx8-nxp-bsp ??= "1.20.3.imx"
476PREFERRED_VERSION_gstreamer1.0-plugins-base:mx8-nxp-bsp ??= "1.20.3.imx" 476PREFERRED_VERSION_gstreamer1.0-plugins-base:mx8-nxp-bsp ??= "1.20.3.imx"
477PREFERRED_VERSION_gstreamer1.0-plugins-good:mx8-nxp-bsp ??= "1.20.3.imx" 477PREFERRED_VERSION_gstreamer1.0-plugins-good:mx8-nxp-bsp ??= "1.20.3.imx"
478PREFERRED_VERSION_gstreamer1.0-plugins-bad:mx8-nxp-bsp ??= "1.20.3.imx" 478PREFERRED_VERSION_gstreamer1.0-plugins-bad:mx8-nxp-bsp ??= "1.20.3.imx"
479PREFERRED_VERSION_gstreamer1.0-plugins-ugly:mx8-nxp-bsp ??= "1.20.3"
480PREFERRED_VERSION_gstreamer1.0-libav:mx8-nxp-bsp ??= "1.20.3"
481PREFERRED_VERSION_gstreamer1.0-rtsp-server:mx8-nxp-bsp ??= "1.20.3"
479PREFERRED_VERSION_ffmpeg:mx8-nxp-bsp ??= "4.4.1" 482PREFERRED_VERSION_ffmpeg:mx8-nxp-bsp ??= "4.4.1"
480 483
481# Determines if the SoC has support for Vivante kernel driver 484# Determines if the SoC has support for Vivante kernel driver
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-libav-Fix-for-APNG-encoder-property-registration.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-libav-Fix-for-APNG-encoder-property-registration.patch
new file mode 100644
index 00000000..526bbb00
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-libav-Fix-for-APNG-encoder-property-registration.patch
@@ -0,0 +1,86 @@
1From 78a97c1ec35ada76d83fc67d0549ba56c74d8875 Mon Sep 17 00:00:00 2001
2From: Seungha Yang <seungha@centricular.com>
3Date: Thu, 7 Jul 2022 22:16:30 +0900
4Subject: [PATCH] libav: Fix for APNG encoder property registration
5
6The AVClass name of Animated PNG in FFmpeg 5.x is "(A)PNG"
7and it will be converted to "-a-png" through
8g_ascii_strdown() and g_strcanon(). But GLib disallow leading '-'
9character for a GType name. Strip leading '-' to workaround it.
10
11Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2724]
12
13Seungha Yangs patch was imported without modifications.
14
15Signed-off-by: Claus Stovgaard <claus.stovgaard@gmail.com>
16---
17 ext/libav/gstavcfg.c | 29 +++++++++++++++++++++++------
18 1 file changed, 23 insertions(+), 6 deletions(-)
19
20diff --git a/ext/libav/gstavcfg.c b/ext/libav/gstavcfg.c
21index c736920..a8635a7 100644
22--- a/ext/libav/gstavcfg.c
23+++ b/ext/libav/gstavcfg.c
24@@ -91,10 +91,19 @@ register_enum (const AVClass ** obj, const AVOption * top_opt)
25 gchar *lower_obj_name = g_ascii_strdown ((*obj)->class_name, -1);
26 gchar *enum_name = g_strdup_printf ("%s-%s", lower_obj_name, top_opt->unit);
27 gboolean none_default = TRUE;
28+ const gchar *enum_name_strip;
29
30 g_strcanon (enum_name, G_CSET_a_2_z G_CSET_DIGITS, '-');
31
32- if ((res = g_type_from_name (enum_name)))
33+ /* strip leading '-'s */
34+ enum_name_strip = enum_name;
35+ while (enum_name_strip[0] == '-')
36+ enum_name_strip++;
37+
38+ if (enum_name_strip[0] == '\0')
39+ goto done;
40+
41+ if ((res = g_type_from_name (enum_name_strip)))
42 goto done;
43
44 while ((opt = av_opt_next (obj, opt))) {
45@@ -150,9 +159,8 @@ register_enum (const AVClass ** obj, const AVOption * top_opt)
46 }
47 }
48
49- res =
50- g_enum_register_static (enum_name, &g_array_index (values, GEnumValue,
51- 0));
52+ res = g_enum_register_static (enum_name_strip,
53+ &g_array_index (values, GEnumValue, 0));
54
55 gst_type_mark_as_plugin_api (res, 0);
56 }
57@@ -177,10 +185,19 @@ register_flags (const AVClass ** obj, const AVOption * top_opt)
58 GArray *values = g_array_new (TRUE, TRUE, sizeof (GEnumValue));
59 gchar *lower_obj_name = g_ascii_strdown ((*obj)->class_name, -1);
60 gchar *flags_name = g_strdup_printf ("%s-%s", lower_obj_name, top_opt->unit);
61+ const gchar *flags_name_strip;
62
63 g_strcanon (flags_name, G_CSET_a_2_z G_CSET_DIGITS, '-');
64
65- if ((res = g_type_from_name (flags_name)))
66+ /* strip leading '-'s */
67+ flags_name_strip = flags_name;
68+ while (flags_name_strip[0] == '-')
69+ flags_name_strip++;
70+
71+ if (flags_name_strip[0] == '\0')
72+ goto done;
73+
74+ if ((res = g_type_from_name (flags_name_strip)))
75 goto done;
76
77 while ((opt = av_opt_next (obj, opt))) {
78@@ -211,7 +228,7 @@ register_flags (const AVClass ** obj, const AVOption * top_opt)
79 g_array_sort (values, (GCompareFunc) cmp_flags_value);
80
81 res =
82- g_flags_register_static (flags_name, &g_array_index (values,
83+ g_flags_register_static (flags_name_strip, &g_array_index (values,
84 GFlagsValue, 0));
85
86 gst_type_mark_as_plugin_api (res, 0);
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.3.bb b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.3.bb
new file mode 100644
index 00000000..e0ee5778
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.20.3.bb
@@ -0,0 +1,32 @@
1SUMMARY = "Libav-based GStreamer 1.x plugin"
2DESCRIPTION = "Contains a GStreamer plugin for using the encoders, decoders, \
3muxers, and demuxers provided by FFmpeg."
4HOMEPAGE = "http://gstreamer.freedesktop.org/"
5SECTION = "multimedia"
6
7# ffmpeg has comercial license flags so add it as we need ffmpeg as a dependency
8LICENSE_FLAGS = "commercial"
9LICENSE = "LGPL-2.1-or-later"
10LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
11 file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
12 "
13
14SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
15 file://0001-libav-Fix-for-APNG-encoder-property-registration.patch \
16 "
17SRC_URI[sha256sum] = "3fedd10560fcdfaa1b6462cbf79a38c4e7b57d7f390359393fc0cef6dbf27dfe"
18
19S = "${WORKDIR}/gst-libav-${PV}"
20
21DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg"
22
23inherit meson pkgconfig upstream-version-is-even
24
25EXTRA_OEMESON += " \
26 -Dtests=disabled \
27"
28
29FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
30FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
31
32COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.20.3.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.20.3.bb
new file mode 100644
index 00000000..9511984e
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.20.3.bb
@@ -0,0 +1,48 @@
1require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
2require recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc
3
4DESCRIPTION = "'Ugly GStreamer plugins"
5HOMEPAGE = "https://gstreamer.freedesktop.org/"
6BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues"
7
8LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
9 file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
10
11LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
12LICENSE_FLAGS = "commercial"
13
14SRC_URI = " \
15 https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
16 "
17SRC_URI[sha256sum] = "8caa20789a09c304b49cf563d33cca9421b1875b84fcc187e4a385fa01d6aefd"
18
19S = "${WORKDIR}/gst-plugins-ugly-${PV}"
20
21DEPENDS += "gstreamer1.0-plugins-base"
22
23GST_PLUGIN_SET_HAS_EXAMPLES = "0"
24
25PACKAGECONFIG ??= " \
26 ${GSTREAMER_ORC} \
27 a52dec mpeg2dec \
28"
29
30PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr"
31PACKAGECONFIG[amrwb] = "-Damrwbdec=enabled,-Damrwbdec=disabled,opencore-amr"
32PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52"
33PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio"
34PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread"
35PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec"
36PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264"
37
38GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'a52dec cdio dvdread mpeg2dec x264', d)}"
39
40EXTRA_OEMESON += " \
41 -Ddoc=disabled \
42 -Dsidplay=disabled \
43"
44
45FILES:${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs"
46FILES:${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs"
47
48COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.20.3.bb b/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.20.3.bb
new file mode 100644
index 00000000..992dbda8
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.20.3.bb
@@ -0,0 +1,33 @@
1SUMMARY = "A library on top of GStreamer for building an RTSP server"
2HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
3SECTION = "multimedia"
4LICENSE = "LGPL-2.1-or-later"
5LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770"
6
7DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
8
9PNREAL = "gst-rtsp-server"
10
11SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
12
13SRC_URI[sha256sum] = "ee402718be9b127f0e5e66ca4c1b4f42e4926ec93ba307b7ccca5dc6cc9794ca"
14
15S = "${WORKDIR}/${PNREAL}-${PV}"
16
17inherit meson pkgconfig upstream-version-is-even gobject-introspection
18
19EXTRA_OEMESON += " \
20 -Ddoc=disabled \
21 -Dexamples=disabled \
22 -Dtests=disabled \
23"
24
25GIR_MESON_ENABLE_FLAG = "enabled"
26GIR_MESON_DISABLE_FLAG = "disabled"
27
28# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
29require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
30
31CVE_PRODUCT += "gst-rtsp-server"
32
33COMPATIBLE_MACHINE = "(imx-nxp-bsp)"