diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2023-08-03 10:16:20 -0700 |
---|---|---|
committer | Tom Hochstein <tom.hochstein@nxp.com> | 2023-08-03 10:16:20 -0700 |
commit | af8bc52e026897d379609cc51d33f628583dcfee (patch) | |
tree | b500649674c55f260b8d86caa6a5c747ff92f327 /recipes-multimedia/gstreamer/gstreamer1.0-libav | |
parent | 2bccb1fce316b943a4acce350bcc12a69de2b2b9 (diff) | |
download | meta-freescale-af8bc52e026897d379609cc51d33f628583dcfee.tar.gz |
gstreamer: Upgrade 1.20.3.imx -> 1.22.0.imx
Note, this commit does also complete the 'snapshot' model being used by
including the .inc files.
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Diffstat (limited to 'recipes-multimedia/gstreamer/gstreamer1.0-libav')
-rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-libav-Fix-for-APNG-encoder-property-registration.patch | 86 | ||||
-rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0-libav/ffmpeg-6.0.patch | 49 |
2 files changed, 49 insertions, 86 deletions
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 deleted file mode 100644 index 526bbb003..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-libav-Fix-for-APNG-encoder-property-registration.patch +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
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/ffmpeg-6.0.patch b/recipes-multimedia/gstreamer/gstreamer1.0-libav/ffmpeg-6.0.patch new file mode 100644 index 000000000..0a06540fb --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-libav/ffmpeg-6.0.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From cde31d23c071ee93fae96331805f696856084254 Mon Sep 17 00:00:00 2001 | ||
2 | From: "U. Artie Eoff" <ullysses.a.eoff@intel.com> | ||
3 | Date: Mon, 13 Feb 2023 17:02:01 -0500 | ||
4 | Subject: [PATCH] avviddec: change | ||
5 | AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS | ||
6 | |||
7 | This fixes a compile error with recent upstream FFmpeg. | ||
8 | |||
9 | The AV_CODEC_CAP_AUTO_THREADS was deprecated and renamed to | ||
10 | AV_CODEC_CAP_OTHER_THREADS in FFmpeg upstream commit | ||
11 | 7d09579190de (lavc 58.132.100). | ||
12 | |||
13 | The AV_CODEC_CAP_AUTO_THREADS was finally removed in FFmpeg upstream | ||
14 | commit 10c9a0874cb3 (lavc 59.63.100). | ||
15 | |||
16 | Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3964> | ||
17 | |||
18 | Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/cde31d23c071ee93fae96331805f696856084254?merge_request_iid=3964] | ||
19 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
20 | --- | ||
21 | ext/libav/gstavviddec.c | 6 +++++- | ||
22 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c | ||
25 | index 43cea456ae8..6d7c4cd0de8 100644 | ||
26 | --- a/ext/libav/gstavviddec.c | ||
27 | +++ b/ext/libav/gstavviddec.c | ||
28 | @@ -35,6 +35,10 @@ | ||
29 | |||
30 | GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE); | ||
31 | |||
32 | +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,132,100) | ||
33 | +#define AV_CODEC_CAP_OTHER_THREADS AV_CODEC_CAP_AUTO_THREADS | ||
34 | +#endif | ||
35 | + | ||
36 | #define GST_FFMPEG_VIDEO_CODEC_FRAME_FLAG_ALLOCATED (1<<15) | ||
37 | |||
38 | #define MAX_TS_MASK 0xff | ||
39 | @@ -615,7 +619,7 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder, | ||
40 | if (ffmpegdec->max_threads == 0) { | ||
41 | /* When thread type is FF_THREAD_FRAME, extra latency is introduced equal | ||
42 | * to one frame per thread. We thus need to calculate the thread count ourselves */ | ||
43 | - if ((!(oclass->in_plugin->capabilities & AV_CODEC_CAP_AUTO_THREADS)) || | ||
44 | + if ((!(oclass->in_plugin->capabilities & AV_CODEC_CAP_OTHER_THREADS)) || | ||
45 | (ffmpegdec->context->thread_type & FF_THREAD_FRAME)) | ||
46 | ffmpegdec->context->thread_count = | ||
47 | MIN (gst_ffmpeg_auto_max_threads (), 16); | ||
48 | -- | ||
49 | GitLab | ||