[gentoo-commits] repo/gentoo:master commit in: media-libs/qtav/files/, media-libs/qtav/

2020-01-07 Thread Johannes Huber
commit: fc58ee0973adc018239f499f2715ef87de4a7857
Author: Johannes Huber  gentoo  org>
AuthorDate: Tue Jan  7 21:52:50 2020 +
Commit: Johannes Huber  gentoo  org>
CommitDate: Tue Jan  7 21:53:55 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc58ee09

media-libs/qtav: Fix build w/ Qt 5.14

Thanks-to: David Haller  dhaller.de>
Closes: https://bugs.gentoo.org/703560
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Johannes Huber  gentoo.org>

 media-libs/qtav/files/qtav-1.12.0-qt5.14.patch | 12 
 media-libs/qtav/qtav-1.12.0-r1.ebuild  |  1 +
 2 files changed, 13 insertions(+)

diff --git a/media-libs/qtav/files/qtav-1.12.0-qt5.14.patch 
b/media-libs/qtav/files/qtav-1.12.0-qt5.14.patch
new file mode 100644
index 000..bf546c9e068
--- /dev/null
+++ b/media-libs/qtav/files/qtav-1.12.0-qt5.14.patch
@@ -0,0 +1,12 @@
+diff -ub -purN -x '*~' a/qml/SGVideoNode.cpp b/qml/SGVideoNode.cpp
+--- a/qml/SGVideoNode.cpp  2017-06-21 03:47:15.0 +0200
 b/qml/SGVideoNode.cpp  2020-01-07 05:37:05.304897727 +0100
+@@ -25,6 +25,8 @@
+ #include "QtAV/VideoFrame.h"
+ #include 
+ #include 
++#include 
++#include 
+ #include 
+ 
+ // all in QSGRenderThread

diff --git a/media-libs/qtav/qtav-1.12.0-r1.ebuild 
b/media-libs/qtav/qtav-1.12.0-r1.ebuild
index 14df283f888..cac2cb20460 100644
--- a/media-libs/qtav/qtav-1.12.0-r1.ebuild
+++ b/media-libs/qtav/qtav-1.12.0-r1.ebuild
@@ -40,6 +40,7 @@ S="${WORKDIR}/${MY_PN}-${PV}"
 PATCHES=(
"${FILESDIR}"/${P}-multilib.patch
"${FILESDIR}"/${P}-ffmpeg4-{1,2}.patch # bugs 660852, 670765
+   "${FILESDIR}"/${P}-qt5.14.patch
 )
 
 src_prepare() {



[gentoo-commits] repo/gentoo:master commit in: media-libs/qtav/files/, media-libs/qtav/

2018-11-29 Thread Andreas Sturmlechner
commit: c55e93a8acc7eb98dbbc618b2f81f112d260cdf1
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Thu Nov 29 21:14:31 2018 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Thu Nov 29 21:19:53 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c55e93a8

media-libs/qtav: Fix build with ffmpeg-4

Thanks-to: Marco Genasci  gmail.com>
Closes: https://bugs.gentoo.org/670765
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 ...-ffmpeg-4.patch => qtav-1.12.0-ffmpeg4-1.patch} |   0
 media-libs/qtav/files/qtav-1.12.0-ffmpeg4-2.patch  | 119 +
 media-libs/qtav/qtav-1.12.0.ebuild |   6 +-
 3 files changed, 122 insertions(+), 3 deletions(-)

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
similarity index 100%
rename from media-libs/qtav/files/qtav-1.12.0-ffmpeg-4.patch
rename to 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 000..1f78acfde49
--- /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 
+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 
+ 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, ), false);
+ // from mpv ao_lavc
+-const int buffer_size = qMax(qMax(width*height*6+200, 
FF_MIN_BUFFER_SIZE), sizeof(AVPicture));//??
++const int buffer_size = qMax(qMax(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
+ //