summaryrefslogtreecommitdiff
path: root/media-libs/qtav
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
commitde49812990871e1705b64051c35161d5e6400269 (patch)
tree5e1e8fcb0ff4579dbd22a1bfee28a6b97dc8aaeb /media-libs/qtav
parent536c3711867ec947c1738f2c4b96f22e4863322d (diff)
gentoo resync : 24.12.2018
Diffstat (limited to 'media-libs/qtav')
-rw-r--r--media-libs/qtav/Manifest5
-rw-r--r--media-libs/qtav/files/qtav-1.12.0-ffmpeg4-1.patch (renamed from media-libs/qtav/files/qtav-1.12.0-ffmpeg-4.patch)0
-rw-r--r--media-libs/qtav/files/qtav-1.12.0-ffmpeg4-2.patch119
-rw-r--r--media-libs/qtav/qtav-1.12.0.ebuild6
4 files changed, 125 insertions, 5 deletions
diff --git a/media-libs/qtav/Manifest b/media-libs/qtav/Manifest
index 66d3a0efa9e0..e05d3ea98fc4 100644
--- a/media-libs/qtav/Manifest
+++ b/media-libs/qtav/Manifest
@@ -1,6 +1,7 @@
-AUX qtav-1.12.0-ffmpeg-4.patch 1225 BLAKE2B 392c7290067aef2132e7024e268af250221b4138942c882b3c6955616f66561a067520f389731b53cc689e96cbbd43d1294a25efcdb4bdd61275f5d067a92014 SHA512 a46d37f00f92860d0b4e9d7c0bb2ec2aabf9517b39876b0ade58081955005eb8be7b4c18d16abcdaf98441c6179924b0bd1974041ede04467e7b7f5953a4fe8b
+AUX qtav-1.12.0-ffmpeg4-1.patch 1225 BLAKE2B 392c7290067aef2132e7024e268af250221b4138942c882b3c6955616f66561a067520f389731b53cc689e96cbbd43d1294a25efcdb4bdd61275f5d067a92014 SHA512 a46d37f00f92860d0b4e9d7c0bb2ec2aabf9517b39876b0ade58081955005eb8be7b4c18d16abcdaf98441c6179924b0bd1974041ede04467e7b7f5953a4fe8b
+AUX qtav-1.12.0-ffmpeg4-2.patch 5467 BLAKE2B b638548b1b66aeef0d10f381a2484528c93be1b14e6eb1099c36b77d9667ae4c20dd69279ba7e182da95be1e76048edac3e221f7a545563b2fe860d58814e0a0 SHA512 cc1c57444cae170498e2eff713c68106e3b829db3334f40a63530466a7a8c92532b41ee47a58e10676b8515929e6d3b5b1865c7842e3eaa676d7f89d820137c8
AUX qtav-1.12.0-multilib.patch 716 BLAKE2B 4cb5518cb14e91963e5371eafdf3f02452fb32add562a54e9d5eb17d3da603e6bdbcf2544ef60667390de0a44475d9b0457c8664f40b982162a569846b511adf SHA512 0b9db739ab6b4a23d653de56d993f44a6e8d108df3a635a2ebc822bdcc2ac1006643f31ceda8a94626a84aa8556b45ab5aa72aec20d990cf09e7396191bac3bb
DIST qtav-1.12.0-capi.h-b43aa93.xz 6120 BLAKE2B b2aca6c4ae70e227728bf908a7b5b9ad9fcb4ba52a254362eaaefaa9480c6a1c551bf47f02f8a44273952bf2816d2dbc7dc92142264892547d4fe602184b5fba SHA512 f5e458b157a5f343bc5d4133cfe45ffefb5c6cbb902b41ae6b9d9349e31ca7ac5a2746addc4fef89fb74856f5db7691cf174d82e88b51cc0b7a356c4fdab5aa7
DIST qtav-1.12.0.tar.gz 998117 BLAKE2B 85f8a470333e683353c305b06cec10f65b553c26b05fad4824d8f05f6aeb1fc2622ab8b60ba42a35260402a950bf41458e90342be6c53cbdb8400642c2d09741 SHA512 f273d10a4fe9126cd7d7b1293c087527bf898513e8add7958d905b6039b0c9c3891ea751c40e4c13ba683febff73912322953b151a131726ef8b44db199e0f32
-EBUILD qtav-1.12.0.ebuild 1428 BLAKE2B 55e9e1529bebd86adf2057136b57dfdcabe810694367d0f63e1be2587f514e0db38a61c7c0525f9e0e9ba92a1570e88cc818ad80ce774252a88e8cf46ae377e1 SHA512 4c12d4182ae82c3da68cd8c01b57d10defded1d41f17045638737d9633c3e7928ded02eeae083349bb5ccf350da5c34018f801461e32a99876d1b670e167c870
+EBUILD qtav-1.12.0.ebuild 1452 BLAKE2B 9002c43be94e25f31e50f8ad5d081cc6cbc824c245d84fe4fe843f2d8a21484c904b64f07b0d236a9f5d9aba18989e233d555f70d000547bc6a7f570411e6d5f SHA512 4c176409df4009c3b73d2461f738e8c7808906671b4628edebe598662631766b26a776cabec06104e6b3359c2c302a2a0ff7670dec8e1c438a1cc7f82f397ac1
MISC metadata.xml 389 BLAKE2B 6f4c10122acf9e5b30236f531b433ffc9cc46f9ddd6e6322bb5e17c70f60ba6ad0966eb93af1946a1df67e03cde1921ef24bad93fc115d5af84be848cbb04585 SHA512 145488dd0015ae2b014509610c33cf28e4e46e966bd37073d1199230297e66df520f3ac0afedd63c8eac20a7aa02ee492e5ad0658aa3b6fd660bd685b984161c
diff --git a/media-libs/qtav/files/qtav-1.12.0-ffmpeg-4.patch b/media-libs/qtav/files/qtav-1.12.0-ffmpeg4-1.patch
index cb77e9adebb2..cb77e9adebb2 100644
--- a/media-libs/qtav/files/qtav-1.12.0-ffmpeg-4.patch
+++ b/media-libs/qtav/files/qtav-1.12.0-ffmpeg4-1.patch
diff --git a/media-libs/qtav/files/qtav-1.12.0-ffmpeg4-2.patch b/media-libs/qtav/files/qtav-1.12.0-ffmpeg4-2.patch
new file mode 100644
index 000000000000..1f78acfde491
--- /dev/null
+++ b/media-libs/qtav/files/qtav-1.12.0-ffmpeg4-2.patch
@@ -0,0 +1,119 @@
+From 7f6929b49c25ca475a08f87e8b52aa1642d109dd Mon Sep 17 00:00:00 2001
+From: Felix Matouschek <felix@matouschek.org>
+Date: Sat, 11 Nov 2017 10:13:06 +0100
+Subject: [PATCH] Make QtAV build with newer versions of FFmpeg
+
+Some defines changed their name in newer versions of FFmpeg, this
+patch uses preprocessor instructions in AVCompat.h to use the
+correct define names. Also filter names retrieved by
+'avfilter_get_by_name' should be used as const variables in
+libavfilter versions starting at 7.0.0.
+---
+ src/AVMuxer.cpp | 2 +-
+ src/QtAV/private/AVCompat.h | 12 ++++++++++++
+ src/codec/audio/AudioEncoderFFmpeg.cpp | 4 ++--
+ src/codec/video/VideoEncoderFFmpeg.cpp | 2 +-
+ src/filter/LibAVFilter.cpp | 8 +++++++-
+ src/subtitle/SubtitleProcessorFFmpeg.cpp | 2 +-
+ 6 files changed, 24 insertions(+), 6 deletions(-)
+
+diff --git a/src/AVMuxer.cpp b/src/AVMuxer.cpp
+index 2f0b40d05..d2eb3dde8 100644
+--- a/src/AVMuxer.cpp
++++ b/src/AVMuxer.cpp
+@@ -124,7 +124,7 @@ AVStream *AVMuxer::Private::addStream(AVFormatContext* ctx, const QString &codec
+ c->time_base = s->time_base;
+ /* Some formats want stream headers to be separate. */
+ if (ctx->oformat->flags & AVFMT_GLOBALHEADER)
+- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ // expose avctx to encoder and set properties in encoder?
+ // list codecs for a given format in ui
+ return s;
+diff --git a/src/QtAV/private/AVCompat.h b/src/QtAV/private/AVCompat.h
+index e387868a8..6c38596d1 100644
+--- a/src/QtAV/private/AVCompat.h
++++ b/src/QtAV/private/AVCompat.h
+@@ -456,3 +456,15 @@ const char *get_codec_long_name(AVCodecID id);
+ } } while(0)
+
+ #endif //QTAV_COMPAT_H
++
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,33,0)
++#define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER
++#endif
++
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,56,100)
++#define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE
++#endif
++
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,56,100)
++#define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE
++#endif
+diff --git a/src/codec/audio/AudioEncoderFFmpeg.cpp b/src/codec/audio/AudioEncoderFFmpeg.cpp
+index a74f4f31d..3811e11a6 100644
+--- a/src/codec/audio/AudioEncoderFFmpeg.cpp
++++ b/src/codec/audio/AudioEncoderFFmpeg.cpp
+@@ -151,8 +151,8 @@ bool AudioEncoderFFmpegPrivate::open()
+ } else {
+ buffer_size = frame_size*format_used.bytesPerSample()*format_used.channels()*2+200;
+ }
+- if (buffer_size < FF_MIN_BUFFER_SIZE)
+- buffer_size = FF_MIN_BUFFER_SIZE;
++ if (buffer_size < AV_INPUT_BUFFER_MIN_SIZE)
++ buffer_size = AV_INPUT_BUFFER_MIN_SIZE;
+ buffer.resize(buffer_size);
+ return true;
+ }
+diff --git a/src/codec/video/VideoEncoderFFmpeg.cpp b/src/codec/video/VideoEncoderFFmpeg.cpp
+index 7c5ed42d0..671efa7d3 100644
+--- a/src/codec/video/VideoEncoderFFmpeg.cpp
++++ b/src/codec/video/VideoEncoderFFmpeg.cpp
+@@ -245,7 +245,7 @@ bool VideoEncoderFFmpegPrivate::open()
+ applyOptionsForContext();
+ AV_ENSURE_OK(avcodec_open2(avctx, codec, &dict), false);
+ // from mpv ao_lavc
+- const int buffer_size = qMax<int>(qMax<int>(width*height*6+200, FF_MIN_BUFFER_SIZE), sizeof(AVPicture));//??
++ const int buffer_size = qMax<int>(qMax<int>(width*height*6+200, AV_INPUT_BUFFER_MIN_SIZE), sizeof(AVPicture));//??
+ buffer.resize(buffer_size);
+ return true;
+ }
+diff --git a/src/filter/LibAVFilter.cpp b/src/filter/LibAVFilter.cpp
+index 191512040..8993a91f7 100644
+--- a/src/filter/LibAVFilter.cpp
++++ b/src/filter/LibAVFilter.cpp
+@@ -120,7 +120,10 @@ class LibAVFilter::Private
+ // pixel_aspect==sar, pixel_aspect is more compatible
+ QString buffersrc_args = args;
+ qDebug("buffersrc_args=%s", buffersrc_args.toUtf8().constData());
+- AVFilter *buffersrc = avfilter_get_by_name(video ? "buffer" : "abuffer");
++#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(7,0,0)
++ const
++#endif
++ AVFilter *buffersrc = avfilter_get_by_name(video ? "buffer" : "abuffer");
+ Q_ASSERT(buffersrc);
+ AV_ENSURE_OK(avfilter_graph_create_filter(&in_filter_ctx,
+ buffersrc,
+@@ -128,6 +131,9 @@ class LibAVFilter::Private
+ filter_graph)
+ , false);
+ /* buffer video sink: to terminate the filter chain. */
++#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(7,0,0)
++ const
++#endif
+ AVFilter *buffersink = avfilter_get_by_name(video ? "buffersink" : "abuffersink");
+ Q_ASSERT(buffersink);
+ AV_ENSURE_OK(avfilter_graph_create_filter(&out_filter_ctx, buffersink, "out",
+diff --git a/src/subtitle/SubtitleProcessorFFmpeg.cpp b/src/subtitle/SubtitleProcessorFFmpeg.cpp
+index 30ee9367c..1755c3816 100644
+--- a/src/subtitle/SubtitleProcessorFFmpeg.cpp
++++ b/src/subtitle/SubtitleProcessorFFmpeg.cpp
+@@ -249,7 +249,7 @@ bool SubtitleProcessorFFmpeg::processHeader(const QByteArray &codec, const QByte
+ codec_ctx->time_base.den = 1000;
+ if (!data.isEmpty()) {
+ av_free(codec_ctx->extradata);
+- codec_ctx->extradata = (uint8_t*)av_mallocz(data.size() + FF_INPUT_BUFFER_PADDING_SIZE);
++ codec_ctx->extradata = (uint8_t*)av_mallocz(data.size() + AV_INPUT_BUFFER_PADDING_SIZE);
+ if (!codec_ctx->extradata)
+ return false;
+ codec_ctx->extradata_size = data.size(); \ No newline at end of file
diff --git a/media-libs/qtav/qtav-1.12.0.ebuild b/media-libs/qtav/qtav-1.12.0.ebuild
index f3e1ff02cc1d..9f203d800ef2 100644
--- a/media-libs/qtav/qtav-1.12.0.ebuild
+++ b/media-libs/qtav/qtav-1.12.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -38,8 +38,8 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_PN}-${PV}"
PATCHES=(
- "${FILESDIR}/${P}-multilib.patch"
- "${FILESDIR}/${P}-ffmpeg-4.patch"
+ "${FILESDIR}"/${P}-multilib.patch
+ "${FILESDIR}"/${P}-ffmpeg4-{1,2}.patch # bugs 660852, 670765
)
src_prepare() {