gst-plugins-base: rebuilt with ffmpeg 7

This commit is contained in:
Tim Biermann 2024-06-10 22:03:51 +02:00
parent f0016777b4
commit 41ce41dd07
Signed by: tb
GPG Key ID: 42F8B4E30B673606
3 changed files with 315 additions and 4 deletions

View File

@ -1,5 +1,6 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/YHb7X0/4SVduA1L5jt+LYkSGYGTsGohOzaQQqfN+q0VuGJm0rFA6CP1hbd1lroY0rYzp6L7xkJT/RImK8qCcg0=
SHA256 (Pkgfile) = 4b456f4859a39a2fcbbefc310507dea6736a8e7e3e6f7aede09c47ef0f68b1ac
RWSE3ohX2g5d/SdlDzZRD4PeiRqCK5LupGzFolpkGf0U+rKDN3UE+fquI6qGOHRD7Zzyu7Cow8XJk78bf4hDX9gb+kYrnfIilQo=
SHA256 (Pkgfile) = 38f892588a1e4b5556b1f7026e50175248004c22df584f778c892b9f6abd8198
SHA256 (.footprint) = 26a5e884bc023d87e90c033f582b2a744f0edd920204af37a8aa102ef90cb279
SHA256 (gst-plugins-base-1.24.4.tar.xz) = 09f4ddf246eeb819da1494ce336316edbbcb28fdff3ee2f9804891e84df39b2a
SHA256 (ffmpeg7.patch) = f2bcb2164f047c82fe1bc8d7ade1ff6b1ac660d3de72b8a4d0e5f067cd36a235

View File

