diff options
author | Matteo Bernardini | 2024-02-01 10:22:26 +0100 |
---|---|---|
committer | Matteo Bernardini | 2024-04-20 17:26:08 +0200 |
commit | 4b0189b8f5080fd8245c313ed03375ab9e034fe9 (patch) | |
tree | 85515764474a9fcc9bf7ecfb93346053aff8c5d9 | |
parent | 7348664936073e3ad54706addd43560c23807ed8 (diff) | |
download | slackbuilds-gpac.tar.gz |
multimedia/gpac: Updated for version 2.2.1, patch for ffmpeg >= 6.x.gpac
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r-- | multimedia/gpac/README | 3 | ||||
-rw-r--r-- | multimedia/gpac/ffmpeg-6.patch | 51 | ||||
-rw-r--r-- | multimedia/gpac/gpac.SlackBuild | 40 | ||||
-rw-r--r-- | multimedia/gpac/gpac.info | 6 |
4 files changed, 62 insertions, 38 deletions
diff --git a/multimedia/gpac/README b/multimedia/gpac/README index 1e7c8f82a2..a2020a9bcb 100644 --- a/multimedia/gpac/README +++ b/multimedia/gpac/README @@ -1,6 +1,3 @@ GPAC is mainly used to package multimedia content for local or streaming playback. GPAC includes MP4Box utility which lets packaging of various audio and video codecs into mp4 container. - -Optional dependencies include the following: wxPython, js, faad2, -ffmpeg, xvidcore, jack, xulrunner and xmlrpc-c. diff --git a/multimedia/gpac/ffmpeg-6.patch b/multimedia/gpac/ffmpeg-6.patch new file mode 100644 index 0000000000..0e7c18299d --- /dev/null +++ b/multimedia/gpac/ffmpeg-6.patch @@ -0,0 +1,51 @@ +From ba14e34dd7a3c4cef5a56962898e9f863dd4b4f3 Mon Sep 17 00:00:00 2001 +From: jeanlf <jeanlf@gpac.io> +Date: Mon, 13 Mar 2023 09:43:52 +0100 +Subject: [PATCH] fixed compil with ffmpeg 6 - cf #2406 + +--- + src/filters/ff_mx.c | 20 ++++++++++++++++---- + 1 file changed, 16 insertions(+), 4 deletions(-) + +diff --git a/src/filters/ff_mx.c b/src/filters/ff_mx.c +index 34e5f59e7c..5cf1d98941 100644 +--- a/src/filters/ff_mx.c ++++ b/src/filters/ff_mx.c +@@ -503,7 +503,11 @@ static GF_Err ffmx_close_seg(GF_Filter *filter, GF_FFMuxCtx *ctx, Bool send_evt_ + evt.seg_size.is_init = 0; + } + evt.seg_size.media_range_start = ctx->offset_at_seg_start; ++#if LIBAVFORMAT_VERSION_MAJOR < 60 + evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->written-1) : 0; ++#else ++ evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->bytes_written-1) : 0; ++#endif + ctx->offset_at_seg_start = evt.seg_size.media_range_end; + + gf_filter_pid_send_event(pid, &evt); +@@ -1013,13 +1017,21 @@ static GF_Err ffmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_r + ff_codec_id = ffmpeg_codecid_from_gpac(codec_id, &ff_codec_tag); + } + ++ ++ res = 1; ++#if LIBAVFORMAT_VERSION_MAJOR < 60 + if (ctx->muxer->oformat && ctx->muxer->oformat->query_codec) { + res = ctx->muxer->oformat->query_codec(ff_codec_id, 1); +- if (!res) { +- GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name)); +- return GF_NOT_SUPPORTED; +- } + } ++#else ++ res = avformat_query_codec(ctx->muxer->oformat, ff_codec_id, FF_COMPLIANCE_NORMAL); ++#endif ++ ++ if (!res) { ++ GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name)); ++ return GF_NOT_SUPPORTED; ++ } ++ + const AVCodec *c = avcodec_find_decoder(ff_codec_id); + if (!c) return GF_NOT_SUPPORTED; + diff --git a/multimedia/gpac/gpac.SlackBuild b/multimedia/gpac/gpac.SlackBuild index 3d47f2be9d..e981e25b6a 100644 --- a/multimedia/gpac/gpac.SlackBuild +++ b/multimedia/gpac/gpac.SlackBuild @@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM="gpac" -VERSION=${VERSION:-1.0.1} +VERSION=${VERSION:-2.2.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -69,57 +69,33 @@ else LIBDIRSUFFIX="" fi -### wxwidgets support -if [ "${WX_SUPPORT:-no}" = "no" ]; then - wx_option="--disable-wx" -else - wx_option="--enable-wx" -fi - -if [ "${AMR:-no}" = "no" ]; then - amr_option="--disable-amr" -else - amr_option="--enable-amr" -fi - rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -fR $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION -chown -R root.root . +chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# configure doesn't have --libdir option. -sed -i "s/^libdir=\".*\"$/libdir=\"lib$LIBDIRSUFFIX\"/" configure +patch -p1 < $CWD/ffmpeg-6.patch ./configure \ --prefix=/usr \ + --libdir=lib$LIBDIRSUFFIX \ --mandir=/usr/man \ --disable-opt \ --enable-pic \ - --enable-pulseaudio \ --cpu=${ARCH} \ - --extra-cflags="$SLKCFLAGS" \ - $wx_option \ - $amr_option - -make -j1 -make install DESTDIR=$PKG -make install-lib DESTDIR=$PKG - -### remove $PKG/usr/share/gpac directory -### only contains gpac.mp4 file which -### doesn't seem to play with mplayer -#rm -fr $PKG/usr/share + --extra-cflags="$SLKCFLAGS" -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +make +make install DESTDIR=$PKG STRIP=true +make install-lib DESTDIR=$PKG STRIP=true find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done diff --git a/multimedia/gpac/gpac.info b/multimedia/gpac/gpac.info index 9b1adc7085..537f6fd8da 100644 --- a/multimedia/gpac/gpac.info +++ b/multimedia/gpac/gpac.info @@ -1,8 +1,8 @@ PRGNAM="gpac" -VERSION="1.0.1" +VERSION="2.2.1" HOMEPAGE="http://gpac.wp.mines-telecom.fr" -DOWNLOAD="https://github.com/gpac/gpac/archive/v1.0.1/gpac-1.0.1.tar.gz" -MD5SUM="52f6711e43a8d271ebec0c2ea2afab4a" +DOWNLOAD="https://github.com/gpac/gpac/archive/v2.2.1/gpac-2.2.1.tar.gz" +MD5SUM="a1a4a6c7f1525431b211b5ba47253ed0" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" |