summaryrefslogtreecommitdiff
path: root/media-video/ffdiaporama
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-video/ffdiaporama
reinit the tree, so we can have metadata
Diffstat (limited to 'media-video/ffdiaporama')
-rw-r--r--media-video/ffdiaporama/Manifest12
-rw-r--r--media-video/ffdiaporama/ffdiaporama-2.1-r1.ebuild77
-rw-r--r--media-video/ffdiaporama/ffdiaporama-2.1.ebuild77
-rw-r--r--media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-2.4.patch16
-rw-r--r--media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-3.0.patch196
-rw-r--r--media-video/ffdiaporama/files/ffdiaporama-2.1-libav10.patch427
-rw-r--r--media-video/ffdiaporama/metadata.xml47
7 files changed, 852 insertions, 0 deletions
diff --git a/media-video/ffdiaporama/Manifest b/media-video/ffdiaporama/Manifest
new file mode 100644
index 000000000000..36a80976cf3e
--- /dev/null
+++ b/media-video/ffdiaporama/Manifest
@@ -0,0 +1,12 @@
+AUX ffdiaporama-2.1-ffmpeg-2.4.patch 755 SHA256 dc51fb9fd5019d9e2c10723bd4220edc2cb4bfcae4cc65f5b4ba7fb6a6f71d0d SHA512 791a4885188536b4bfb5d4877783c887e1d457878c1d69d925c4e4257ae65864cc0a8eb1ab0063ea082ac13a57791147c16be80087b663fe81b1c8e68dbd8f38 WHIRLPOOL bb59de7483fb6cefd979d01f020571349896afd242def1f3fe3a979f0713227107bd8c825fadc43269d24022c9c9f5a5de160ea7baa6671072789438afe1f4c8
+AUX ffdiaporama-2.1-ffmpeg-3.0.patch 9617 SHA256 7cc7a3415704856743e3c858fdda61733a684abbf05825cd3b29dbeda50a2b8e SHA512 427df6b22b8c758d6e47a53de0219c1b84806cbb7b9bcdacff40e797e5d52fccd2f90ddba1aabe39f1c184628309d712ca521ad33bdabd0d07caead29b407399 WHIRLPOOL 9d43bb2e625920901fbcdc76cddf40fd4c5d2d541d9f0c544b004b1db61fc871354f3217bdcd0c74048cf6f25b7b02108eba34c19397995a5611dd4fba1fb079
+AUX ffdiaporama-2.1-libav10.patch 24734 SHA256 30fc17333071795aa5114dd4f1d6925b6890a1a83087fcbdf19010fb2c39074f SHA512 635dd967792159bfb5986eb97715aa46222029cbf3bcd5b58779b8894272728f2a422b4e73645ddc80f5d4cb1bc9a12ceccc06e160c72140571d2233e029b38b WHIRLPOOL 7ecabbc5895e7a24f79b1e5fe9f8dedf7c29dfbe6cc751bfb519c66d676d1b9afbdaa8e8b647727f08ccab828d0947042785848e2ff287d2ba2554881254bf87
+DIST ffdiaporama_bin_2.1.2014.0209.tar.gz 16063604 SHA256 a1f55367a3d915045a5f4ce5db20419c2e8ea26a8cd4d56bef2e3d525e55acaa SHA512 40fc40ae8f09d311dc615051bd0bc4573f1f9ab5abe06032e161b759194c772b43c337902baf9c5a1eb027796fcdecc2fc20dce5d998091e6ccf8f696149223d WHIRLPOOL 0cc1b7343bef904e6b89bda4d9fc17066ca1e9aff4beccf0a8b615c7e42a7a84d9cb7f582c6799bfc2e4a1398ad71f8398920ff1f57c2f60cf03ac12a66ce241
+DIST ffdiaporama_rsc_2.1.2014.0209.tar.gz 17669845 SHA256 965bb1506531f7b5214d9003019aff410107908f4837fe7f2a1fcbd2e55c4447 SHA512 910b2139eb1b97a86c8d795b65255f723e346b3b4ce805878835813f9b21c7b606f811488f9099003a0e0951006df6d32663f1d8be2ffe1c355cf9311ac4be19 WHIRLPOOL 1d9ecdb96df47785b146156c54ba1a9a80e3e5ec03b9ad9c4ca08bab17fd5738d20cf7a75247840c2c08af6feca75a14974f4602b8f73736080634644be15e9e
+DIST ffdiaporama_texturemate_1.0.2014.0125.tar.gz 30352923 SHA256 47ef9a0391baa4dd145a4c9c39590afb3c7a2857da4a8fa7c74bd081f52a0417 SHA512 e9aa9607d670a620b2e3c27d6ec5bf983eb31ab3d3139edf32ebb84d9ffa58b11c822f7db4b3f3c4a430b256719803df4a3a385bd467bdda09f8710d010eb2f5 WHIRLPOOL 00b22bfcaf6d5a698fe2d0f38d6578d027ca8451707bf49edecfca0ea6b181202e05cc5d13b32d9090825b4bde5eba509f1fd4e7a68d19dab7d2440b2eaa420e
+DIST openclipart-0.18-svgonly.tar.bz2 82108957 SHA256 57572d443439759b0347da95a5457f988048976c7e13d70a09894cdee412be29 SHA512 71ad11fd2e94f4c3d560ff0fa6e0cee70ec2c8506fd4c4d7a4b7a0db25480aaca9b36d0e91862cf05347be5caa614bfb528bdfdb151342e28efba31d9a8b0473 WHIRLPOOL 151dafd9ce46cdeb2a203bec3960a81043b9ee0ba5afe508b3090dd073ddbdd0cb96d29277e814dec2b7218d3017db9820aa7a429d91ecbf2ecb1f08fd28b664
+EBUILD ffdiaporama-2.1-r1.ebuild 2184 SHA256 4cde0c4000861f5e32449d99bb48bd29ffa5a58694c5b9ed7103a4134f157c15 SHA512 18fd2480af4b998f795b0a71339746e202273295859596689caefe463fe30b60693a0dd329d5a2677ca5bcd3e3b30b51da1d6a767665f34db7dd4c2851288049 WHIRLPOOL 97214938fa72659cc6f9f02bec4ff6617eb0001345087a1b36ca0056010af2c33264ab4d9fcaa25c11cbd0a7f02a4a52fa2538b4ae1a0dd2213cfcf8f15cdab2
+EBUILD ffdiaporama-2.1.ebuild 2163 SHA256 09dd963350d69ec45d76a7645e3bc445719375e93bbcb40f3e2bdb47bb9a45b9 SHA512 245ab88c90cda8da404778282003efd8253399988439b88766b647eb0bc3a37f5e6c1e843bc855194daf868097f4fc9fac26db5696cabaebe0d5a2d9bdd96a52 WHIRLPOOL 7d27875562efcaf3a074e4d6d42d92a9e5ab2e03249ea4c381b02d3261839eee6fee2954691a21e8160d6a754ceea7efbe69971aa50629b438a3be56be6e877e
+MISC ChangeLog 4503 SHA256 02ff43d0edb7642f02129511219d44725d66d1de7b275802cc8c925584654024 SHA512 8349ff330f16c6e531c308e13e656267054a600fc87a71da8724f72136371ccade71a13aafbc00d952c50080aa10ac29d9c4b6f3f5b7fc4f18debe2250b3c782 WHIRLPOOL ed8b4a26a1197c75620f86b6d8280548c4bb27babc03165fc3bbbb7cbba207e9eeffadd9ec21bb1d0f770deea842b0faa9c701afed29608c6e8b0b41ad4199b4
+MISC ChangeLog-2015 3834 SHA256 aa4e01cdbc5fac532c7ec58e27bee05511ea1c486f440b201bc4a4541474e5b0 SHA512 327567d8b1da2d5a5d18e7aa02564fa5486b7c777eeff19c3cf50f4e65c45f990a1dffb93bcf6ccbe474501ddb4b9ca8754b577f7805bef6f9d42db921586e33 WHIRLPOOL ea05156b43a771b1a433365b2375faed8befbc884837650661fce55b2b45666b9e898adb49c3a628c33628a1b0e62ba58a876a04b4e7d86069b2b41c14798f28
+MISC metadata.xml 2367 SHA256 0054e263a58361790872425b5adde9e2e7f722d9129da10d8c4baff82ef9a089 SHA512 aec9afe8cd31d8ec5c535d6219a4102b7f84705ed4180d6fd14c59eabace406c5e2cebcaf0ef635b078b6edd13c9ed032b5124ba0bd887181afaa068e1cdd6f2 WHIRLPOOL d07f8dc49c5d0e91fa835fa043a723ce8a64202278e4ee5dc73251007642122b6122c1d9ccbe287ebb88ee0760dea29fb9d92c5719d25801f4c05117ab384336
diff --git a/media-video/ffdiaporama/ffdiaporama-2.1-r1.ebuild b/media-video/ffdiaporama/ffdiaporama-2.1-r1.ebuild
new file mode 100644
index 000000000000..3c8b95d50b73
--- /dev/null
+++ b/media-video/ffdiaporama/ffdiaporama-2.1-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fdo-mime gnome2-utils qt4-r2
+
+BIN_PV=${PV}.2014.0209
+RSC_PV=${PV}.2014.0209
+TMT_PV=1.0.2014.0125
+OPENCLI_PV=0.18
+OPENCLI_P=openclipart-${OPENCLI_PV}
+DESCRIPTION="Movie creator from photos and video clips"
+HOMEPAGE="http://ffdiaporama.tuxfamily.org"
+SRC_URI="http://ffdiaporama.tuxfamily.org/script/GetPackage.php?f=${PN}_bin_${BIN_PV}.tar.gz -> ${PN}_bin_${BIN_PV}.tar.gz
+ http://ffdiaporama.tuxfamily.org/script/GetPackage.php?f=${PN}_rsc_${RSC_PV}.tar.gz -> ${PN}_rsc_${RSC_PV}.tar.gz
+ openclipart? ( http://openclipart.org/downloads/${OPENCLI_PV}/${OPENCLI_P}-svgonly.tar.bz2 )
+ texturemate? ( http://ffdiaporama.tuxfamily.org/script/GetPackage.php?f=${PN}_texturemate_${TMT_PV}.tar.gz -> ${PN}_texturemate_${TMT_PV}.tar.gz )"
+
+LICENSE="GPL-2
+ openclipart? ( CC0-1.0 )
+ texturemate? ( CC-BY-3.0 )"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="libav openclipart texturemate"
+
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qthelp:4
+ dev-qt/qtsql:4[sqlite]
+ dev-qt/qtsvg:4
+ media-gfx/exiv2
+ media-libs/libsdl[sound]
+ media-libs/taglib
+ !libav? ( >media-video/ffmpeg-1.2:0=[encode] )
+ libav? ( >=media-video/libav-9:0=[encode] )"
+DEPEND="${RDEPEND}"
+
+DOCS=( authors.txt )
+PATCHES=( "${FILESDIR}"/${P}-{ffmpeg-2.4,libav10,ffmpeg-3.0}.patch )
+
+S="${WORKDIR}/ffDiaporama"
+
+src_prepare() {
+ echo "SUBDIRS += ../ffDiaporama_rsc" >> ffDiaporama.pro || die
+ if use texturemate; then
+ echo "SUBDIRS += ../ffDiaporama_texturemate" >> ffDiaporama.pro || die
+ fi
+ qt4-r2_src_prepare
+}
+
+src_install() {
+ qt4-r2_src_install
+ doicon -s 32 ffdiaporama.png
+ if use openclipart; then
+ dodir /usr/share/ffDiaporama/clipart/openclipart
+ cd "${WORKDIR}"/${OPENCLI_P}-svgonly/clipart || die
+ find . -type d -maxdepth 1 -not -name . -exec cp -R '{}' "${D}"/usr/share/ffDiaporama/clipart/openclipart \; || die
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/ffdiaporama/ffdiaporama-2.1.ebuild b/media-video/ffdiaporama/ffdiaporama-2.1.ebuild
new file mode 100644
index 000000000000..48456601fcbe
--- /dev/null
+++ b/media-video/ffdiaporama/ffdiaporama-2.1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fdo-mime gnome2-utils qt4-r2
+
+BIN_PV=${PV}.2014.0209
+RSC_PV=${PV}.2014.0209
+TMT_PV=1.0.2014.0125
+OPENCLI_PV=0.18
+OPENCLI_P=openclipart-${OPENCLI_PV}
+DESCRIPTION="Movie creator from photos and video clips"
+HOMEPAGE="http://ffdiaporama.tuxfamily.org"
+SRC_URI="http://ffdiaporama.tuxfamily.org/script/GetPackage.php?f=${PN}_bin_${BIN_PV}.tar.gz -> ${PN}_bin_${BIN_PV}.tar.gz
+ http://ffdiaporama.tuxfamily.org/script/GetPackage.php?f=${PN}_rsc_${RSC_PV}.tar.gz -> ${PN}_rsc_${RSC_PV}.tar.gz
+ openclipart? ( http://openclipart.org/downloads/${OPENCLI_PV}/${OPENCLI_P}-svgonly.tar.bz2 )
+ texturemate? ( http://ffdiaporama.tuxfamily.org/script/GetPackage.php?f=${PN}_texturemate_${TMT_PV}.tar.gz -> ${PN}_texturemate_${TMT_PV}.tar.gz )"
+
+LICENSE="GPL-2
+ openclipart? ( CC0-1.0 )
+ texturemate? ( CC-BY-3.0 )"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="libav openclipart texturemate"
+
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qthelp:4
+ dev-qt/qtsql:4[sqlite]
+ dev-qt/qtsvg:4
+ media-gfx/exiv2
+ media-libs/libsdl[sound]
+ media-libs/taglib
+ !libav? ( >media-video/ffmpeg-1.2:0=[encode] )
+ libav? ( >=media-video/libav-9:0=[encode] )"
+DEPEND="${RDEPEND}"
+
+DOCS=( authors.txt )
+PATCHES=( "${FILESDIR}"/${P}-ffmpeg-2.4.patch )
+
+S="${WORKDIR}/ffDiaporama"
+
+src_prepare() {
+ echo "SUBDIRS += ../ffDiaporama_rsc" >> ffDiaporama.pro || die
+ if use texturemate; then
+ echo "SUBDIRS += ../ffDiaporama_texturemate" >> ffDiaporama.pro || die
+ fi
+ qt4-r2_src_prepare
+}
+
+src_install() {
+ qt4-r2_src_install
+ doicon -s 32 ffdiaporama.png
+ if use openclipart; then
+ dodir /usr/share/ffDiaporama/clipart/openclipart
+ cd "${WORKDIR}"/${OPENCLI_P}-svgonly/clipart || die
+ find . -type d -maxdepth 1 -not -name . -exec cp -R '{}' "${D}"/usr/share/ffDiaporama/clipart/openclipart \; || die
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-2.4.patch b/media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-2.4.patch
new file mode 100644
index 000000000000..7a8e664add37
--- /dev/null
+++ b/media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-2.4.patch
@@ -0,0 +1,16 @@
+--- src/ffDiaporama/engine/cDeviceModelDef.h 2015-02-14 10:02:12.592365100 +0100
++++ src/ffDiaporama/engine/cDeviceModelDef.h 2015-02-14 10:01:59.202463800 +0100
+@@ -84,7 +84,12 @@
+ #elif (LIBAVUTIL_VERSION_MICRO>=100)&&(LIBAVCODEC_VERSION_MICRO>=100)&&(LIBAVFORMAT_VERSION_MICRO>=100)&&(LIBAVDEVICE_VERSION_MICRO>=100)&&(LIBAVFILTER_VERSION_MICRO>=100)&&(LIBSWSCALE_VERSION_MICRO>=100)
+ #define FFMPEG
+ #include "libswresample/swresample.h"
+- #define RESAMPLE_MAX_CHANNELS SWR_CH_MAX
++ #ifdef SWR_CH_MAX
++ #define RESAMPLE_MAX_CHANNELS SWR_CH_MAX
++ #else
++ #define RESAMPLE_MAX_CHANNELS 32
++ #endif
++
+ #include "libavfilter/avcodec.h"
+ #include "libavfilter/buffersink.h"
+ #include "libavfilter/buffersrc.h"
diff --git a/media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-3.0.patch b/media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-3.0.patch
new file mode 100644
index 000000000000..4eb8c9704235
--- /dev/null
+++ b/media-video/ffdiaporama/files/ffdiaporama-2.1-ffmpeg-3.0.patch
@@ -0,0 +1,196 @@
+--- src/ffDiaporama/engine/cBaseMediaFile.cpp 2014-02-09 10:48:04.000000000 +0100
++++ src/ffDiaporama/engine/cBaseMediaFile.cpp 2016-02-21 19:00:43.129114600 +0100
+@@ -113,10 +113,23 @@
+ #define VC_USERDATA 0x00000008
+ #define VC_FLUSHED 0x00000010
+
+-#define PIXFMT PIX_FMT_RGB24
++#if (defined(FFMPEG)&&(FFMPEGVERSIONINT>=300))
++ #define PIXELFORMAT AVPixelFormat
++ #define PIXFMT AV_PIX_FMT_RGB24
++#else
++ #define PIXELFORMAT PixelFormat
++ #define PIXFMT PIX_FMT_RGB24
++#endif
+ #define QTPIXFMT QImage::Format_RGB888
+
+-AVFrame *ALLOCFRAME() { return avcodec_alloc_frame(); }
++AVFrame *ALLOCFRAME() { return
++ #if (defined(FFMPEG)&&(FFMPEGVERSIONINT>=300))
++ av_frame_alloc();
++ #else
++ avcodec_alloc_frame();
++ #endif
++}
++
+ void FREEFRAME(AVFrame **Buf){ avcodec_free_frame(Buf); *Buf=NULL; }
+
+ //****************************************************************************************************************************************************************
+@@ -2402,7 +2415,7 @@
+ AVFrame *FrameRGB=ALLOCFRAME();
+ if ((FrameRGB)&&(!Thumbnail.isNull())) {
+ avpicture_fill((AVPicture *)FrameRGB,Thumbnail.bits(),PIXFMT,RealW,RealH);
+- struct SwsContext *img_convert_ctx=sws_getContext(FrameYUV->width,FrameYUV->height,(PixelFormat)FrameYUV->format,RealW,RealH,PIXFMT,SWS_FAST_BILINEAR,NULL,NULL,NULL);
++ struct SwsContext *img_convert_ctx=sws_getContext(FrameYUV->width,FrameYUV->height,(PIXELFORMAT)FrameYUV->format,RealW,RealH,PIXFMT,SWS_FAST_BILINEAR,NULL,NULL,NULL);
+ if (img_convert_ctx!=NULL) {
+ int ret = sws_scale(img_convert_ctx,FrameYUV->data,FrameYUV->linesize,0,FrameYUV->height,FrameRGB->data,FrameRGB->linesize);
+ if (ret>0) {
+@@ -3482,7 +3495,7 @@
+ struct SwsContext *img_convert_ctx=sws_getContext(
+ Frame->width, // Src width
+ Frame->height, // Src height
+- (PixelFormat)Frame->format, // Src Format
++ (PIXELFORMAT)Frame->format, // Src Format
+ W, // Destination width
+ H, // Destination height
+ PIXFMT, // Destination Format
+--- src/ffDiaporama/engine/cDeviceModelDef.h 2016-02-21 19:53:00.487286000 +0100
++++ src/ffDiaporama/engine/cDeviceModelDef.h 2016-02-21 19:52:47.623287800 +0100
+@@ -53,7 +53,9 @@
+
+ #include <libavutil/mathematics.h>
+ #include <libavutil/pixdesc.h>
+-#include <libavutil/audioconvert.h>
++#if (LIBAVUTIL_VERSION_INT<AV_VERSION_INT(54,31,100))
++ #include <libavutil/audioconvert.h>
++#endif
+
+ #include <libavcodec/avcodec.h>
+
+@@ -90,10 +92,10 @@
+ #define RESAMPLE_MAX_CHANNELS 32
+ #endif
+
+- #include "libavfilter/avcodec.h"
+- #include "libavfilter/buffersink.h"
+- #include "libavfilter/buffersrc.h"
+- #if ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(52,48,100))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(55,39,100))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(55,19,104))&&(LIBAVDEVICE_VERSION_INT>=AV_VERSION_INT(55,5,100))&&(LIBAVFILTER_VERSION_INT>=AV_VERSION_INT(3,90,100))&&(LIBSWSCALE_VERSION_INT>=AV_VERSION_INT(2,5,101))&&(LIBSWRESAMPLE_VERSION_INT>=AV_VERSION_INT(0,17,104)))
++ #if ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(55,17,103))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(57,24,102))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(57,25,100))&&(LIBAVDEVICE_VERSION_INT>=AV_VERSION_INT(57,0,101))&&(LIBAVFILTER_VERSION_INT>=AV_VERSION_INT(6,31,100))&&(LIBSWSCALE_VERSION_INT>=AV_VERSION_INT(4,0,100))&&(LIBSWRESAMPLE_VERSION_INT>=AV_VERSION_INT(2,0,101)))
++ #define FFMPEGVERSIONINT 300
++ #define FFMPEGVERSION "FFmpeg 3.0 or higher"
++ #elif ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(52,48,100))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(55,39,100))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(55,19,104))&&(LIBAVDEVICE_VERSION_INT>=AV_VERSION_INT(55,5,100))&&(LIBAVFILTER_VERSION_INT>=AV_VERSION_INT(3,90,100))&&(LIBSWSCALE_VERSION_INT>=AV_VERSION_INT(2,5,101))&&(LIBSWRESAMPLE_VERSION_INT>=AV_VERSION_INT(0,17,104)))
+ #define FFMPEGVERSIONINT 210
+ #define FFMPEGVERSION "FFmpeg 2.1 or higher"
+ #elif ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(52,38,100))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(55,18,102))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(55,12,100))&&(LIBAVDEVICE_VERSION_INT>=AV_VERSION_INT(55,3,100))&&(LIBAVFILTER_VERSION_INT>=AV_VERSION_INT(3,79,101))&&(LIBSWSCALE_VERSION_INT>=AV_VERSION_INT(2,3,100))&&(LIBSWRESAMPLE_VERSION_INT>=AV_VERSION_INT(0,17,102)))
+@@ -108,6 +110,13 @@
+ #else
+ // unsupported version
+ #endif
++ #if (FFMPEGVERSIONINT<300)
++ #include "libavfilter/avcodec.h"
++ #else
++ #include "libavcodec/avcodec.h"
++ #endif
++ #include "libavfilter/buffersink.h"
++ #include "libavfilter/buffersrc.h"
+ #endif
+ }
+
+--- src/ffDiaporama/engine/_EncodeVideo.cpp 2016-02-22 08:19:13.935794200 +0100
++++ src/ffDiaporama/engine/_EncodeVideo.cpp 2016-02-22 08:33:52.928215900 +0100
+@@ -20,7 +20,11 @@
+
+ #include "_EncodeVideo.h"
+
+-#define PIXFMT PIX_FMT_RGB24
++#if (defined(FFMPEG)&&(FFMPEGVERSIONINT>=300))
++ #define PIXFMT AV_PIX_FMT_RGB24
++#else
++ #define PIXFMT PIX_FMT_RGB24
++#endif
+ #define QTPIXFMT QImage::Format_RGB888
+
+ //*************************************************************************************************************************************************
+@@ -410,8 +414,13 @@
+ // Setup codec parameters
+ VideoStream->codec->width =ImageWidth;
+ VideoStream->codec->height =ImageHeight;
++ #if (defined(FFMPEG)&&(FFMPEGVERSIONINT>=300))
++ VideoStream->codec->pix_fmt =AV_PIX_FMT_YUV420P;
++ #else
+ VideoStream->codec->pix_fmt =PIX_FMT_YUV420P;
++ #endif
+ VideoStream->codec->time_base =VideoFrameRate;
++ VideoStream->time_base =VideoFrameRate;
+ VideoStream->codec->sample_aspect_ratio =PixelAspectRatio;
+ VideoStream->sample_aspect_ratio =PixelAspectRatio;
+ if ((codec->id!=AV_CODEC_ID_H264)||(!VBR)) {
+@@ -434,7 +443,11 @@
+
+ } else if (codec->id==AV_CODEC_ID_MJPEG) {
+ //-qscale 2 -qmin 2 -qmax 2
++ #if (defined(FFMPEG)&&(FFMPEGVERSIONINT>=300))
++ VideoStream->codec->pix_fmt =AV_PIX_FMT_YUVJ420P;
++ #else
+ VideoStream->codec->pix_fmt =PIX_FMT_YUVJ420P;
++ #endif
+ VideoStream->codec->qmin =2;
+ VideoStream->codec->qmax =2;
+ VideoStream->codec->bit_rate_tolerance =(ImageWidth*ImageHeight*2*VideoFrameRate.den/VideoFrameRate.num)*2;
+@@ -564,7 +577,11 @@
+ #endif
+
+ // Create and prepare VideoFrame and VideoFrameBuf
+- VideoFrame=avcodec_alloc_frame(); // Allocate structure for RGB image
++ #if (defined(FFMPEG)&&(FFMPEGVERSIONINT>=300))
++ VideoFrame=av_frame_alloc();
++ #else
++ VideoFrame=avcodec_alloc_frame();
++ #endif
+ if (!VideoFrame) {
+ ToLog(LOGMSG_CRITICAL,"EncodeVideo-OpenVideoStream: avcodec_alloc_frame() failed");
+ return false;
+@@ -654,7 +671,11 @@
+ return false;
+ }
+
++ #if (defined(FFMPEG)&&(FFMPEGVERSIONINT>=300))
++ AudioFrame=av_frame_alloc();
++ #else
+ AudioFrame=avcodec_alloc_frame();
++ #endif
+ if (AudioFrame==NULL) {
+ ToLog(LOGMSG_CRITICAL,QString("EncodeVideo-OpenAudioStream:: avcodec_alloc_frame failed"));
+ return false;
+@@ -1095,7 +1116,11 @@
+ if (Continue) {
+ // Init AudioFrame
+ AVRational AVR;
++ #if (defined(FFMPEG)&&(FFMPEGVERSIONINT>=300))
++ av_frame_unref(AudioFrame);
++ #else
+ avcodec_get_frame_defaults(AudioFrame);
++ #endif
+ AVR.num =1;
+ AVR.den =AudioStream->codec->sample_rate;
+ AudioFrame->nb_samples =DestPacketSize/DestSampleSize;
+@@ -1180,7 +1205,11 @@
+ int errcode;
+
+ if (Image) {
+- avcodec_get_frame_defaults(VideoFrame);
++ #if (defined(FFMPEG)&&(FFMPEGVERSIONINT>=300))
++ av_frame_unref(AudioFrame);
++ #else
++ avcodec_get_frame_defaults(AudioFrame);
++ #endif
+ if (avpicture_fill(
+ (AVPicture *)VideoFrame, // Frame to prepare
+ VideoFrameBuf, // Buffer which will contain the image data
+@@ -1225,9 +1254,14 @@
+ }
+ }
+
+- if ((VideoFrameNbr%VideoStream->codec->gop_size)==0) VideoFrame->pict_type=AV_PICTURE_TYPE_I;
+- else VideoFrame->pict_type=(AVPictureType)0;
++ if ((VideoFrameNbr%VideoStream->codec->gop_size)==0)
++ VideoFrame->pict_type=AV_PICTURE_TYPE_I;
++ else
++ VideoFrame->pict_type=(AVPictureType)0;
+ VideoFrame->pts=VideoFrameNbr;
++ VideoFrame->format=VideoStream->codec->pix_fmt;
++ VideoFrame->width=VideoStream->codec->width;
++ VideoFrame->height=VideoStream->codec->height;
+
+ if ((Continue)&&(!StopProcessWanted)) {
+
diff --git a/media-video/ffdiaporama/files/ffdiaporama-2.1-libav10.patch b/media-video/ffdiaporama/files/ffdiaporama-2.1-libav10.patch
new file mode 100644
index 000000000000..1b607ba6c66f
--- /dev/null
+++ b/media-video/ffdiaporama/files/ffdiaporama-2.1-libav10.patch
@@ -0,0 +1,427 @@
+--- src/ffDiaporama/engine/cBaseMediaFile.cpp 2014-02-09 10:48:04.000000000 +0100
++++ src/ffDiaporama/engine/cBaseMediaFile.cpp 2015-03-29 00:20:56.672641700 +0100
+@@ -1861,12 +1861,12 @@
+ }
+
+ cImageInCache::~cImageInCache() {
+- #if defined(LIBAV) || (defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
++ #if (defined(LIBAV)&&(LIBAVVERSIONINT<=9) || defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
+ if (FrameBufferYUV->opaque) {
+ avfilter_unref_buffer((AVFilterBufferRef *)FrameBufferYUV->opaque);
+ FrameBufferYUV->opaque=NULL;
+ }
+- #elif defined(FFMPEG) && (FFMPEGVERSIONINT>=201)
++ #else
+ if (FiltFrame) {
+ av_frame_unref(FiltFrame);
+ av_frame_free(&FiltFrame);
+@@ -2239,7 +2239,7 @@
+ LibavFile->streams[VideoStreamNumber]->discard=AVDISCARD_DEFAULT; // Setup STREAM options
+
+ // Setup decoder options
+- LibavFile->streams[VideoStreamNumber]->codec->debug_mv =0; // Debug level (0=nothing)
++ //LibavFile->streams[VideoStreamNumber]->codec->debug_mv =0; // Debug level (0=nothing)
+ LibavFile->streams[VideoStreamNumber]->codec->debug =0; // Debug level (0=nothing)
+ LibavFile->streams[VideoStreamNumber]->codec->workaround_bugs =1; // Work around bugs in encoders which sometimes cannot be detected automatically : 1=autodetection
+ LibavFile->streams[VideoStreamNumber]->codec->idct_algo =FF_IDCT_AUTO; // IDCT algorithm, 0=auto
+@@ -2256,12 +2256,12 @@
+ if (avcodec_open2(LibavFile->streams[VideoStreamNumber]->codec,Codec,NULL)>=0) {
+ // Get Aspect Ratio
+
+- AspectRatio=double(LibavFile->streams[VideoStreamNumber]->codec->sample_aspect_ratio.num)/double(LibavFile->streams[VideoStreamNumber]->codec->sample_aspect_ratio.den);
+-
+- if (LibavFile->streams[VideoStreamNumber]->sample_aspect_ratio.num!=0)
++ if (LibavFile->streams[VideoStreamNumber]->codec->sample_aspect_ratio.num!=0)
++ AspectRatio=double(LibavFile->streams[VideoStreamNumber]->codec->sample_aspect_ratio.num)/double(LibavFile->streams[VideoStreamNumber]->codec->sample_aspect_ratio.den);
++ else if (LibavFile->streams[VideoStreamNumber]->sample_aspect_ratio.num!=0)
+ AspectRatio=double(LibavFile->streams[VideoStreamNumber]->sample_aspect_ratio.num)/double(LibavFile->streams[VideoStreamNumber]->sample_aspect_ratio.den);
+-
+- if (AspectRatio==0) AspectRatio=1;
++ else
++ AspectRatio=1;
+
+ // Special case for DVD mode video without PAR
+ if ((AspectRatio==1)&&(LibavFile->streams[VideoStreamNumber]->codec->coded_width==720)&&((LibavFile->streams[VideoStreamNumber]->codec->coded_height==576)||(LibavFile->streams[VideoStreamNumber]->codec->coded_height==480)))
+@@ -2384,7 +2384,7 @@
+ AVCodec *ThumbDecoderCodec=avcodec_find_decoder(ThumbStream->codec->codec_id);
+
+ // Setup decoder options
+- ThumbStream->codec->debug_mv =0; // Debug level (0=nothing)
++ //ThumbStream->codec->debug_mv =0; // Debug level (0=nothing)
+ ThumbStream->codec->debug =0; // Debug level (0=nothing)
+ ThumbStream->codec->workaround_bugs =1; // Work around bugs in encoders which sometimes cannot be detected automatically : 1=autodetection
+ ThumbStream->codec->idct_algo =FF_IDCT_AUTO; // IDCT algorithm, 0=auto
+@@ -2552,7 +2552,7 @@
+ }
+
+ if (FrameBufferYUV!=NULL) {
+- #if defined(LIBAV) || (defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
++ #if (defined(LIBAV)&&(LIBAVVERSIONINT<=9) || defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
+ if (FrameBufferYUV->opaque) {
+ avfilter_unref_buffer((AVFilterBufferRef *)FrameBufferYUV->opaque);
+ FrameBufferYUV->opaque=NULL;
+@@ -2572,7 +2572,7 @@
+ if (RSC) {
+ #if defined(LIBAV) && (LIBAVVERSIONINT<=8)
+ audio_resample_close(RSC);
+- #elif defined(LIBAV) && (LIBAVVERSIONINT<=9)
++ #elif defined(LIBAV)
+ avresample_close(RSC);
+ avresample_free(&RSC);
+ #elif defined(FFMPEG)
+@@ -2619,7 +2619,7 @@
+ 1, // linear
+ 0); // cutoff
+ if (!RSC) ToLog(LOGMSG_CRITICAL,QString("CheckResampler: av_audio_resample_init failed"));
+- #elif defined(LIBAV) && (LIBAVVERSIONINT<=9)
++ #elif defined(LIBAV)
+ this->RSC_InChannelLayout =RSC_InChannelLayout;
+ this->RSC_OutChannelLayout=RSC_OutChannelLayout;
+ RSC=avresample_alloc_context();
+@@ -2704,7 +2704,7 @@
+ AVFilterInOut *outputs = (AVFilterInOut *)av_malloc(sizeof(AVFilterInOut));
+ AVFilterInOut *inputs = (AVFilterInOut *)av_malloc(sizeof(AVFilterInOut));
+
+- #elif defined(LIBAV) && (LIBAVVERSIONINT<=9)
++ #elif defined(LIBAV)
+
+ QString args=QString("%1:%2:%3:%4:%5:%6:%7")
+ .arg(LibavVideoFile->streams[VideoStreamNumber]->codec->width)
+@@ -2768,10 +2768,8 @@
+ inputs->pad_idx = 0;
+ inputs->next = NULL;
+
+- #if defined(LIBAV) && (LIBAVVERSIONINT<=8)
++ #if defined(LIBAV)
+ if ((result=avfilter_graph_parse(VideoFilterGraph,QString("yadif=1:-1").toLocal8Bit().constData(),inputs,outputs,NULL))<0) {
+- #elif (defined(LIBAV) && (LIBAVVERSIONINT<=9))
+- if ((result=avfilter_graph_parse(VideoFilterGraph,QString("yadif=deint=interlaced:mode=send_frame:parity=auto").toLocal8Bit().constData(),inputs,outputs,NULL))<0) {
+ #elif (defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
+ if ((result=avfilter_graph_parse(VideoFilterGraph,QString("yadif=deint=interlaced:mode=send_frame:parity=auto").toLocal8Bit().constData(),&inputs,&outputs,NULL))<0) {
+ #elif defined(FFMPEG)&&(FFMPEGVERSIONINT>=201)
+@@ -2799,7 +2797,7 @@
+
+ //====================================================================================================================
+
+-#if defined(LIBAV) || (FFMPEGVERSIONINT<201)
++#if (defined(LIBAV)&&(LIBAVVERSIONINT<=9) || defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
+ int cVideoFile::VideoFilter_Process() {
+ #if defined(LIBAV) && (LIBAVVERSIONINT<=8)
+ // LIBAV 8
+@@ -2831,7 +2829,7 @@
+ FrameBufferYUV->opaque=(void *)avfilter_ref_buffer(VideoFilterOut->inputs[0]->cur_buf,AV_PERM_READ);
+ }
+
+- #elif defined(LIBAV) && (LIBAVVERSIONINT<=9)
++ #elif defined(LIBAV)
+ // LIBAV9
+ AVFilterBufferRef *m_pBufferRef=NULL;
+ int Ret=av_buffersrc_write_frame(VideoFilterIn,FrameBufferYUV);
+@@ -2964,7 +2962,7 @@
+ #if defined(LIBAV) && (LIBAVVERSIONINT<=8)
+ Data=(u_int8_t *)av_malloc(MaxAudioLenDecoded);
+ if (Data) *SizeDecoded=audio_resample(RSC,(short int*)Data,(short int*)Frame->data[0],Frame->nb_samples)*DstSampleSize;
+- #elif defined(LIBAV) && (LIBAVVERSIONINT<=9)
++ #elif defined(LIBAV)
+ u_int8_t *in_data[RESAMPLE_MAX_CHANNELS]={0};
+ int in_linesize=0;
+ Data=Frame->data[0];
+@@ -2979,7 +2977,7 @@
+ } else if (av_samples_fill_arrays(out_data,&out_linesize,Data,RSC_OutChannels,out_samples,RSC_OutSampleFmt,1)<0) {
+ ToLog(LOGMSG_CRITICAL,QString("failed out_data fill arrays"));
+ } else {
+- *SizeDecoded=avresample_convert(RSC,out_data,out_linesize,out_samples,in_data,in_linesize,Frame->nb_samples)*DstSampleSize;
++ *SizeDecoded=avresample_convert(RSC,out_data,out_linesize,out_samples,Frame->data,in_linesize,Frame->nb_samples)*DstSampleSize;
+ }
+ }
+ #elif defined(FFMPEG)
+@@ -3024,7 +3022,7 @@
+
+ if (!FPSDuration) {
+ if (PreviewMode) FPSDuration=double(AV_TIME_BASE)/((cApplicationConfig *)ApplicationConfig)->PreviewFPS;
+- else if (VideoStream) FPSDuration=double(VideoStream->r_frame_rate.den*AV_TIME_BASE)/double(VideoStream->r_frame_rate.num);
++ else if (VideoStream) FPSDuration=double(VideoStream->avg_frame_rate.den*AV_TIME_BASE)/double(VideoStream->avg_frame_rate.num);
+ else FPSDuration=double(AV_TIME_BASE)/double(SoundTrackBloc->SamplingRate);
+ }
+ // If position >= end of file : disable audio
+@@ -3164,7 +3162,7 @@
+ Data=Frame->data[0];
+ #if (defined(LIBAV)&&(LIBAVVERSIONINT<=8))
+ SizeDecoded=Frame->nb_samples*av_get_bytes_per_sample(AudioStream->codec->sample_fmt)*AudioStream->codec->channels;
+- #elif (defined(LIBAV)&&(LIBAVVERSIONINT<=9))
++ #elif defined(LIBAV)
+ SizeDecoded=av_samples_get_buffer_size(NULL,AudioStream->codec->channels,Frame->nb_samples,AudioStream->codec->sample_fmt,0);
+ #elif defined(FFMPEG)
+ SizeDecoded=Frame->nb_samples*av_get_bytes_per_sample(AudioStream->codec->sample_fmt)*AudioStream->codec->channels;
+@@ -3290,7 +3288,7 @@
+ if (FrameBufferYUV==NULL) FrameBufferYUV=ALLOCFRAME();
+ if (FrameBufferYUV) {
+
+- #if defined(LIBAV) || (defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
++ #if (defined(LIBAV)&&(LIBAVVERSIONINT<=9) || defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
+ if (FrameBufferYUV->opaque) {
+ avfilter_unref_buffer((AVFilterBufferRef *)FrameBufferYUV->opaque);
+ FrameBufferYUV->opaque=NULL;
+@@ -3324,14 +3322,14 @@
+ if ((Deinterlace)&&(!VideoFilterGraph)) VideoFilter_Open();
+ else if ((!Deinterlace)&&(VideoFilterGraph)) VideoFilter_Close();
+
+- #if defined(LIBAV) || (defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
++ #if (defined(LIBAV)&&(LIBAVVERSIONINT<=9) || defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
+ if (VideoFilterGraph) VideoFilter_Process();
+- #elif defined(FFMPEG)&&(FFMPEGVERSIONINT>=201)
++ #elif (defined(LIBAV)&&(LIBAVVERSIONINT>=10) || defined(FFMPEG)&&(FFMPEGVERSIONINT>=201))
+ AVFrame *FiltFrame=NULL;
+ if (VideoFilterGraph) {
+- // FFMPEG 2.0
++ // FFMPEG 2.0 / LIBAV 10
+ // push the decoded frame into the filtergraph
+- if (av_buffersrc_add_frame_flags(VideoFilterIn,FrameBufferYUV,AV_BUFFERSRC_FLAG_KEEP_REF)<0) {
++ if (av_buffersrc_write_frame(VideoFilterIn,FrameBufferYUV)<0) {
+ ToLog(LOGMSG_INFORMATION,"IN:cVideoFile::ReadFrame : Error while feeding the filtergraph");
+ } else {
+ FiltFrame=av_frame_alloc();
+@@ -3364,7 +3362,7 @@
+
+ // Append this frame
+ cImageInCache *ObjImage=
+- #if defined(LIBAV) || (defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
++ #if (defined(LIBAV)&&(LIBAVVERSIONINT<=9) || defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
+ new cImageInCache(FrameBufferYUVPosition,NULL,FrameBufferYUV);
+ #else
+ new cImageInCache(FrameBufferYUVPosition,FiltFrame,FrameBufferYUV);
+@@ -3386,7 +3384,7 @@
+ IsVideoFind=Nbr>0;
+ }
+ if (FreeFrames) {
+- #if defined(LIBAV) || (defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
++ #if (defined(LIBAV)&&(LIBAVVERSIONINT<=9) || defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
+ if (FrameBufferYUV->opaque) {
+ avfilter_unref_buffer((AVFilterBufferRef *)FrameBufferYUV->opaque);
+ FrameBufferYUV->opaque=NULL;
+@@ -3401,7 +3399,7 @@
+ FREEFRAME(&FrameBufferYUV);
+ } else {
+ FrameBufferYUV=NULL;
+- #if defined(FFMPEG)&&(FFMPEGVERSIONINT>=201)
++ #if (defined(FFMPEG)&&(FFMPEGVERSIONINT>=201) || defined(LIBAV)&&(LIBAVVERSIONINT>=10))
+ FiltFrame =NULL;
+ #endif
+ }
+@@ -3490,7 +3488,7 @@
+
+ if (img_convert_ctx!=NULL) {
+ int ret;
+- #if defined(LIBAV) || (defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
++ #if (defined(LIBAV)&&(LIBAVVERSIONINT<=9) || defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
+ if (Frame->opaque) {
+ AVFilterBufferRef *Buf=(AVFilterBufferRef *)Frame->opaque;
+ ret = sws_scale(
+@@ -3565,12 +3563,12 @@
+ int cVideoFile::getThreadFlags(AVCodecID ID) {
+ int Ret=0;
+ switch (ID) {
+- case CODEC_ID_PRORES:
+- case CODEC_ID_MPEG1VIDEO:
+- case CODEC_ID_DVVIDEO:
+- case CODEC_ID_MPEG2VIDEO: Ret=FF_THREAD_SLICE; break;
+- case CODEC_ID_H264 : Ret=FF_THREAD_FRAME|FF_THREAD_SLICE; break;
+- default: Ret=FF_THREAD_FRAME; break;
++ case AV_CODEC_ID_PRORES:
++ case AV_CODEC_ID_MPEG1VIDEO:
++ case AV_CODEC_ID_DVVIDEO:
++ case AV_CODEC_ID_MPEG2VIDEO: Ret=FF_THREAD_SLICE; break;
++ case AV_CODEC_ID_H264 : Ret=FF_THREAD_FRAME|FF_THREAD_SLICE; break;
++ default: Ret=FF_THREAD_FRAME; break;
+ }
+ return Ret;
+ }
+@@ -3607,7 +3605,7 @@
+ AudioDecoderCodec=avcodec_find_decoder(AudioStream->codec->codec_id);
+
+ // Setup decoder options
+- AudioStream->codec->debug_mv =0; // Debug level (0=nothing)
++ //AudioStream->codec->debug_mv =0; // Debug level (0=nothing)
+ AudioStream->codec->debug =0; // Debug level (0=nothing)
+ AudioStream->codec->workaround_bugs =1; // Work around bugs in encoders which sometimes cannot be detected automatically : 1=autodetection
+ AudioStream->codec->idct_algo =FF_IDCT_AUTO; // IDCT algorithm, 0=auto
+@@ -3648,7 +3646,7 @@
+ VideoDecoderCodec=avcodec_find_decoder(VideoStream->codec->codec_id);
+
+ // Setup decoder options
+- VideoStream->codec->debug_mv =0; // Debug level (0=nothing)
++ //VideoStream->codec->debug_mv =0; // Debug level (0=nothing)
+ VideoStream->codec->debug =0; // Debug level (0=nothing)
+ VideoStream->codec->workaround_bugs =1; // Work around bugs in encoders which sometimes cannot be detected automatically : 1=autodetection
+ VideoStream->codec->idct_algo =FF_IDCT_AUTO; // IDCT algorithm, 0=auto
+@@ -3662,7 +3660,19 @@
+ // Hack to correct wrong frame rates that seem to be generated by some codecs
+ if (VideoStream->codec->time_base.num>1000 && VideoStream->codec->time_base.den==1)
+ VideoStream->codec->time_base.den=1000;
+-
++
++ if (VideoStream->codec->time_base.num == 0) {
++ VideoStream->codec->time_base.num = VideoStream->avg_frame_rate.den;
++ VideoStream->codec->time_base.den = VideoStream->avg_frame_rate.num;
++ }
++
++ if (VideoStream->codec->sample_aspect_ratio.num == 0) {
++ if (VideoStream->sample_aspect_ratio.num == 0)
++ VideoStream->codec->sample_aspect_ratio.num = VideoStream->codec->sample_aspect_ratio.den = 1;
++ else
++ VideoStream->codec->sample_aspect_ratio = VideoStream->sample_aspect_ratio;
++ }
++
+ if ((VideoDecoderCodec==NULL)||(avcodec_open2(VideoStream->codec,VideoDecoderCodec,NULL)<0)) return false;
+ LibavStartTime=LibavVideoFile->start_time;
+ }
+
+--- src/ffDiaporama/engine/cBaseMediaFile.h 2014-02-09 10:48:04.000000000 +0100
++++ src/ffDiaporama/engine/cBaseMediaFile.h 2015-03-29 00:14:35.225871600 +0100
+@@ -429,7 +429,7 @@
+
+ virtual int VideoFilter_Open();
+ virtual void VideoFilter_Close();
+- #if defined(LIBAV) || (FFMPEGVERSIONINT<201)
++ #if (defined(LIBAV)&&(LIBAVVERSIONINT<=9) || defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
+ virtual int VideoFilter_Process();
+ #endif
+
+@@ -444,7 +444,7 @@
+ // Audio resampling
+ #if defined(LIBAV) && (LIBAVVERSIONINT<=8)
+ ReSampleContext *RSC;
+- #elif defined(LIBAV) && (LIBAVVERSIONINT<=9)
++ #elif defined(LIBAV)
+ AVAudioResampleContext *RSC;
+ uint64_t RSC_InChannelLayout,RSC_OutChannelLayout;
+ #elif defined(FFMPEG)
+
+--- src/ffDiaporama/engine/cDeviceModelDef.h 2014-02-09 10:48:04.000000000 +0100
++++ src/ffDiaporama/engine/cDeviceModelDef.h 2015-03-28 23:57:31.667562500 +0100
+@@ -65,7 +65,14 @@
+
+ #if (LIBAVUTIL_VERSION_MICRO<100)&&(LIBAVCODEC_VERSION_MICRO<100)&&(LIBAVFORMAT_VERSION_MICRO<100)&&(LIBAVDEVICE_VERSION_MICRO<100)&&(LIBAVFILTER_VERSION_MICRO<100)&&(LIBSWSCALE_VERSION_MICRO<100)
+ #define LIBAV
+- #if ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(52,3,0))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(54,35,0))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(54,20,0))&&(LIBAVDEVICE_VERSION_INT>=AV_VERSION_INT(53,2,0))&&(LIBAVFILTER_VERSION_INT>=AV_VERSION_INT(3,3,0))&&(LIBSWSCALE_VERSION_INT>=AV_VERSION_INT(2,1,1)))
++ #if ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(53,3,0))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(55,34,1))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(55,12,0))&&(LIBAVDEVICE_VERSION_INT>=AV_VERSION_INT(54,0,0))&&(LIBAVFILTER_VERSION_INT>=AV_VERSION_INT(4,2,0))&&(LIBSWSCALE_VERSION_INT>=AV_VERSION_INT(2,1,2)))
++ #define LIBAVVERSION "Libav 10 or higher"
++ #define LIBAVVERSIONINT 10
++ #include "libavresample/avresample.h"
++ #define RESAMPLE_MAX_CHANNELS AVRESAMPLE_MAX_CHANNELS
++ #include "libavfilter/buffersink.h"
++ #include "libavfilter/buffersrc.h"
++ #elif ((LIBAVUTIL_VERSION_INT>=AV_VERSION_INT(52,3,0))&&(LIBAVCODEC_VERSION_INT>=AV_VERSION_INT(54,35,0))&&(LIBAVFORMAT_VERSION_INT>=AV_VERSION_INT(54,20,0))&&(LIBAVDEVICE_VERSION_INT>=AV_VERSION_INT(53,2,0))&&(LIBAVFILTER_VERSION_INT>=AV_VERSION_INT(3,3,0))&&(LIBSWSCALE_VERSION_INT>=AV_VERSION_INT(2,1,1)))
+ #define LIBAVVERSION "Libav 9.x"
+ #define LIBAVVERSIONINT 9
+ #include "libavresample/avresample.h"
+@@ -110,7 +117,7 @@
+ #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
+ #endif
+
+-#if !defined(FF_API_CODEC_ID)
++#if (LIBAVCODEC_VERSION_MAJOR < 55)
+ #define AV_CODEC_ID_NONE CODEC_ID_NONE
+ #define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG
+ #define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
+@@ -133,6 +140,9 @@
+ #define AV_CODEC_ID_FLAC CODEC_ID_FLAC
+ #define AV_CODEC_ID_WMAV1 CODEC_ID_WMAV1
+ #define AV_CODEC_ID_WMAV2 CODEC_ID_WMAV2
++ #define AV_CODEC_ID_PRORES CODEC_ID_PRORES
++ #define AV_CODEC_ID_MPEG1VIDEO CODEC_ID_MPEG1VIDEO
++ #define AV_CODEC_ID_DVVIDEO CODEC_ID_DVVIDEO
+ #endif
+
+ #if !defined(avcodec_free_frame)
+
+--- src/ffDiaporama/engine/_EncodeVideo.cpp 2014-02-09 10:48:04.000000000 +0100
++++ src/ffDiaporama/engine/_EncodeVideo.cpp 2015-03-29 00:23:23.090780000 +0100
+@@ -136,7 +136,7 @@
+ av_freep(&Container->streams[i]->codec->extradata);
+ av_freep(&Container->streams[i]->codec->subtitle_header);
+ av_freep(&Container->streams[i]->priv_data);
+- if (Container->streams[i]->info) av_freep(&Container->streams[i]->info->duration_error);
++ //if (Container->streams[i]->info) av_freep(&Container->streams[i]->info->duration_error);
+ }
+ //=== End of patch
+ avformat_free_context(Container);
+@@ -151,7 +151,7 @@
+ if (AudioResampler) {
+ #if defined(LIBAV) && (LIBAVVERSIONINT<=8)
+ audio_resample_close(AudioResampler);
+- #elif defined(LIBAV) && (LIBAVVERSIONINT<=9)
++ #elif defined(LIBAV)
+ avresample_close(AudioResampler);
+ avresample_free(&AudioResampler);
+ #elif defined(FFMPEG)
+@@ -185,12 +185,12 @@
+ int cEncodeVideo::getThreadFlags(AVCodecID ID) {
+ int Ret=0;
+ switch (ID) {
+- case CODEC_ID_PRORES:
+- case CODEC_ID_MPEG1VIDEO:
+- case CODEC_ID_DVVIDEO:
+- case CODEC_ID_MPEG2VIDEO: Ret=FF_THREAD_SLICE; break;
+- case CODEC_ID_H264 : Ret=FF_THREAD_FRAME|FF_THREAD_SLICE; break;
+- default: Ret=FF_THREAD_FRAME; break;
++ case AV_CODEC_ID_PRORES:
++ case AV_CODEC_ID_MPEG1VIDEO:
++ case AV_CODEC_ID_DVVIDEO:
++ case AV_CODEC_ID_MPEG2VIDEO: Ret=FF_THREAD_SLICE; break;
++ case AV_CODEC_ID_H264 : Ret=FF_THREAD_FRAME|FF_THREAD_SLICE; break;
++ default: Ret=FF_THREAD_FRAME; break;
+ }
+ return Ret;
+ }
+@@ -789,7 +789,7 @@
+ Continue=false;
+ }
+ }
+- #elif defined(LIBAV) && (LIBAVVERSIONINT<=9)
++ #elif defined(LIBAV)
+ if ((AudioStream->codec->sample_fmt!=ToEncodeMusic.SampleFormat)||(AudioStream->codec->channels!=ToEncodeMusic.Channels)||(AudioSampleRate!=ToEncodeMusic.SamplingRate)) {
+ if (!AudioResamplerBuffer) {
+ int out_linesize=0;
+@@ -857,7 +857,7 @@
+ }
+
+ // Define InterleaveFrame to not compute it for each frame
+- #if defined(FFMPEG)&&(FFMPEGVERSIONINT>=201)
++ #if (defined(FFMPEG)&&(FFMPEGVERSIONINT>=201) || (LIBAVVERSIONINT >=10))
+ InterleaveFrame=(strcmp(Container->oformat->name,"avi")!=0);
+ #else
+ InterleaveFrame=true;
+@@ -1038,7 +1038,7 @@
+ } else {
+ #if defined(LIBAV) && (LIBAVVERSIONINT<=8)
+ DestPacket=(u_int8_t *)PacketSound;
+- #elif defined(LIBAV) && (LIBAVVERSIONINT<=9)
++ #elif defined(LIBAV)
+ // LIBAV 9 => Convert sample format (is needed)
+ if ((AudioResampler!=NULL)&&(AudioResamplerBuffer!=NULL)) {
+ DestPacket=AudioResamplerBuffer;
+
+--- src/ffDiaporama/engine/_EncodeVideo.h 2014-02-09 10:48:04.000000000 +0100
++++ src/ffDiaporama/engine/_EncodeVideo.h 2015-03-29 00:22:10.452192800 +0100
+@@ -82,7 +82,7 @@
+ int AudioResamplerBufferSize;
+ #if defined(LIBAV) && (LIBAVVERSIONINT<=8)
+ ReSampleContext *AudioResampler; // Audio resampler
+- #elif defined(LIBAV) && (LIBAVVERSIONINT<=9)
++ #elif defined(LIBAV)
+ AVAudioResampleContext *AudioResampler;
+ #elif defined(FFMPEG)
+ SwrContext *AudioResampler;
+
+--- src/ffDiaporama/MainWindow/mainwindow.cpp 2014-02-09 10:48:08.000000000 +0100
++++ src/ffDiaporama/MainWindow/mainwindow.cpp 2015-03-29 00:00:47.710860800 +0100
+@@ -472,7 +472,7 @@
+ delete ApplicationConfig;
+
+ // Close some libav additionnals
+- #if defined(LIBAV) || (defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
++ #if (defined(LIBAV)&&(LIBAVVERSIONINT<=9) || defined(FFMPEG)&&(FFMPEGVERSIONINT<201))
+ avfilter_uninit();
+ #endif
+ avformat_network_deinit();
diff --git a/media-video/ffdiaporama/metadata.xml b/media-video/ffdiaporama/metadata.xml
new file mode 100644
index 000000000000..6b20ac540fec
--- /dev/null
+++ b/media-video/ffdiaporama/metadata.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>olivier.laurantin@laposte.net</email>
+ <name>Olivier Laurantin</name>
+ <description>Proxy maintainer. CC him on bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <changelog>http://ffdiaporama.tuxfamily.org/?page_id=7266&amp;lang=en</changelog>
+ <doc lang="en">http://ffdiaporama.tuxfamily.org/?page_id=6268</doc>
+ <bugs-to>http://ffdiaporama.tuxfamily.org/Forum/viewforum.php?id=4</bugs-to>
+ </upstream>
+ <longdescription lang="en">
+ffDiaporama is an application for creating video sequences consisting of
+
+ - titles, fixed or animated.
+ - images or photos, fixed or animated.
+ - movie clips
+ - music
+
+These sequences are assembled into a slide show by means of transitions to produce complete videos
+The following options are available:
+
+
+ - Reframing of images and photos
+ - Cutting of video clips
+ - Adding text, notes to images, photos, sequences and animations
+ - Graphical filters on the images and the videos (conversion into black and white, dust removal, equalization of colors, etc.)
+ - Creation of animation by zoom, rotation or Ken Burns Effect on images or photos
+ - Correction of the images and the videos during animations (luminosity, contrast, gamma, colors, etc.)
+ - Transitions between sequences with definition of the transition type, sequence by sequence.
+ - Addition of a background sound (wav, mp3 or ogg) with customizable effects for volume, fade in/out and passage in pause, sequence by sequence.
+ - Generation of videos usable on most current video equipment (DVD player/smartphone, multimedia box, hard drive, etc.) but also publishable on the main video-sharing Websites (YouTube, Dailymotion, etc.)
+ - Video formats from QVGA (320×240) to Full HD (1920×1080) by way of the DVD and HD 720 formats.
+ - Image geometry (aspect ratio) : 4:3, 16:9 or 2.35:1 (cinema)
+ - Possible formats for rendering : avi, mpg, mp4, mkv
+ </longdescription>
+ <use>
+ <flag name="openclipart">Support openslipart database</flag>
+ <flag name="texturemate">Install extra backgrounds</flag>
+ </use>
+</pkgmetadata>