@ -6,8 +6,9 @@
name=gst-plugins-base
version=1.24.4
release=1
source=(https://gstreamer.freedesktop.org/src/$name/$name-$version.tar.xz)
release=2
source=(https://gstreamer.freedesktop.org/src/$name/$name-$version.tar.xz
ffmpeg7.patch)
build() {
# decide accordingly to what mesa builds with
@ -20,6 +21,8 @@ build() {
PKGMK_GST_GLAPI+=',opengl' \
PKGMK_GST_WINDOW+=',x11'
patch -Np3 -d $name-$version -i $SRC/ffmpeg7.patch
meson setup build $name-$version \
--prefix=/usr \
--libexecdir=/usr/lib \

View File

@ -0,0 +1,307 @@
diff --git a/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctions.c b/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctions.c
index 805cb0a301b6..a10ef26028e8 100644
--- a/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctions.c
+++ b/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctions.c
@@ -5512,6 +5512,195 @@ tap_type_find (GstTypeFind * tf, gpointer unused)
}
}
+/*** audio/x-brstm ***/
+
+static GstStaticCaps brstm_caps = GST_STATIC_CAPS ("audio/x-brstm");
+
+#define BRSTM_CAPS (gst_static_caps_get(&brstm_caps))
+static void
+brstm_type_find (GstTypeFind * tf, gpointer unused)
+{
+ const guint8 *data = gst_type_find_peek (tf, 0, 8);
+
+ if (data) {
+ if (GST_READ_UINT32_LE (data) != GST_MAKE_FOURCC ('R', 'S', 'T', 'M'))
+ return;
+ if (GST_READ_UINT32_LE (data + 4) != 0xfffe
+ && GST_READ_UINT32_LE (data + 4) != 0xfeff)
+ return;
+ gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, BRSTM_CAPS);
+ }
+}
+
+/*** audio/x-bfstm ***/
+
+static GstStaticCaps bfstm_caps = GST_STATIC_CAPS ("audio/x-bfstm");
+
+#define BFSTM_CAPS (gst_static_caps_get(&bfstm_caps))
+static void
+bfstm_type_find (GstTypeFind * tf, gpointer unused)
+{
+ const guint8 *data = gst_type_find_peek (tf, 0, 8);
+
+ if (data) {
+ if (GST_READ_UINT32_LE (data) != GST_MAKE_FOURCC ('F', 'S', 'T', 'M') &&
+ GST_READ_UINT32_LE (data) != GST_MAKE_FOURCC ('C', 'S', 'T', 'M'))
+ return;
+ if (GST_READ_UINT32_LE (data + 4) != 0xfffe
+ && GST_READ_UINT32_LE (data + 4) != 0xfeff)
+ return;
+ gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, BFSTM_CAPS);
+ }
+}
+
+/*** audio/x-dsf ***/
+
+static GstStaticCaps dsf_caps = GST_STATIC_CAPS ("audio/x-dsf");
+
+#define DSF_CAPS (gst_static_caps_get(&dsf_caps))
+static void
+dsf_type_find (GstTypeFind * tf, gpointer unused)
+{
+ const guint8 *data = gst_type_find_peek (tf, 0, 12);
+
+ if (data) {
+ if (memcmp (data, "DSD ", 4) != 0)
+ return;
+ if (GST_READ_UINT64_BE (data + 4) == 28)
+ return;
+
+ gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, DSF_CAPS);
+ }
+}
+
+/*** video/x-ea ***/
+
+static GstStaticCaps ea_caps = GST_STATIC_CAPS ("video/x-ea");
+
+#define EA_CAPS (gst_static_caps_get(&ea_caps))
+static void
+ea_type_find (GstTypeFind * tf, gpointer unused)
+{
+ const guint8 *data = gst_type_find_peek (tf, 0, 8);
+
+ if (data) {
+ static const guint32 ea_fourccs[] = {
+ GST_MAKE_FOURCC ('I', 'S', 'N', 'h'),
+ GST_MAKE_FOURCC ('S', 'C', 'H', 'l'),
+ GST_MAKE_FOURCC ('S', 'E', 'A', 'D'),
+ GST_MAKE_FOURCC ('S', 'H', 'E', 'N'),
+ GST_MAKE_FOURCC ('k', 'V', 'G', 'T'),
+ GST_MAKE_FOURCC ('M', 'A', 'D', 'k'),
+ GST_MAKE_FOURCC ('M', 'P', 'C', 'h'),
+ GST_MAKE_FOURCC ('M', 'V', 'h', 'd'),
+ GST_MAKE_FOURCC ('M', 'V', 'I', 'h'),
+ GST_MAKE_FOURCC ('A', 'V', 'P', '6'),
+ };
+
+ guint32 fourcc = GST_READ_UINT32_LE (data);
+ gboolean found = FALSE;
+
+ for (gsize i = 0; i < G_N_ELEMENTS (ea_fourccs); i++) {
+ if (fourcc == ea_fourccs[i]) {
+ found = TRUE;
+ break;
+ }
+ }
+ if (!found)
+ return;
+
+ guint32 size = GST_READ_UINT32_LE (data + 4);
+ gboolean big_endian = size > 0x000fffff;
+ if (big_endian)
+ size = GUINT32_SWAP_LE_BE (size);
+ if (size > 0xfffff || size < 8)
+ return;
+
+ gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, EA_CAPS);
+ }
+}
+
+/*** video/x-film-cpk ***/
+
+static GstStaticCaps film_cpk_caps = GST_STATIC_CAPS ("video/x-film-cpk");
+
+#define FILM_CPK_CAPS (gst_static_caps_get(&film_cpk_caps))
+static void
+film_cpk_type_find (GstTypeFind * tf, gpointer unused)
+{
+ const guint8 *data = gst_type_find_peek (tf, 0, 20);
+
+ if (data) {
+ if (GST_READ_UINT32_LE (data) != GST_MAKE_FOURCC ('F', 'I', 'L', 'M'))
+ return;
+ if (GST_READ_UINT32_LE (data + 16) != GST_MAKE_FOURCC ('F', 'D', 'S', 'C'))
+ return;
+
+ gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, FILM_CPK_CAPS);
+ }
+}
+
+/*** application/gxf ***/
+
+static GstStaticCaps gxf_caps = GST_STATIC_CAPS ("application/gxf");
+
+#define GXF_CAPS (gst_static_caps_get(&gxf_caps))
+static void
+gxf_type_find (GstTypeFind * tf, gpointer unused)
+{
+ const guint8 *data = gst_type_find_peek (tf, 0, 16);
+
+ if (data) {
+ if (memcmp (data, "\x00\x00\x00\x00\x01\xbc", 6) != 0)
+ return;
+ if (memcmp (data + 10, "\x00\x00\x00\x00\xe1\xe2", 6) != 0)
+ return;
+ gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, GXF_CAPS);
+ }
+}
+
+/*** application/x-iff ***/
+
+static GstStaticCaps iff_caps = GST_STATIC_CAPS ("application/x-iff");
+
+#define IFF_CAPS (gst_static_caps_get(&iff_caps))
+static void
+iff_type_find (GstTypeFind * tf, gpointer unused)
+{
+ const guint8 *data = gst_type_find_peek (tf, 0, 16);
+
+ if (data) {
+ if (GST_READ_UINT32_LE (data) == GST_MAKE_FOURCC ('F', 'O', 'R', 'M') &&
+ (GST_READ_UINT32_LE (data + 8) == GST_MAKE_FOURCC ('8', 'S', 'V', 'X')
+ || GST_READ_UINT32_LE (data + 8) == GST_MAKE_FOURCC ('1', '6', 'S',
+ 'V')
+ || GST_READ_UINT32_LE (data + 8) == GST_MAKE_FOURCC ('M', 'A', 'U',
+ 'D')
+ || GST_READ_UINT32_LE (data + 8) == GST_MAKE_FOURCC ('P', 'B', 'M',
+ ' ')
+ || GST_READ_UINT32_LE (data + 8) == GST_MAKE_FOURCC ('A', 'C', 'B',
+ 'M')
+ || GST_READ_UINT32_LE (data + 8) == GST_MAKE_FOURCC ('D', 'E', 'E',
+ 'P')
+ || GST_READ_UINT32_LE (data + 8) == GST_MAKE_FOURCC ('I', 'L', 'B',
+ 'M')
+ || GST_READ_UINT32_LE (data + 8) == GST_MAKE_FOURCC ('R', 'G', 'B',
+ '8')
+ || GST_READ_UINT32_LE (data + 8) == GST_MAKE_FOURCC ('A', 'N', 'I',
+ 'M')
+ || GST_READ_UINT32_LE (data + 8) == GST_MAKE_FOURCC ('R', 'G', 'B',
+ 'N'))) {
+ return gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, IFF_CAPS);
+ }
+
+ if (GST_READ_UINT32_LE (data) == GST_MAKE_FOURCC ('F', 'R', 'M', '8')
+ && GST_READ_UINT32_LE (data + 12) == GST_MAKE_FOURCC ('D', 'S', 'D',
+ ' ')) {
+ return gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, IFF_CAPS);
+ }
+ }
+}
+
/*** video/vivo ***/
static GstStaticCaps vivo_caps = GST_STATIC_CAPS ("video/vivo");
@@ -6212,3 +6401,17 @@ GST_TYPE_FIND_REGISTER_DEFINE (aa, "audio/audible", GST_RANK_MARGINAL,
aa_type_find, "aa,aax", AA_CAPS, NULL, NULL);
GST_TYPE_FIND_REGISTER_DEFINE (tap, "audio/x-tap-tap", GST_RANK_PRIMARY,
tap_type_find, "tap", TAP_CAPS, NULL, NULL);
+GST_TYPE_FIND_REGISTER_DEFINE (brstm, "audio/x-brstm", GST_RANK_SECONDARY,
+ brstm_type_find, "brstm", BRSTM_CAPS, NULL, NULL);
+GST_TYPE_FIND_REGISTER_DEFINE (bfstm, "audio/x-bfstm", GST_RANK_SECONDARY,
+ bfstm_type_find, "bfstm,bcstm", BFSTM_CAPS, NULL, NULL);
+GST_TYPE_FIND_REGISTER_DEFINE (dsf, "audio/x-dsf", GST_RANK_PRIMARY,
+ dsf_type_find, NULL, DSF_CAPS, NULL, NULL);
+GST_TYPE_FIND_REGISTER_DEFINE (ea, "video/x-ea", GST_RANK_SECONDARY,
+ ea_type_find, NULL, EA_CAPS, NULL, NULL);
+GST_TYPE_FIND_REGISTER_DEFINE (film_cpk, "video/x-film-cpk", GST_RANK_SECONDARY,
+ film_cpk_type_find, "cpk", FILM_CPK_CAPS, NULL, NULL);
+GST_TYPE_FIND_REGISTER_DEFINE (gxf, "application/gxf", GST_RANK_SECONDARY,
+ gxf_type_find, NULL, GXF_CAPS, NULL, NULL);
+GST_TYPE_FIND_REGISTER_DEFINE (iff, "application/x-iff", GST_RANK_SECONDARY,
+ iff_type_find, NULL, IFF_CAPS, NULL, NULL);
diff --git a/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsplugin.c b/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsplugin.c
index c0e386aa2a28..998cfd4cf7fa 100644
--- a/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsplugin.c
+++ b/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsplugin.c
@@ -42,15 +42,18 @@ plugin_init (GstPlugin * plugin)
/* must use strings, macros don't accept initializers */
/*Riff Type find register */
+ GST_TYPE_FIND_REGISTER (fourxm, plugin);
GST_TYPE_FIND_REGISTER (avi, plugin);
GST_TYPE_FIND_REGISTER (qcp, plugin);
GST_TYPE_FIND_REGISTER (cdxa, plugin);
GST_TYPE_FIND_REGISTER (riff_mid, plugin);
GST_TYPE_FIND_REGISTER (wav, plugin);
GST_TYPE_FIND_REGISTER (webp, plugin);
+ GST_TYPE_FIND_REGISTER (xwma, plugin);
/*'Start with' Type find register */
GST_TYPE_FIND_REGISTER (asf, plugin);
+ GST_TYPE_FIND_REGISTER (avs, plugin);
GST_TYPE_FIND_REGISTER (vcd, plugin);
GST_TYPE_FIND_REGISTER (imelody, plugin);
GST_TYPE_FIND_REGISTER (scc, plugin);
@@ -203,6 +206,13 @@ plugin_init (GstPlugin * plugin)
GST_TYPE_FIND_REGISTER (pva, plugin);
GST_TYPE_FIND_REGISTER (aa, plugin);
GST_TYPE_FIND_REGISTER (tap, plugin);
+ GST_TYPE_FIND_REGISTER (brstm, plugin);
+ GST_TYPE_FIND_REGISTER (bfstm, plugin);
+ GST_TYPE_FIND_REGISTER (dsf, plugin);
+ GST_TYPE_FIND_REGISTER (ea, plugin);
+ GST_TYPE_FIND_REGISTER (film_cpk, plugin);
+ GST_TYPE_FIND_REGISTER (gxf, plugin);
+ GST_TYPE_FIND_REGISTER (iff, plugin);
return TRUE;
}
diff --git a/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsplugin.h b/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsplugin.h
index 0dfbc700b00b..1ef0eff272a3 100644
--- a/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsplugin.h
+++ b/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsplugin.h
@@ -41,9 +41,12 @@ GST_TYPE_FIND_REGISTER_DECLARE (cdxa);
GST_TYPE_FIND_REGISTER_DECLARE (riff_mid);
GST_TYPE_FIND_REGISTER_DECLARE (wav);
GST_TYPE_FIND_REGISTER_DECLARE (webp);
+GST_TYPE_FIND_REGISTER_DECLARE (fourxm);
+GST_TYPE_FIND_REGISTER_DECLARE (xwma);
/*'Start with' type find declaration */
GST_TYPE_FIND_REGISTER_DECLARE (asf);
+GST_TYPE_FIND_REGISTER_DECLARE (avs);
GST_TYPE_FIND_REGISTER_DECLARE (vcd);
GST_TYPE_FIND_REGISTER_DECLARE (imelody);
GST_TYPE_FIND_REGISTER_DECLARE (scc);
@@ -195,5 +198,12 @@ GST_TYPE_FIND_REGISTER_DECLARE (ssa);
GST_TYPE_FIND_REGISTER_DECLARE (pva);
GST_TYPE_FIND_REGISTER_DECLARE (aa);
GST_TYPE_FIND_REGISTER_DECLARE (tap);
+GST_TYPE_FIND_REGISTER_DECLARE (brstm);
+GST_TYPE_FIND_REGISTER_DECLARE (bfstm);
+GST_TYPE_FIND_REGISTER_DECLARE (dsf);
+GST_TYPE_FIND_REGISTER_DECLARE (ea);
+GST_TYPE_FIND_REGISTER_DECLARE (film_cpk);
+GST_TYPE_FIND_REGISTER_DECLARE (gxf);
+GST_TYPE_FIND_REGISTER_DECLARE (iff);
#endif //__GST_TYPE_FIND_FUNCTIONS_PLUGIN_H__
diff --git a/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsriff.c b/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsriff.c
index ba5521961102..98823c437000 100644
--- a/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsriff.c
+++ b/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsriff.c
@@ -81,3 +81,7 @@ TYPE_FIND_REGISTER_RIFF_DEFINE (wav, "audio/x-wav", GST_RANK_PRIMARY, "wav",
"WAVE");
TYPE_FIND_REGISTER_RIFF_DEFINE (webp, "image/webp", GST_RANK_PRIMARY,
"webp", "WEBP");
+TYPE_FIND_REGISTER_RIFF_DEFINE (fourxm, "video/x-4xm", GST_RANK_PRIMARY,
+ NULL, "4XMV");
+TYPE_FIND_REGISTER_RIFF_DEFINE (xwma, "audio/x-xwma", GST_RANK_PRIMARY,
+ NULL, "XWMA");
diff --git a/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsstartwith.c b/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsstartwith.c
index 6109e9c9ab54..b65a6827a867 100644
--- a/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsstartwith.c
+++ b/subprojects/gst-plugins-base/gst/typefind/gsttypefindfunctionsstartwith.c
@@ -177,3 +177,5 @@ TYPE_FIND_REGISTER_START_WITH_DEFINE (xi, "audio/x-xi", GST_RANK_SECONDARY,
"xi", "Extended Instrument: ", 21, GST_TYPE_FIND_MAXIMUM);
TYPE_FIND_REGISTER_START_WITH_DEFINE (dmp, "audio/x-tap-dmp",
GST_RANK_SECONDARY, "dmp", "DC2N-TAP-RAW", 12, GST_TYPE_FIND_LIKELY);
+TYPE_FIND_REGISTER_START_WITH_DEFINE (avs, "video/x-avs",
+ GST_RANK_SECONDARY, NULL, "wW\x10\x00", 4, GST_TYPE_FIND_LIKELY);