Skip to content
Snippets Groups Projects
Verified Commit f7119550 authored by Antonio Rojas's avatar Antonio Rojas
Browse files

upgpkg: 1.24.3-2: ffmpeg 7 rebuild

parent 8127c325
No related branches found
No related tags found
No related merge requests found
pkgbase = gstreamer
pkgdesc = Multimedia graph framework
pkgver = 1.24.3
pkgrel = 1
pkgrel = 2
url = https://gstreamer.freedesktop.org/
arch = x86_64
license = LGPL-2.1-or-later
......@@ -141,11 +141,13 @@ pkgbase = gstreamer
source = https://gstreamer.freedesktop.org/src/gstreamer-docs/gstreamer-docs-1.24.3.tar.xz
source = https://gstreamer.freedesktop.org/src/gstreamer-docs/gstreamer-docs-1.24.3.tar.xz.asc
source = 0001-HACK-meson-Disable-broken-tests.patch
source = 0002-Fix-build-with-FFmpeg-7.patch
validpgpkeys = D637032E45B8C6585B9456565D2EEE6F6F349D7C
b2sums = ba36061add5b081291b2f6a18b14e2c6cf1f2796b503bc7053e4c059f3d10620ece05b52590151f7e35f2e8919a0f2cfa3372ba24ff0a15beeb4d670c7df3ccd
b2sums = 118ad62b9e1072a8f1399c2984c74745c2c1572b9f244bd108b23821d2957bcb1938010f37ec3ab6ac4a40989dd6e54898b5ab669fd142891d4cba4c44b6fd9f
b2sums = SKIP
b2sums = e7c59c828883a3bb3aa47684d83b57cd4d463e1f8cffc0383f779fa60ecbe37bfa30c8a0f40e6b2a01f6e0edfbefc5b7041340837e0018741e5963671945a1f2
b2sums = 696dd7a38465f96bf3e48f66c290febfdadd80a75637ee7b8a13929a773330560852cbe85c37bbf5d4cb821fec5d9ae4036e11ef528fe8cbbb93dfe16e723fdf
pkgname = gstreamer
pkgdesc = Multimedia graph framework - core
......
From 08f4d4708a955310099eba6dcdf1f1c8e3a903f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
Date: Tue, 2 Apr 2024 10:17:56 +0300
Subject: [PATCH] avdemux: Remove typefinder implementation
Direct access to AVInputFormat::read_probe() is not possible anymore
with ffmpeg 7.0, and the usefulness of this typefinder seems limited
anyway. An alternative implementation around av_probe_input_format3() or
similar would be possible but it would be going over all possible ffmpeg
probes at once.
Having a typefinder here means that basically every application will
load the gst-libav plugin when typefinding is necessary, which has
unnecessary performance impacts. If a typefinder from here was indeed
missing from typefindfunctions in gst-plugins-base then it would be
better to add it there directly.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3378
---
subprojects/gst-libav/ext/libav/gstavdemux.c | 100 +------------------
1 file changed, 1 insertion(+), 99 deletions(-)
diff --git a/subprojects/gst-libav/ext/libav/gstavdemux.c b/subprojects/gst-libav/ext/libav/gstavdemux.c
index ab6ac1b5c94..f07e7d3ffdf 100644
--- a/subprojects/gst-libav/ext/libav/gstavdemux.c
+++ b/subprojects/gst-libav/ext/libav/gstavdemux.c
@@ -1372,63 +1372,6 @@ beach:
}
}
-#define GST_FFMPEG_TYPE_FIND_SIZE 4096
-#define GST_FFMPEG_TYPE_FIND_MIN_SIZE 256
-
-static void
-gst_ffmpegdemux_type_find (GstTypeFind * tf, gpointer priv)
-{
- const guint8 *data;
- AVInputFormat *in_plugin = (AVInputFormat *) priv;
- gint res = 0;
- guint64 length;
- GstCaps *sinkcaps;
-
- /* We want GST_FFMPEG_TYPE_FIND_SIZE bytes, but if the file is shorter than
- * that we'll give it a try... */
- length = gst_type_find_get_length (tf);
- if (length == 0 || length > GST_FFMPEG_TYPE_FIND_SIZE)
- length = GST_FFMPEG_TYPE_FIND_SIZE;
-
- /* The ffmpeg typefinders assume there's a certain minimum amount of data
- * and will happily do invalid memory access if there isn't, so let's just
- * skip the ffmpeg typefinders if the data available is too short
- * (in which case it's unlikely to be a media file anyway) */
- if (length < GST_FFMPEG_TYPE_FIND_MIN_SIZE) {
- GST_LOG ("not typefinding %" G_GUINT64_FORMAT " bytes, too short", length);
- return;
- }
-
- GST_LOG ("typefinding %" G_GUINT64_FORMAT " bytes", length);
- if (in_plugin->read_probe &&
- (data = gst_type_find_peek (tf, 0, length)) != NULL) {
- AVProbeData probe_data;
-
- probe_data.filename = "";
- probe_data.buf = (guint8 *) data;
- probe_data.buf_size = length;
-
- res = in_plugin->read_probe (&probe_data);
- if (res > 0) {
- res = MAX (1, res * GST_TYPE_FIND_MAXIMUM / AVPROBE_SCORE_MAX);
- /* Restrict the probability for MPEG-TS streams, because there is
- * probably a better version in plugins-base, if the user has a recent
- * plugins-base (in fact we shouldn't even get here for ffmpeg mpegts or
- * mpegtsraw typefinders, since we blacklist them) */
- if (g_str_has_prefix (in_plugin->name, "mpegts"))
- res = MIN (res, GST_TYPE_FIND_POSSIBLE);
-
- sinkcaps = gst_ffmpeg_formatid_to_caps (in_plugin->name);
-
- GST_LOG ("libav typefinder '%s' suggests %" GST_PTR_FORMAT ", p=%u%%",
- in_plugin->name, sinkcaps, res);
-
- gst_type_find_suggest (tf, res, sinkcaps);
- gst_caps_unref (sinkcaps);
- }
- }
-}
-
/* Task */
static void
gst_ffmpegdemux_loop (GstFFMpegDemux * demux)
@@ -2055,7 +1998,6 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
while ((in_plugin = av_demuxer_iterate (&i))) {
gchar *type_name, *typefind_name;
gint rank;
- gboolean register_typefind_func = TRUE;
GST_LOG ("Attempting to handle libav demuxer plugin %s [%s]",
in_plugin->name, in_plugin->long_name);
@@ -2102,42 +2044,6 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
!strcmp (in_plugin->name, "ffmetadata"))
continue;
- /* Don't use the typefind functions of formats for which we already have
- * better typefind functions */
- if (!strcmp (in_plugin->name, "mov,mp4,m4a,3gp,3g2,mj2") ||
- !strcmp (in_plugin->name, "ass") ||
- !strcmp (in_plugin->name, "avi") ||
- !strcmp (in_plugin->name, "asf") ||
- !strcmp (in_plugin->name, "mpegvideo") ||
- !strcmp (in_plugin->name, "mp3") ||
- !strcmp (in_plugin->name, "matroska") ||
- !strcmp (in_plugin->name, "matroska_webm") ||
- !strcmp (in_plugin->name, "matroska,webm") ||
- !strcmp (in_plugin->name, "mpeg") ||
- !strcmp (in_plugin->name, "wav") ||
- !strcmp (in_plugin->name, "au") ||
- !strcmp (in_plugin->name, "tta") ||
- !strcmp (in_plugin->name, "rm") ||
- !strcmp (in_plugin->name, "amr") ||
- !strcmp (in_plugin->name, "ogg") ||
- !strcmp (in_plugin->name, "aiff") ||
- !strcmp (in_plugin->name, "ape") ||
- !strcmp (in_plugin->name, "dv") ||
- !strcmp (in_plugin->name, "flv") ||
- !strcmp (in_plugin->name, "mpc") ||
- !strcmp (in_plugin->name, "mpc8") ||
- !strcmp (in_plugin->name, "mpegts") ||
- !strcmp (in_plugin->name, "mpegtsraw") ||
- !strcmp (in_plugin->name, "mxf") ||
- !strcmp (in_plugin->name, "nuv") ||
- !strcmp (in_plugin->name, "swf") ||
- !strcmp (in_plugin->name, "voc") ||
- !strcmp (in_plugin->name, "pva") ||
- !strcmp (in_plugin->name, "gif") ||
- !strcmp (in_plugin->name, "vc1test") ||
- !strcmp (in_plugin->name, "ivf"))
- register_typefind_func = FALSE;
-
/* Set the rank of demuxers known to work to MARGINAL.
* Set demuxers for which we already have another implementation to NONE
* Set All others to NONE*/
@@ -2214,11 +2120,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
else
extensions = NULL;
- if (!gst_element_register (plugin, type_name, rank, type) ||
- (register_typefind_func == TRUE &&
- !gst_type_find_register (plugin, typefind_name, rank,
- gst_ffmpegdemux_type_find, extensions, NULL,
- (gpointer) in_plugin, NULL))) {
+ if (!gst_element_register (plugin, type_name, rank, type)) {
g_warning ("Registration of type %s failed", type_name);
g_free (type_name);
g_free (typefind_name);
--
GitLab
diff --git a/subprojects/gst-libav/ext/libav/gstavprotocol.c b/subprojects/gst-libav/ext/libav/gstavprotocol.c
index 249b240642..8537771143 100644
--- a/subprojects/gst-libav/ext/libav/gstavprotocol.c
+++ b/subprojects/gst-libav/ext/libav/gstavprotocol.c
@@ -102,7 +102,7 @@ gst_ffmpegdata_read (void *priv_data, unsigned char *buf, int size)
}
static int
-gst_ffmpegdata_write (void *priv_data, uint8_t * buf, int size)
+gst_ffmpegdata_write (void *priv_data, const uint8_t * buf, int size)
{
GstProtocolInfo *info;
GstBuffer *outbuf;
......@@ -28,7 +28,7 @@ pkgname=(
gstreamer-docs
)
pkgver=1.24.3
pkgrel=1
pkgrel=2
pkgdesc="Multimedia graph framework"
url="https://gstreamer.freedesktop.org/"
arch=(x86_64)
......@@ -81,11 +81,13 @@ source=(
"git+https://gitlab.freedesktop.org/gstreamer/gstreamer.git?signed#tag=$pkgver"
"https://gstreamer.freedesktop.org/src/gstreamer-docs/gstreamer-docs-$pkgver.tar.xz"{,.asc}
0001-HACK-meson-Disable-broken-tests.patch
0002-Fix-build-with-FFmpeg-7.patch
)
b2sums=('ba36061add5b081291b2f6a18b14e2c6cf1f2796b503bc7053e4c059f3d10620ece05b52590151f7e35f2e8919a0f2cfa3372ba24ff0a15beeb4d670c7df3ccd'
'118ad62b9e1072a8f1399c2984c74745c2c1572b9f244bd108b23821d2957bcb1938010f37ec3ab6ac4a40989dd6e54898b5ab669fd142891d4cba4c44b6fd9f'
'SKIP'
'e7c59c828883a3bb3aa47684d83b57cd4d463e1f8cffc0383f779fa60ecbe37bfa30c8a0f40e6b2a01f6e0edfbefc5b7041340837e0018741e5963671945a1f2')
'e7c59c828883a3bb3aa47684d83b57cd4d463e1f8cffc0383f779fa60ecbe37bfa30c8a0f40e6b2a01f6e0edfbefc5b7041340837e0018741e5963671945a1f2'
'696dd7a38465f96bf3e48f66c290febfdadd80a75637ee7b8a13929a773330560852cbe85c37bbf5d4cb821fec5d9ae4036e11ef528fe8cbbb93dfe16e723fdf')
validpgpkeys=(
D637032E45B8C6585B9456565D2EEE6F6F349D7C # Tim Müller <tim@gstreamer-foundation.org>
)
......@@ -95,6 +97,9 @@ prepare() {
# Disable broken tests
git apply -3 ../0001-HACK-meson-Disable-broken-tests.patch
# Fix build with FFmpeg 7
patch -p1 -i ../0002-Fix-build-with-FFmpeg-7.patch
}
build() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment