diff options
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" | |||
476 | PREFERRED_VERSION_gstreamer1.0-plugins-base:mx8-nxp-bsp ??= "1.20.3.imx" | 476 | PREFERRED_VERSION_gstreamer1.0-plugins-base:mx8-nxp-bsp ??= "1.20.3.imx" |
477 | PREFERRED_VERSION_gstreamer1.0-plugins-good:mx8-nxp-bsp ??= "1.20.3.imx" | 477 | PREFERRED_VERSION_gstreamer1.0-plugins-good:mx8-nxp-bsp ??= "1.20.3.imx" |
478 | PREFERRED_VERSION_gstreamer1.0-plugins-bad:mx8-nxp-bsp ??= "1.20.3.imx" | 478 | PREFERRED_VERSION_gstreamer1.0-plugins-bad:mx8-nxp-bsp ??= "1.20.3.imx" |
479 | PREFERRED_VERSION_gstreamer1.0-plugins-ugly:mx8-nxp-bsp ??= "1.20.3" | ||
480 | PREFERRED_VERSION_gstreamer1.0-libav:mx8-nxp-bsp ??= "1.20.3" | ||
481 | PREFERRED_VERSION_gstreamer1.0-rtsp-server:mx8-nxp-bsp ??= "1.20.3" | ||
479 | PREFERRED_VERSION_ffmpeg:mx8-nxp-bsp ??= "4.4.1" | 482 | PREFERRED_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 @@ | |||
1 | From 78a97c1ec35ada76d83fc67d0549ba56c74d8875 Mon Sep 17 00:00:00 2001 | ||
2 | From: Seungha Yang <seungha@centricular.com> | ||
3 | Date: Thu, 7 Jul 2022 22:16:30 +0900 | ||
4 | Subject: [PATCH] libav: Fix for APNG encoder property registration | ||
5 | |||
6 | The AVClass name of Animated PNG in FFmpeg 5.x is "(A)PNG" | ||
7 | and it will be converted to "-a-png" through | ||
8 | g_ascii_strdown() and g_strcanon(). But GLib disallow leading '-' | ||
9 | character for a GType name. Strip leading '-' to workaround it. | ||
10 | |||
11 | Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2724] | ||
12 | |||
13 | Seungha Yangs patch was imported without modifications. | ||
14 | |||
15 | Signed-off-by: Claus Stovgaard <claus.stovgaard@gmail.com> | ||
16 | --- | ||
17 | ext/libav/gstavcfg.c | 29 +++++++++++++++++++++++------ | ||
18 | 1 file changed, 23 insertions(+), 6 deletions(-) | ||
19 | |||
20 | diff --git a/ext/libav/gstavcfg.c b/ext/libav/gstavcfg.c | ||
21 | index 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 @@ | |||
1 | SUMMARY = "Libav-based GStreamer 1.x plugin" | ||
2 | DESCRIPTION = "Contains a GStreamer plugin for using the encoders, decoders, \ | ||
3 | muxers, and demuxers provided by FFmpeg." | ||
4 | HOMEPAGE = "http://gstreamer.freedesktop.org/" | ||
5 | SECTION = "multimedia" | ||
6 | |||
7 | # ffmpeg has comercial license flags so add it as we need ffmpeg as a dependency | ||
8 | LICENSE_FLAGS = "commercial" | ||
9 | LICENSE = "LGPL-2.1-or-later" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \ | ||
11 | file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \ | ||
12 | " | ||
13 | |||
14 | SRC_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 | " | ||
17 | SRC_URI[sha256sum] = "3fedd10560fcdfaa1b6462cbf79a38c4e7b57d7f390359393fc0cef6dbf27dfe" | ||
18 | |||
19 | S = "${WORKDIR}/gst-libav-${PV}" | ||
20 | |||
21 | DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg" | ||
22 | |||
23 | inherit meson pkgconfig upstream-version-is-even | ||
24 | |||
25 | EXTRA_OEMESON += " \ | ||
26 | -Dtests=disabled \ | ||
27 | " | ||
28 | |||
29 | FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" | ||
30 | FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" | ||
31 | |||
32 | COMPATIBLE_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 @@ | |||
1 | require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc | ||
2 | require recipes-multimedia/gstreamer/gstreamer1.0-plugins-license.inc | ||
3 | |||
4 | DESCRIPTION = "'Ugly GStreamer plugins" | ||
5 | HOMEPAGE = "https://gstreamer.freedesktop.org/" | ||
6 | BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues" | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ | ||
9 | file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068" | ||
10 | |||
11 | LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later" | ||
12 | LICENSE_FLAGS = "commercial" | ||
13 | |||
14 | SRC_URI = " \ | ||
15 | https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ | ||
16 | " | ||
17 | SRC_URI[sha256sum] = "8caa20789a09c304b49cf563d33cca9421b1875b84fcc187e4a385fa01d6aefd" | ||
18 | |||
19 | S = "${WORKDIR}/gst-plugins-ugly-${PV}" | ||
20 | |||
21 | DEPENDS += "gstreamer1.0-plugins-base" | ||
22 | |||
23 | GST_PLUGIN_SET_HAS_EXAMPLES = "0" | ||
24 | |||
25 | PACKAGECONFIG ??= " \ | ||
26 | ${GSTREAMER_ORC} \ | ||
27 | a52dec mpeg2dec \ | ||
28 | " | ||
29 | |||
30 | PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr" | ||
31 | PACKAGECONFIG[amrwb] = "-Damrwbdec=enabled,-Damrwbdec=disabled,opencore-amr" | ||
32 | PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52" | ||
33 | PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio" | ||
34 | PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread" | ||
35 | PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec" | ||
36 | PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264" | ||
37 | |||
38 | GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'a52dec cdio dvdread mpeg2dec x264', d)}" | ||
39 | |||
40 | EXTRA_OEMESON += " \ | ||
41 | -Ddoc=disabled \ | ||
42 | -Dsidplay=disabled \ | ||
43 | " | ||
44 | |||
45 | FILES:${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs" | ||
46 | FILES:${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs" | ||
47 | |||
48 | COMPATIBLE_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 @@ | |||
1 | SUMMARY = "A library on top of GStreamer for building an RTSP server" | ||
2 | HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/" | ||
3 | SECTION = "multimedia" | ||
4 | LICENSE = "LGPL-2.1-or-later" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770" | ||
6 | |||
7 | DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base" | ||
8 | |||
9 | PNREAL = "gst-rtsp-server" | ||
10 | |||
11 | SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" | ||
12 | |||
13 | SRC_URI[sha256sum] = "ee402718be9b127f0e5e66ca4c1b4f42e4926ec93ba307b7ccca5dc6cc9794ca" | ||
14 | |||
15 | S = "${WORKDIR}/${PNREAL}-${PV}" | ||
16 | |||
17 | inherit meson pkgconfig upstream-version-is-even gobject-introspection | ||
18 | |||
19 | EXTRA_OEMESON += " \ | ||
20 | -Ddoc=disabled \ | ||
21 | -Dexamples=disabled \ | ||
22 | -Dtests=disabled \ | ||
23 | " | ||
24 | |||
25 | GIR_MESON_ENABLE_FLAG = "enabled" | ||
26 | GIR_MESON_DISABLE_FLAG = "disabled" | ||
27 | |||
28 | # Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well | ||
29 | require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc | ||
30 | |||
31 | CVE_PRODUCT += "gst-rtsp-server" | ||
32 | |||
33 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | ||