summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2013-03-03 14:18:49 +0000
committerAlexis Ballier <aballier@gentoo.org>2013-03-03 14:18:49 +0000
commit1e513d30a58e151bc7e3879ac8b965ccf0d7b4aa (patch)
tree9a2189db60a500e4948e29d8741ad124a3d66734 /app-cdr/k9copy
parentFix building with gcc-4.7 wrt #423045 by Diego Elio Pettenò <flameeyes@gento... (diff)
downloadhistorical-1e513d30a58e151bc7e3879ac8b965ccf0d7b4aa.tar.gz
historical-1e513d30a58e151bc7e3879ac8b965ccf0d7b4aa.tar.bz2
historical-1e513d30a58e151bc7e3879ac8b965ccf0d7b4aa.zip
Import slackware patch to build with recent ffmpeg versions and port the patch from backlite to properly include ffmpeg headers, bug #459980
Package-Manager: portage-2.2.0_alpha164/cvs/Linux x86_64 Manifest-Sign-Key: 0x160F534A
Diffstat (limited to 'app-cdr/k9copy')
-rw-r--r--app-cdr/k9copy/ChangeLog10
-rw-r--r--app-cdr/k9copy/Manifest18
-rw-r--r--app-cdr/k9copy/files/k9copy-2.3.8-ffmpeg-0.11.patch567
-rw-r--r--app-cdr/k9copy/files/k9copy-2.3.8-includepaths.patch182
-rw-r--r--app-cdr/k9copy/k9copy-2.3.8.ebuild9
5 files changed, 772 insertions, 14 deletions
diff --git a/app-cdr/k9copy/ChangeLog b/app-cdr/k9copy/ChangeLog
index 9070b6f4bb60..9173471b6a73 100644
--- a/app-cdr/k9copy/ChangeLog
+++ b/app-cdr/k9copy/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-cdr/k9copy
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-cdr/k9copy/ChangeLog,v 1.72 2012/07/12 12:10:38 kensington Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/k9copy/ChangeLog,v 1.73 2013/03/03 14:18:45 aballier Exp $
+
+ 03 Mar 2013; Alexis Ballier <aballier@gentoo.org> k9copy-2.3.8.ebuild,
+ +files/k9copy-2.3.8-ffmpeg-0.11.patch,
+ +files/k9copy-2.3.8-includepaths.patch:
+ Import slackware patch to build with recent ffmpeg versions and port the
+ patch from backlite to properly include ffmpeg headers, bug #459980
12 Jul 2012; Michael Palimaka <kensington@gentoo.org> metadata.xml:
Cleanup metadata.
diff --git a/app-cdr/k9copy/Manifest b/app-cdr/k9copy/Manifest
index 3352a42a2354..7a68030144dd 100644
--- a/app-cdr/k9copy/Manifest
+++ b/app-cdr/k9copy/Manifest
@@ -1,18 +1,16 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
+AUX k9copy-2.3.8-ffmpeg-0.11.patch 32790 SHA256 802ce26aa0369880dbdba5128a264e64b0165b6d61d847cb0331a4c4e6c21452 SHA512 2a50c858f37b0734a6340137123210fadd2454c2ccbf4de81f5acb071914b3384961cbcaf8c189f3bb04b6f17479872daccbbdbce76838e2991a07278239d409 WHIRLPOOL 80299e36b6ec649ba70aacda8a3a215f53d3b92c53ed8d5ecc1a3d0aa9ecd455c3cdf398b30c7ad505e1015e3cfc79b3c99329db8e84734387429787f71a6526
+AUX k9copy-2.3.8-includepaths.patch 7244 SHA256 c021e49dfe57bc1152a79c197f3f0a8b53539e54ce76d54f2e96e3706fb0445b SHA512 d1a08f588b87691492aef0eab4183ec4dcd11adaa9fadf40ca5b26d74ed6c8bf5cb6c4a4c1e4ee8e04897c568ecf349deeafd17238f542a163d67df3354070ba WHIRLPOOL 4c8d88159c1804f3aeae1065517fc144f03d93810b11d9e23a4ef4ad3b75ed9c8324c7a596a7d8a34a2e721015ee5be3bd4845040952824065f65a72d31ad335
DIST k9copy-2.3.8-Source.tar.gz 1589535 SHA256 cf5e2d9faf7821561e478ed1fc9b63bbcc3448405d7b7866f68b018d16b42fdf SHA512 b914e67040ad8abc0537dc8fc1e7d8cc0d6e8b1dae38dbde8dbadf6c0408b040582bac6c53129f26e520bfd106ad1ab8c9079efe12562438ff2dfcb11053fd0c WHIRLPOOL 476a76aedafc3a8f69f7a0dd91e90a8f27c6db8e6771827b9d2c5007fa94ba765d30d294ff5039a31322bb5bb7465c771185dc23eb25b17c674773b2d4c28e10
-EBUILD k9copy-2.3.8.ebuild 1195 SHA256 ebdf7c0e226322c9e39048d9bcab05ea2392fbd05a92d75516ddb8ec46bfc006 SHA512 cfe49a937e3cb0b2e241049b7cd9ab0fa4dc7389fb23d17f5e5e4523c3319c472bd26e7beafd49179325353db9127d780cb853506b5a9b20b01ced7fb6def629 WHIRLPOOL da80889bc978b790ec462c486514baae64760e7b46810269f9a54a7f5447f0d4de4ecb592206c1a827d0271761d5fa508917f7cc49e2c28270e19431139e5841
-MISC ChangeLog 11533 SHA256 8b3a5d9f8b4eacd5234b3c841a023a8f4abb4bdfaa066e53571d610910bd2006 SHA512 7ccfc8319bd8223d0ebb5c0fce9a2057fb58e587c1728846d8b6673b936c53ec73a9daec18279d4d9ef598373c41f7c3a6459f7876b105177cddc0ca0a3de626 WHIRLPOOL 612103336cae5eab93d97d7d9ac84bf7b18af516dc2040e4436cacc2ec9da94ff53454cb2c77c516504fc7afee1556c2e78110b4505d18fc8c56a18766ddc475
+EBUILD k9copy-2.3.8.ebuild 1285 SHA256 1308ba1b8e87ec8d944eec1d76ff2b39aa183762bb08f4ab3e9719bf6f8708ab SHA512 ab22b837ac93df61ef12a2fcde108ed86987c4cbd2300c81dc392b662c3d9890e37d0d6ebde87cb087e80b30f2fcc2e09f5ca199fb5ff59e07d9d3a6909320c4 WHIRLPOOL a9faf77c87f3e9e0966315976d35da47acc6774c88dcb4d4652302ae659109752c4f548bb0c60b3b1dcdac048546a7addd239221d69a8b7630ec2f40a96b53df
+MISC ChangeLog 11833 SHA256 a8a70879b4f2d45fe8f487b5d7c0e9f612e14e08477c75abb0b1e16ac9bc31f6 SHA512 4fd5500d78191140830dec73f026d1d928645a4ebf9e4562add11132c20be08c0f2922356862219826d31ba98d1b041660191d68645d9b5a0957e271dd06c827 WHIRLPOOL c8f3e9af01e00c23fbfe51c5e1196811afd42514ec198c4bfcdf5f497207dec2be0068a70f616e599bc3b60c0c016d2daa7cc240c89bdf40c8ee3b4839162773
MISC metadata.xml 253 SHA256 5c86893d38bcac7b7e4947e480b7de87bacbf7c89ee86292f0b6c8796ff2a090 SHA512 591f752bed18b5451b795ffff9b3f246feb0202d3f5e7215fe285381af1626b6d4aba0d45a0245f0c0c1cec5172c574ee40ce2cded3b1b0686a73869df2fae6c WHIRLPOOL d52ea8d68e513e574e8748097d277cb39f845e589dc2cfc7d81ac4c6707c2f29fc4de66866f29726c24856dab69241c0ba86a3c996a8e53a6f309a52131a376d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQEcBAEBAgAGBQJP/r67AAoJEMbwO6tnXQ0sOogIAJx9VA7/obsFO+8hTsA2UOUS
-wSX54RxP5z0KoZTxQxOxgb7NesKrRa9OXrAZsiGFQdsxWwNA4E72M9Jkif8NAA86
-4eR1/dfkxjBJnpbfSm1gVJs5urMp+pNJq/oLxJM/Dk1hQPsaOqkirWJsFBejtuyK
-VLtUmZ0FDs71YpJY1JHdJZNK0Y2VSJRRwnZQBQXuquttKlKj7Q6nbSGX3fB3cDoG
-9Algtcxk1Shr/Fpp7dYXEg7G8rqpeuQ6hwFEt1sS6+Fli9qqL3RTHswHroOsaprO
-kMT44r1pPuNMSUDofs+klGRy/xclMgEaiVhmrtqMsu6vyizWBxJoVYLyOw2c3Sc=
-=XYYH
+iEYEAREIAAYFAlEzW8YACgkQvFcC4BYPU0rKlgCgya5pSsoOzVuVuA/ebTt3dhLP
+lPUAnjtcxx5vcN76+ER7KB2LxSlBcEWn
+=VDT8
-----END PGP SIGNATURE-----
diff --git a/app-cdr/k9copy/files/k9copy-2.3.8-ffmpeg-0.11.patch b/app-cdr/k9copy/files/k9copy-2.3.8-ffmpeg-0.11.patch
new file mode 100644
index 000000000000..eb41fa03d84d
--- /dev/null
+++ b/app-cdr/k9copy/files/k9copy-2.3.8-ffmpeg-0.11.patch
@@ -0,0 +1,567 @@
+Fix build with ffmpeg-0.11 and later.
+
+From slackware:
+http://www.slackware.org.uk/slackbuilds.org/14.0/multimedia/k9copy/
+https://bugs.gentoo.org/show_bug.cgi?id=459980
+
+diff -Nru k9copy-2.3.8-Source.orig/CMakeLists.txt k9copy-2.3.8-Source/CMakeLists.txt
+--- k9copy-2.3.8-Source.orig/CMakeLists.txt 2011-12-09 22:08:41.000000000 +0100
++++ k9copy-2.3.8-Source/CMakeLists.txt 2012-11-23 10:12:56.000000000 +0100
+@@ -18,6 +18,7 @@
+ INCLUDE(FindXine)
+ INCLUDE(FindAvcodec)
+ INCLUDE(FindAvformat)
++INCLUDE(FindAvutil)
+ INCLUDE(FindFFmpegScale)
+ #INCLUDE(FindLibDvdread)
+
+@@ -68,6 +69,7 @@
+
+ FINDAVFORMAT("avformat")
+ FINDAVCODEC("avcodec")
++FINDAVUTIL("avutil")
+
+ add_definitions( -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS)
+ add_subdirectory( src/dvdnav)
+@@ -103,6 +105,7 @@
+ #${LIBDVDREAD_INCLUDE_DIR}/dvdread
+ ${AVCODEC_INCLUDE_DIR}
+ ${AVFORMAT_INCLUDE_DIR}
++ ${AVUTIL_INCLUDE_DIR}
+ ${FFMPEGSCALE_INCLUDE_DIR}
+ ${FFMPEG_INCLUDE_DIR}
+ )
+diff -Nru k9copy-2.3.8-Source.orig/cmake/FindAvutil.cmake k9copy-2.3.8-Source/cmake/FindAvutil.cmake
+--- k9copy-2.3.8-Source.orig/cmake/FindAvutil.cmake 1970-01-01 01:00:00.000000000 +0100
++++ k9copy-2.3.8-Source/cmake/FindAvutil.cmake 2012-11-23 10:12:56.000000000 +0100
+@@ -0,0 +1,35 @@
++MACRO (FINDAVUTIL _lib)
++
++FIND_PATH(AVUTIL_INCLUDE_DIR_FF "ffmpeg/avutil.h" PATHS)
++IF (AVUTIL_INCLUDE_DIR_FF)
++ SET (AVUTIL_INCLUDE_DIR "${AVCODEC_INCLUDE_DIR_FF}/ffmpeg")
++ELSE (AVUTIL_INCLUDE_DIR_FF)
++ FIND_PATH(AVUTIL_INCLUDE_DIR_LAVC "libavutil/avutil.h" PATHS)
++ IF (AVUTIL_INCLUDE_DIR_LAVC)
++ SET (AVUTIL_INCLUDE_DIR "${AVUTIL_INCLUDE_DIR_LAVC}/libavutil")
++ ELSE (AVUTIL_INCLUDE_DIR_LAVC)
++ FIND_PATH(AVUTIL_INCLUDE_DIR_FF_LAVF "ffmpeg/libavutil/avutil.h" PATHS)
++ IF (AVUTIL_INCLUDE_DIR_FF_LAVF)
++ SET (AVUTIL_INCLUDE_DIR "${AVUTIL_INCLUDE_DIR_FF_LAVF}/ffmpeg/libavutil")
++ ENDIF (AVUTIL_INCLUDE_DIR_FF_LAVF)
++ ENDIF (AVUTIL_INCLUDE_DIR_LAVC)
++ENDIF (AVUTIL_INCLUDE_DIR_FF)
++
++
++
++FIND_LIBRARY(AVUTIL_LIBRARY NAMES ${_lib} PATHS )
++
++IF (AVUTIL_INCLUDE_DIR AND AVUTIL_LIBRARY)
++ SET(INC_FOUND TRUE)
++ELSE (AVUTIL_INCLUDE_DIR AND AVUTIL_LIBRARY)
++ SET(INC_FOUND FALSE)
++ENDIF (AVUTIL_INCLUDE_DIR AND AVUTIL_LIBRARY)
++
++
++IF (INC_FOUND)
++ MESSAGE(STATUS "Found include avutil.h: ${AVUTIL_INCLUDE_DIR}")
++ MESSAGE(STATUS "Found library ${_lib}: ${AVUTIL_LIBRARY}")
++ELSE (INC_FOUND)
++ MESSAGE(FATAL_ERROR "Could not find ${_lib}")
++ENDIF (INC_FOUND)
++ENDMACRO (FINDAVUTIL _lib )
+\ No newline at end of file
+diff -Nru k9copy-2.3.8-Source.orig/src/backup/k9mp4enc.cpp k9copy-2.3.8-Source/src/backup/k9mp4enc.cpp
+--- k9copy-2.3.8-Source.orig/src/backup/k9mp4enc.cpp 2011-12-09 22:08:41.000000000 +0100
++++ k9copy-2.3.8-Source/src/backup/k9mp4enc.cpp 2012-12-11 09:37:02.558323776 +0100
+@@ -619,7 +619,7 @@
+ // cmd << "-lavfopts" << "i_certify_that_my_video_stream_does_not_use_b_frames";
+ }
+ //synchronize audio
+- cmd << "-async" << "1" ;
++ cmd << "-async" << "44100" ;
+ cmd << "-y" << KShell::quoteArg(path);
+ cmd << slNewAudio;
+ // if (m_extractMkv) {
+diff -Nru k9copy-2.3.8-Source.orig/src/core/k9audiocodecs.cpp k9copy-2.3.8-Source/src/core/k9audiocodecs.cpp
+--- k9copy-2.3.8-Source.orig/src/core/k9audiocodecs.cpp 2011-12-09 22:08:42.000000000 +0100
++++ k9copy-2.3.8-Source/src/core/k9audiocodecs.cpp 2012-12-11 09:37:02.584323452 +0100
+@@ -75,10 +75,10 @@
+ m_codecs[4]=_k9AudioCodec("sonic","-oac lavc -lavcopts acodec=sonic:abitrate=$AUDBR","mencoder");
+ m_codecs[5]=_k9AudioCodec("aac","-oac faac -faacopts br=$AUDBR","mencoder");
+ m_codecs[6]=_k9AudioCodec("mp3 (lame)","-oac mp3lame -lameopts abr:br=$AUDBR","mencoder");
+- m_codecs[7]=_k9AudioCodec("copy","-acodec copy","ffmpeg","");
+- m_codecs[8]=_k9AudioCodec("mp3","-acodec libmp3lame -ab $AUDBRk -ac 2","ffmpeg",".mp3");
+- m_codecs[9]=_k9AudioCodec("vorbis","-acodec vorbis -ab $AUDBRk -ac 2","ffmpeg",".ogg");
+- m_codecs[10]=_k9AudioCodec("aac","-acodec libfaac -ab $AUDBRk -ac 2","ffmpeg",".aac");
++ m_codecs[7]=_k9AudioCodec("copy","-codec:a copy","ffmpeg","");
++ m_codecs[8]=_k9AudioCodec("mp3","-codec:a libmp3lame -ab $AUDBRk -ac 2 -ar 44100","ffmpeg",".mp3");
++ m_codecs[9]=_k9AudioCodec("vorbis","-codec:a vorbis -ab $AUDBRk -ac 2 -ar 44100","ffmpeg",".ogg");
++ m_codecs[10]=_k9AudioCodec("aac","-codec:a libfaac -ab $AUDBRk -ac 2 -ar 44100","ffmpeg",".aac");
+
+ save();
+ }
+diff -Nru k9copy-2.3.8-Source.orig/src/core/k9videocodecs.cpp k9copy-2.3.8-Source/src/core/k9videocodecs.cpp
+--- k9copy-2.3.8-Source.orig/src/core/k9videocodecs.cpp 2011-12-09 22:08:42.000000000 +0100
++++ k9copy-2.3.8-Source/src/core/k9videocodecs.cpp 2012-12-11 09:37:02.607323163 +0100
+@@ -98,12 +98,12 @@
+ m_codecs[18]=_k9VideoCodec("ASUS v1","","-ovc lavc -lavcopts vcodec=asv1:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:aspect=$ASPECT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP,scale=$WIDTH:$HEIGHT,dsize=$ASPECT","-ovc lavc -lavcopts vcodec=asv1:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:aspect=$ASPECT:turbo:vpass=$PASS -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP,scale=$WIDTH:$HEIGHT,dsize=$ASPECT","-ovc lavc -lavcopts vcodec=asv1:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:aspect=$ASPECT:turbo:vpass=$PASS -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP,scale=$WIDTH:$HEIGHT,dsize=$ASPECT","mencoder");
+ m_codecs[19]=_k9VideoCodec("ASUS v2","","-ovc lavc -lavcopts vcodec=asv2:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:aspect=$ASPECT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP,scale=$WIDTH:$HEIGHT,dsize=$ASPECT","-ovc lavc -lavcopts vcodec=asv2:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:aspect=$ASPECT:turbo:vpass=$PASS -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP,scale=$WIDTH:$HEIGHT,dsize=$ASPECT","-ovc lavc -lavcopts vcodec=asv2:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:aspect=$ASPECT:turbo:vpass=$PASS -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP,scale=$WIDTH:$HEIGHT,dsize=$ASPECT","mencoder");
+ m_codecs[20]=_k9VideoCodec("flv","","-ovc lavc -lavcopts vcodec=flv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:aspect=$ASPECT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP,scale=$WIDTH:$HEIGHT,dsize=$ASPECT","-ovc lavc -lavcopts vcodec=flv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:aspect=$ASPECT:turbo:vpass=$PASS -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP,scale=$WIDTH:$HEIGHT,dsize=$ASPECT","-ovc lavc -lavcopts vcodec=flv:vhq:v4mv:vqmin=2:vbitrate=$VIDBR:aspect=$ASPECT:turbo:vpass=$PASS -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP,scale=$WIDTH:$HEIGHT,dsize=$ASPECT","mencoder");
+- m_codecs[21]=_k9VideoCodec("copy","","-vcodec copy","-vcodec copy","-vcodec copy","ffmpeg");
+- m_codecs[22]=_k9VideoCodec("x264","","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP -aspect $ASPECT -vcodec libx264 -level 30","-b $VIDBRk -s $WIDTHx$HEIGHT -croptop $CROPTOP -cropbottom $CROPBOTTOM -cropleft $CROPLEFT -cropright $CROPRIGHT -aspect $ASPECT -vcodec libx264 -pass $PASS -passlogfile $PASSLOGFILE -level 30","-b $VIDBRk -s $WIDTHx$HEIGHT -croptop $CROPTOP -cropbottom $CROPBOTTOM -cropleft $CROPLEFT -cropright $CROPRIGHT -aspect $ASPECT -vcodec libx264 -pass $PASS -passlogfile $PASSLOGFILE -level 30","ffmpeg");
+- m_codecs[23]=_k9VideoCodec("x264 (high)","","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP -aspect $ASPECT -vcodec libx264 -level 30 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method hex -subq 7 -trellis 1 -refs 5 -bf 3 -flags2 +bpyramid+wpred+mixed_refs+dct8x8 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4","-b $VIDBRk -s $WIDTHx$HEIGHT -croptop $CROPTOP -cropbottom $CROPBOTTOM -cropleft $CROPLEFT -cropright $CROPRIGHT -aspect $ASPECT -vcodec libx264 -level 30 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method hex -subq 7 -trellis 1 -refs 5 -bf 3 -flags2 +bpyramid+wpred+mixed_refs+dct8x8 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4 -pass $PASS -passlogfile $PASSLOGFILE","-b $VIDBRk -s $WIDTHx$HEIGHT -croptop $CROPTOP -cropbottom $CROPBOTTOM -cropleft $CROPLEFT -cropright $CROPRIGHT -aspect $ASPECT -vcodec libx264 -level 30 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method hex -subq 7 -trellis 1 -refs 5 -bf 3 -flags2 +bpyramid+wpred+mixed_refs+dct8x8 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4 -pass $PASS -passlogfile $PASSLOGFILE","ffmpeg");
+- m_codecs[24]=_k9VideoCodec("MPEG-4 ","","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP -aspect $ASPECT -vcodec mpeg4 ","-b $VIDBRk -s $WIDTHx$HEIGHT -croptop $CROPTOP -cropbottom $CROPBOTTOM -cropleft $CROPLEFT -cropright $CROPRIGHT -aspect $ASPECT -vcodec mpeg4 -pass $PASS -passlogfile $PASSLOGFILE","-b $VIDBRk -s $WIDTHx$HEIGHT -croptop $CROPTOP -cropbottom $CROPBOTTOM -cropleft $CROPLEFT -cropright $CROPRIGHT -aspect $ASPECT -vcodec mpeg4 -pass $PASS -passlogfile $PASSLOGFILE","ffmpeg");
+- m_codecs[25]=_k9VideoCodec("Flash Video","","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP -aspect $ASPECT -vcodec flv ","-b $VIDBRk -s $WIDTHx$HEIGHT -croptop $CROPTOP -cropbottom $CROPBOTTOM -cropleft $CROPLEFT -cropright $CROPRIGHT -aspect $ASPECT -vcodec flv -pass $PASS -passlogfile $PASSLOGFILE","-b $VIDBRk -s $WIDTHx$HEIGHT -croptop $CROPTOP -cropbottom $CROPBOTTOM -cropleft $CROPLEFT -cropright $CROPRIGHT -aspect $ASPECT -vcodec flv -pass $PASS -passlogfile $PASSLOGFILE","ffmpeg");
+- m_codecs[26]=_k9VideoCodec("Windows Media 8","","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP -aspect $ASPECT -vcodec wmv2","-b $VIDBRk -s $WIDTHx$HEIGHT -croptop $CROPTOP -cropbottom $CROPBOTTOM -cropleft $CROPLEFT -cropright $CROPRIGHT -aspect $ASPECT -vcodec wmv2 -pass $PASS -passlogfile $PASSLOGFILE","-b $VIDBRk -s $WIDTHx$HEIGHT -croptop $CROPTOP -cropbottom $CROPBOTTOM -cropleft $CROPLEFT -cropright $CROPRIGHT -aspect $ASPECT -vcodec wmv2 -pass $PASS -passlogfile $PASSLOGFILE","ffmpeg");
++ m_codecs[21]=_k9VideoCodec("copy","","-codec:v copy","-codec:v copy","-codec:v copy","ffmpeg");
++ m_codecs[22]=_k9VideoCodec("x264","","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v libx264 -level 30","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$WIDTH-$CROPRIGHT-$CROPLEFT:$HEIGHT-$CROPTOP-$CROPBOTTOM:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v libx264 -pass $PASS -passlogfile $PASSLOGFILE -level 30","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$WIDTH-$CROPRIGHT-$CROPLEFT:$HEIGHT-$CROPTOP-$CROPBOTTOM:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v libx264 -pass $PASS -passlogfile $PASSLOGFILE -level 30","ffmpeg");
++ m_codecs[23]=_k9VideoCodec("x264 (high)","","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v libx264 -level 30 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method hex -subq 7 -trellis 1 -refs 5 -bf 3 -b-pyramid normal -weightb 1 -mixed-refs 1 -8x8dct 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$WIDTH-$CROPRIGHT-$CROPLEFT:$HEIGHT-$CROPTOP-$CROPBOTTOM:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v libx264 -level 30 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method hex -subq 7 -trellis 1 -refs 5 -bf 3 -b-pyramid normal -weightb 1 -mixed-refs 1 -8x8dct 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4 -pass $PASS -passlogfile $PASSLOGFILE","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$WIDTH-$CROPRIGHT-$CROPLEFT:$HEIGHT-$CROPTOP-$CROPBOTTOM:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v libx264 -level 30 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method hex -subq 7 -trellis 1 -refs 5 -bf 3 -b-pyramid normal -weightb 1 -mixed-refs 1 -8x8dct 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4 -pass $PASS -passlogfile $PASSLOGFILE","ffmpeg");
++ m_codecs[24]=_k9VideoCodec("MPEG-4 ","","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v mpeg4 ","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$WIDTH-$CROPRIGHT-$CROPLEFT:$HEIGHT-$CROPTOP-$CROPBOTTOM:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v mpeg4 -pass $PASS -passlogfile $PASSLOGFILE","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$WIDTH-$CROPRIGHT-$CROPLEFT:$HEIGHT-$CROPTOP-$CROPBOTTOM:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v mpeg4 -pass $PASS -passlogfile $PASSLOGFILE","ffmpeg");
++ m_codecs[25]=_k9VideoCodec("Flash Video","","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v flv ","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$WIDTH-$CROPRIGHT-$CROPLEFT:$HEIGHT-$CROPTOP-$CROPBOTTOM:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v flv -pass $PASS -passlogfile $PASSLOGFILE","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$WIDTH-$CROPRIGHT-$CROPLEFT:$HEIGHT-$CROPTOP-$CROPBOTTOM:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v flv -pass $PASS -passlogfile $PASSLOGFILE","ffmpeg");
++ m_codecs[26]=_k9VideoCodec("Windows Media 8","","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$CROPWIDTH:$CROPHEIGHT:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v wmv2","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$WIDTH-$CROPRIGHT-$CROPLEFT:$HEIGHT-$CROPTOP-$CROPBOTTOM:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v wmv2 -pass $PASS -passlogfile $PASSLOGFILE","-b $VIDBRk -s $WIDTHx$HEIGHT -vf crop=$WIDTH-$CROPRIGHT-$CROPLEFT:$HEIGHT-$CROPTOP-$CROPBOTTOM:$CROPLEFT:$CROPTOP -aspect $ASPECT -codec:v wmv2 -pass $PASS -passlogfile $PASSLOGFILE","ffmpeg");
+
+ save();
+
+diff -Nru k9copy-2.3.8-Source.orig/src/import/k9avidecode.cpp k9copy-2.3.8-Source/src/import/k9avidecode.cpp
+--- k9copy-2.3.8-Source.orig/src/import/k9avidecode.cpp 2011-12-09 22:08:41.000000000 +0100
++++ k9copy-2.3.8-Source/src/import/k9avidecode.cpp 2012-11-23 10:12:56.000000000 +0100
+@@ -37,11 +37,13 @@
+ : QObject(parent) {
+ CodecHandle=0;
+ FormatHandle=0;
++ UtilHandle=0;
+ SwscaleHandle=0;
+ glibref=0;
+ if (glibref==0) {
+ CodecHandle=dlopen("libavcodec.so",RTLD_LAZY ); //| RTLD_GLOBAL
+ FormatHandle=dlopen("libavformat.so",RTLD_LAZY);
++ UtilHandle=dlopen("libavutil.so",RTLD_LAZY);
+ #ifdef HAVE_SWSCALE
+ SwscaleHandle=dlopen("libswscale.so",RTLD_LAZY);
+ if (SwscaleHandle==0)
+@@ -56,6 +58,12 @@
+ if (!FormatHandle ) {
+ errs << i18n("Cannot open the library %1").arg("libavformat");
+ }
++# if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 33, 0)
++ if (!UtilHandle) {
++ m_error =i18n("Cannot open then library %1").arg("libavutil");
++ return;
++ }
++# endif
+ #ifdef HAVE_SWSCALE
+ if (!SwscaleHandle) {
+ errs << i18n("Cannot open the library %1").arg("libswscale");
+@@ -63,17 +71,32 @@
+ #endif
+
+ av_register_all = (av_register_all_t)dlsym(FormatHandle,"av_register_all");
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0)
++ avformat_open_input = (avformat_open_input_t)dlsym(FormatHandle,"avformat_open_input");
++# else
+ av_open_input_file = (av_open_input_file_t)dlsym(FormatHandle,"av_open_input_file");
++# endif
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 6, 0)
++ avformat_find_stream_info = (avformat_find_stream_info_t)dlsym(FormatHandle,"avformat_find_stream_info");
++# else
+ av_find_stream_info = (av_find_stream_info_t)dlsym(FormatHandle,"av_find_stream_info");
++# endif
+ avcodec_find_decoder =(avcodec_find_decoder_t) dlsym(CodecHandle,"avcodec_find_decoder");
++# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 8, 0)
++ avcodec_open2 = (avcodec_open2_t)dlsym(CodecHandle,"avcodec_open2");
++# else
+ avcodec_open = (avcodec_open_t)dlsym(CodecHandle,"avcodec_open");
++# endif
+ avcodec_alloc_frame = (avcodec_alloc_frame_t)dlsym(CodecHandle,"avcodec_alloc_frame");
+ avpicture_get_size = (avpicture_get_size_t)dlsym(CodecHandle,"avpicture_get_size");
+ av_malloc = (av_malloc_t)dlsym(CodecHandle,"av_malloc");
+ avpicture_fill = (avpicture_fill_t)dlsym(CodecHandle,"avpicture_fill");
+ av_read_frame = (av_read_frame_t)dlsym(FormatHandle,"av_read_frame");
++# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 23, 0)
++ avcodec_decode_video2 = (avcodec_decode_video2_t)dlsym(CodecHandle,"avcodec_decode_video2");
++# else
+ avcodec_decode_video = (avcodec_decode_video_t)dlsym(CodecHandle,"avcodec_decode_video");
+- if (avcodec_decode_video==0) avcodec_decode_video=(avcodec_decode_video_t)dlsym(CodecHandle,"avcodec_decode_video2");
++# endif
+ #ifndef HAVE_SWSCALE
+ img_convert = (img_convert_t)dlsym(CodecHandle,"img_convert");
+ //if img_convert is null (deprecated in ffmpeg), we need libswscale
+@@ -85,7 +108,11 @@
+ if (av_free_packet==0)
+ av_free_packet=av_free_packet_internal;
+ avcodec_close = (avcodec_close_t)dlsym(FormatHandle,"avcodec_close");
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0)
++ avformat_close_input = (avformat_close_input_t)dlsym(FormatHandle,"avformat_close_input");
++# else
+ av_close_input_file = (av_close_input_file_t)dlsym(FormatHandle,"av_close_input_file");
++# endif
+ av_seek_frame=(av_seek_frame_t)dlsym(FormatHandle,"av_seek_frame");
+ av_rescale_q=(av_rescale_q_t)dlsym(FormatHandle,"av_rescale_q");
+ avcodec_flush_buffers=(avcodec_flush_buffers_t)dlsym(CodecHandle,"avcodec_flush_buffers");
+@@ -94,7 +121,11 @@
+ sws_getContext=(sws_getContext_t)dlsym(SwscaleHandle,"sws_getContext");
+ sws_scale= (sws_scale_t)dlsym(SwscaleHandle,"sws_scale");
+ #endif
++# if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 33, 0)
++ av_gettime=(av_gettime_t)dlsym(UtilHandle,"av_gettime");
++# else
+ av_gettime=(av_gettime_t)dlsym(FormatHandle,"av_gettime");
++# endif
+
+ if (errs.count() >0) {
+ m_error=errs.join("\n");
+@@ -118,6 +149,8 @@
+ dlclose(FormatHandle);
+ if (CodecHandle)
+ dlclose(CodecHandle);
++ if(UtilHandle)
++ dlclose(UtilHandle);
+ #ifdef HAVE_SWSCALE
+ if (SwscaleHandle)
+ dlclose(CodecHandle);
+@@ -134,12 +167,24 @@
+ close();
+
+ // Open video file
+- if (av_open_input_file(&m_FormatCtx, _fileName.toUtf8(), NULL, 0, NULL)!=0) {
++ if (
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0)
++ avformat_open_input(&m_FormatCtx, _fileName.toUtf8(), 0, 0)!=0
++# else
++ av_open_input_file(&m_FormatCtx, _fileName.toUtf8(), NULL, 0, NULL)!=0
++# endif
++ ) {
+ m_error=i18n("Couldn't open the file %1").arg(_fileName);
+ return false; // Couldn't open file}
+ }
+ // Retrieve stream information
+- if (av_find_stream_info(m_FormatCtx)<0) {
++ if (
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 6, 0)
++ avformat_find_stream_info(m_FormatCtx, NULL)<0
++# else
++ av_find_stream_info(m_FormatCtx)<0
++# endif
++ ) {
+ m_error =i18n("Couldn't find stream information");
+ return false; // Couldn't find stream information
+ }
+@@ -168,7 +213,13 @@
+ return false; // Codec not found
+ }
+ // Open codec
+- if (avcodec_open(m_CodecCtx, m_Codec)<0) {
++ if (
++# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 8, 0)
++ avcodec_open2(m_CodecCtx, m_Codec, NULL)<0
++# else
++ avcodec_open(m_CodecCtx, m_Codec)<0
++# endif
++ ) {
+ m_error =i18n("Could'nt open the codec");
+ return false; // Could not open codec
+ }
+@@ -245,15 +296,23 @@
+ // Is this a packet from the video stream?
+ if (packet.stream_index==m_videoStream) {
+ // Decode video frame
++# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 23, 0)
++ avcodec_decode_video2(m_CodecCtx, m_Frame, &frameFinished, &packet);
++# else
+ avcodec_decode_video(m_CodecCtx, m_Frame, &frameFinished,
+ packet.data, packet.size);
++# endif
+
+ // Did we get a video frame?
+ if (frameFinished) {
+ // if (m_Frame->pts >=fspos)
+ int64_t cur_dts=fspos;
+- if (m_FormatCtx->cur_st)
+- cur_dts= m_FormatCtx->cur_st->cur_dts;
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(54, 2, 0)
++ cur_dts= packet.dts;
++# else
++ if (m_FormatCtx->cur_st)
++ cur_dts= m_FormatCtx->cur_st->cur_dts;
++# endif
+ if (cur_dts >=fspos) {
+ bFound=true;
+ #ifndef HAVE_SWSCALE
+@@ -309,7 +368,11 @@
+ avcodec_close(m_CodecCtx);
+
+ // Close the video file
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0)
++ avformat_close_input(&m_FormatCtx);
++# else
+ av_close_input_file(m_FormatCtx);
++# endif
+ m_opened=false;
+ }
+ }
+diff -Nru k9copy-2.3.8-Source.orig/src/import/k9avidecode.h k9copy-2.3.8-Source/src/import/k9avidecode.h
+--- k9copy-2.3.8-Source.orig/src/import/k9avidecode.h 2011-12-09 22:08:41.000000000 +0100
++++ k9copy-2.3.8-Source/src/import/k9avidecode.h 2012-11-23 10:12:56.000000000 +0100
+@@ -15,6 +15,7 @@
+ #include "k9common.h"
+ #include <qobject.h>
+ #include <avformat.h>
++#include <avutil.h>
+ #include <qimage.h>
+ #include <cstdlib>
+ #include <QObject>
+@@ -29,10 +30,22 @@
+ //typedef dvd_file_t * (*DVDOpenFile_t) ( dvd_reader_t *, int, dvd_read_domain_t );
+ typedef void (*av_register_all_t) (void);
+ typedef int64_t (*av_gettime_t) (void);
++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0)
++typedef int (*avformat_open_input_t)(AVFormatContext **, const char *, AVInputFormat *, AVDictionary **);
++#else
+ typedef int (*av_open_input_file_t)(AVFormatContext **, const char *,AVInputFormat *,int, AVFormatParameters *);
++#endif
++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 6, 0)
++typedef int (*avformat_find_stream_info_t)(AVFormatContext *, AVDictionary **);
++#else
+ typedef int (*av_find_stream_info_t)(AVFormatContext *);
++#endif
+ typedef AVCodec* (*avcodec_find_decoder_t)(enum CodecID);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 8, 0)
++typedef int (*avcodec_open2_t)(AVCodecContext *, AVCodec *, AVDictionary **);
++#else
+ typedef int (*avcodec_open_t)(AVCodecContext *, AVCodec *);
++#endif
+ typedef AVFrame * (*avcodec_alloc_frame_t)(void);
+
+ typedef int (*avpicture_get_size_t)(int , int , int );
+@@ -40,11 +53,19 @@
+ typedef int (*avpicture_fill_t)(AVPicture *, uint8_t *,int , int , int);
+ typedef int (*av_read_frame_t)(AVFormatContext *, AVPacket *);
+
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 23, 0)
++typedef int (*avcodec_decode_video2_t)(AVCodecContext *, AVFrame *, int *, AVPacket *);
++#else
+ typedef int (*avcodec_decode_video_t)(AVCodecContext *, AVFrame *,int *, uint8_t *, int );
++#endif
+ typedef int (*img_convert_t)(AVPicture *, int , const AVPicture *, int ,int, int);
+ typedef void (*av_free_t)(void *);
+ typedef int (*avcodec_close_t)(AVCodecContext *);
++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0)
++typedef void (*avformat_close_input_t)(AVFormatContext **);
++#else
+ typedef void (*av_close_input_file_t)(AVFormatContext *);
++#endif
+ typedef int (*av_seek_frame_t)(AVFormatContext *,int,int64_t timestamp,int flags); typedef int64_t (*av_rescale_q_t)(int64_t , AVRational , AVRational ) ;
+ typedef void (*avcodec_flush_buffers_t)(AVCodecContext *);
+ typedef void (*av_free_packet_t)(AVPacket *);
+@@ -77,21 +98,41 @@
+
+ private:
+ av_register_all_t av_register_all;
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0)
++ avformat_open_input_t avformat_open_input;
++# else
+ av_open_input_file_t av_open_input_file;
++# endif
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 6, 0)
++ avformat_find_stream_info_t avformat_find_stream_info;
++# else
+ av_find_stream_info_t av_find_stream_info;
++# endif
+ avcodec_find_decoder_t avcodec_find_decoder;
++# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 8, 0)
++ avcodec_open2_t avcodec_open2;
++# else
+ avcodec_open_t avcodec_open;
++# endif
+ avcodec_alloc_frame_t avcodec_alloc_frame;
+ av_seek_frame_t av_seek_frame;
+ avpicture_get_size_t avpicture_get_size;
+ av_malloc_t av_malloc;
+ avpicture_fill_t avpicture_fill;
+ av_read_frame_t av_read_frame;
++# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 23, 0)
++ avcodec_decode_video2_t avcodec_decode_video2;
++# else
+ avcodec_decode_video_t avcodec_decode_video;
++# endif
+ img_convert_t img_convert;
+ av_free_t av_free;
+ avcodec_close_t avcodec_close;
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0)
++ avformat_close_input_t avformat_close_input;
++# else
+ av_close_input_file_t av_close_input_file;
++# endif
+ av_rescale_q_t av_rescale_q;
+ av_gettime_t av_gettime;
+ avcodec_flush_buffers_t avcodec_flush_buffers;
+@@ -103,6 +144,7 @@
+ #endif
+ void *CodecHandle;
+ void *FormatHandle;
++ void *UtilHandle;
+ void *SwscaleHandle;
+ int glibref;
+
+diff -Nru k9copy-2.3.8-Source.orig/src/vamps/k9ffmpeg.cpp k9copy-2.3.8-Source/src/vamps/k9ffmpeg.cpp
+--- k9copy-2.3.8-Source.orig/src/vamps/k9ffmpeg.cpp 2011-12-09 22:08:41.000000000 +0100
++++ k9copy-2.3.8-Source/src/vamps/k9ffmpeg.cpp 2012-11-23 10:12:56.000000000 +0100
+@@ -50,20 +50,40 @@
+ avcodec_init =(avcodec_init_t)dlsym(CodecHandle,"avcodec_init");
+ av_register_all = (av_register_all_t)dlsym(FormatHandle,"av_register_all");
+ avcodec_alloc_context=(avcodec_alloc_context_t)dlsym(CodecHandle,"avcodec_alloc_context");
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0)
++ avformat_open_input = (avformat_open_input_t)dlsym(FormatHandle,"avformat_open_input");
++# else
+ av_open_input_file = (av_open_input_file_t)dlsym(FormatHandle,"av_open_input_file");
++# endif
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 6, 0)
++ avformat_find_stream_info = (avformat_find_stream_info_t)dlsym(FormatHandle,"avformat_find_stream_info");
++# else
+ av_find_stream_info = (av_find_stream_info_t)dlsym(FormatHandle,"av_find_stream_info");
++# endif
+ avcodec_find_decoder =(avcodec_find_decoder_t) dlsym(CodecHandle,"avcodec_find_decoder");
++# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 8, 0)
++ avcodec_open2 = (avcodec_open2_t)dlsym(CodecHandle,"avcodec_open2");
++# else
+ avcodec_open = (avcodec_open_t)dlsym(CodecHandle,"avcodec_open");
++# endif
+ avcodec_alloc_frame = (avcodec_alloc_frame_t)dlsym(CodecHandle,"avcodec_alloc_frame");
+ avpicture_get_size = (avpicture_get_size_t)dlsym(CodecHandle,"avpicture_get_size");
+ av_malloc = (av_malloc_t)dlsym(CodecHandle,"av_malloc");
+ avpicture_fill = (avpicture_fill_t)dlsym(CodecHandle,"avpicture_fill");
+ av_read_frame = (av_read_frame_t)dlsym(FormatHandle,"av_read_frame");
++# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 23, 0)
++ avcodec_decode_video2 = (avcodec_decode_video2_t)dlsym(CodecHandle,"avcodec_decode_video2");
++# else
+ avcodec_decode_video = (avcodec_decode_video_t)dlsym(CodecHandle,"avcodec_decode_video");
++# endif
+ img_convert = (img_convert_t)dlsym(CodecHandle,"img_convert");
+ av_free = (av_free_t)dlsym(CodecHandle,"av_free");
+ avcodec_close = (avcodec_close_t)dlsym(FormatHandle,"avcodec_close");
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0)
++ avformat_close_input = (avformat_close_input_t)dlsym(FormatHandle,"avformat_close_input");
++# else
+ av_close_input_file = (av_close_input_file_t)dlsym(FormatHandle,"av_close_input_file");
++# endif
+ av_seek_frame=(av_seek_frame_t)dlsym(FormatHandle,"av_seek_frame");
+ av_rescale_q=(av_rescale_q_t)dlsym(FormatHandle,"av_rescale_q");
+ avcodec_flush_buffers=(avcodec_flush_buffers_t)dlsym(CodecHandle,"avcodec_flush_buffers");
+@@ -73,7 +93,11 @@
+ sws_scale= (sws_scale_t)dlsym(SwscaleHandle,"sws_scale");
+ #endif
+
++# if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 33, 0)
++ av_gettime=(av_gettime_t)dlsym(UtilHandle,"av_gettime");
++# else
+ av_gettime=(av_gettime_t)dlsym(FormatHandle,"av_gettime");
++# endif
+ url_fopen=(url_fopen_t)dlsym(FormatHandle,"url_fopen");
+
+ audio_resample_init=(audio_resample_init_t)dlsym(CodecHandle,"audio_resample_init");
+@@ -110,4 +134,4 @@
+ k9FFMpeg *k9FFMpeg::instance() {
+ return &_FFMpegInstance;
+
+-}
+\ No newline at end of file
++}
+diff -Nru k9copy-2.3.8-Source.orig/src/vamps/k9ffmpeg.h k9copy-2.3.8-Source/src/vamps/k9ffmpeg.h
+--- k9copy-2.3.8-Source.orig/src/vamps/k9ffmpeg.h 2011-12-09 22:08:41.000000000 +0100
++++ k9copy-2.3.8-Source/src/vamps/k9ffmpeg.h 2012-11-23 10:13:39.000000000 +0100
+@@ -15,6 +15,7 @@
+ #include <QString>
+ #include <avcodec.h>
+ #include <avformat.h>
++#include <avutil.h>
+ #include <avio.h>
+ #ifdef HAVE_SWSCALE
+ #include <swscale.h>
+@@ -28,10 +29,22 @@
+ typedef void (*av_register_all_t) (void);
+ typedef void (*avcodec_init_t)(void);
+ typedef int64_t (*av_gettime_t) (void);
++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0)
++typedef int (*avformat_open_input_t)(AVFormatContext **, const char *, AVInputFormat *, AVDictionary **);
++#else
+ typedef int (*av_open_input_file_t)(AVFormatContext **, const char *,AVInputFormat *,int, AVFormatParameters *);
++#endif
++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 6, 0)
++typedef int (*avformat_find_stream_info_t)(AVFormatContext *, AVDictionary **);
++#else
+ typedef int (*av_find_stream_info_t)(AVFormatContext *);
++#endif
+ typedef AVCodec* (*avcodec_find_decoder_t)(enum CodecID);
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 8, 0)
++typedef int (*avcodec_open2_t)(AVCodecContext *, AVCodec *, AVDictionary **);
++#else
+ typedef int (*avcodec_open_t)(AVCodecContext *, AVCodec *);
++#endif
+ typedef AVFrame * (*avcodec_alloc_frame_t)(void);
+ typedef AVCodecContext * (*avcodec_alloc_context_t)(void);
+
+@@ -40,13 +53,21 @@
+ typedef int (*avpicture_fill_t)(AVPicture *, uint8_t *,int , int , int);
+ typedef int (*av_read_frame_t)(AVFormatContext *, AVPacket *);
+
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 23, 0)
++typedef int (*avcodec_decode_video2_t)(AVCodecContext *, AVFrame *, int *, AVPacket *);
++#else
+ typedef int (*avcodec_decode_video_t)(AVCodecContext *, AVFrame *,int *, uint8_t *, int );
++#endif
+ typedef int (*avcodec_encode_audio_t)(AVCodecContext *avctx, uint8_t *buf, int buf_size, const short *samples);
+
+ typedef int (*img_convert_t)(AVPicture *, int , const AVPicture *, int ,int, int);
+ typedef void (*av_free_t)(void *);
+ typedef int (*avcodec_close_t)(AVCodecContext *);
++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0)
++typedef void (*avformat_close_input_t)(AVFormatContext **);
++#else
+ typedef void (*av_close_input_file_t)(AVFormatContext *);
++#endif
+ typedef int (*av_seek_frame_t)(AVFormatContext *,int,int64_t timestamp,int flags);
+ typedef int64_t (*av_rescale_q_t)(int64_t , AVRational , AVRational ) ;
+ typedef void (*avcodec_flush_buffers_t)(AVCodecContext *);
+@@ -89,21 +110,41 @@
+ avcodec_init_t avcodec_init;
+ avcodec_alloc_context_t avcodec_alloc_context;
+ av_register_all_t av_register_all;
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0)
++ avformat_open_input_t avformat_open_input;
++# else
+ av_open_input_file_t av_open_input_file;
++# endif
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 6, 0)
++ avformat_find_stream_info_t avformat_find_stream_info;
++# else
+ av_find_stream_info_t av_find_stream_info;
++# endif
+ avcodec_find_decoder_t avcodec_find_decoder;
++# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 8, 0)
++ avcodec_open2_t avcodec_open2;
++# else
+ avcodec_open_t avcodec_open;
++# endif
+ avcodec_alloc_frame_t avcodec_alloc_frame;
+ av_seek_frame_t av_seek_frame;
+ avpicture_get_size_t avpicture_get_size;
+ av_malloc_t av_malloc;
+ avpicture_fill_t avpicture_fill;
+ av_read_frame_t av_read_frame;
++# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 23, 0)
++ avcodec_decode_video2_t avcodec_decode_video2;
++# else
+ avcodec_decode_video_t avcodec_decode_video;
++# endif
+ img_convert_t img_convert;
+ av_free_t av_free;
+ avcodec_close_t avcodec_close;
++# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0)
++ avformat_close_input_t avformat_close_input;
++# else
+ av_close_input_file_t av_close_input_file;
++# endif
+ av_rescale_q_t av_rescale_q;
+ av_gettime_t av_gettime;
+ avcodec_flush_buffers_t avcodec_flush_buffers;
diff --git a/app-cdr/k9copy/files/k9copy-2.3.8-includepaths.patch b/app-cdr/k9copy/files/k9copy-2.3.8-includepaths.patch
new file mode 100644
index 000000000000..111b3d121561
--- /dev/null
+++ b/app-cdr/k9copy/files/k9copy-2.3.8-includepaths.patch
@@ -0,0 +1,182 @@
+libavutil/time.h in recent ffmpeg versions pollute the includes.
+include libav* headers correcly.
+https://bugs.gentoo.org/show_bug.cgi?id=459980
+same as for backlite
+
+Index: k9copy-2.3.8-Source/cmake/FindAvcodec.cmake
+===================================================================
+--- k9copy-2.3.8-Source.orig/cmake/FindAvcodec.cmake
++++ k9copy-2.3.8-Source/cmake/FindAvcodec.cmake
+@@ -10,11 +10,11 @@ IF (AVCODEC_INCLUDE_DIR_FF)
+ ELSE (AVCODEC_INCLUDE_DIR_FF)
+ FIND_PATH(AVCODEC_INCLUDE_DIR_LAVC "libavcodec/avcodec.h" PATHS)
+ IF (AVCODEC_INCLUDE_DIR_LAVC)
+- SET (AVCODEC_INCLUDE_DIR "${AVCODEC_INCLUDE_DIR_LAVC}/libavcodec")
++ SET (AVCODEC_INCLUDE_DIR "${AVCODEC_INCLUDE_DIR_LAVC}")
+ ELSE (AVCODEC_INCLUDE_DIR_LAVC)
+ FIND_PATH(AVCODEC_INCLUDE_DIR_FF_LAVC "ffmpeg/libavcodec/avcodec.h" PATHS)
+ IF (AVCODEC_INCLUDE_DIR_FF_LAVC)
+- SET (AVCODEC_INCLUDE_DIR "${AVCODEC_INCLUDE_DIR_FF_LAVC}/ffmpeg/libavcodec")
++ SET (AVCODEC_INCLUDE_DIR "${AVCODEC_INCLUDE_DIR_FF_LAVC}/ffmpeg")
+ SET (FFMPEG_INCLUDE_DIR "${AVCODEC_INCLUDE_DIR_FF_LAVC}/ffmpeg")
+ ENDIF (AVCODEC_INCLUDE_DIR_FF_LAVC)
+ ENDIF (AVCODEC_INCLUDE_DIR_LAVC)
+@@ -35,4 +35,4 @@ IF (INC_FOUND)
+ ELSE (INC_FOUND)
+ MESSAGE(FATAL_ERROR "Could not find ${_lib}")
+ ENDIF (INC_FOUND)
+-ENDMACRO (FINDAVCODEC _lib )
+\ No newline at end of file
++ENDMACRO (FINDAVCODEC _lib )
+Index: k9copy-2.3.8-Source/cmake/FindAvformat.cmake
+===================================================================
+--- k9copy-2.3.8-Source.orig/cmake/FindAvformat.cmake
++++ k9copy-2.3.8-Source/cmake/FindAvformat.cmake
+@@ -6,11 +6,11 @@ IF (AVFORMAT_INCLUDE_DIR_FF)
+ ELSE (AVFORMAT_INCLUDE_DIR_FF)
+ FIND_PATH(AVFORMAT_INCLUDE_DIR_LAVC "libavformat/avformat.h" PATHS)
+ IF (AVFORMAT_INCLUDE_DIR_LAVC)
+- SET (AVFORMAT_INCLUDE_DIR "${AVFORMAT_INCLUDE_DIR_LAVC}/libavformat")
++ SET (AVFORMAT_INCLUDE_DIR "${AVFORMAT_INCLUDE_DIR_LAVC}")
+ ELSE (AVFORMAT_INCLUDE_DIR_LAVC)
+ FIND_PATH(AVFORMAT_INCLUDE_DIR_FF_LAVF "ffmpeg/libavformat/avformat.h" PATHS)
+ IF (AVFORMAT_INCLUDE_DIR_FF_LAVF)
+- SET (AVFORMAT_INCLUDE_DIR "${AVFORMAT_INCLUDE_DIR_FF_LAVF}/ffmpeg/libavformat")
++ SET (AVFORMAT_INCLUDE_DIR "${AVFORMAT_INCLUDE_DIR_FF_LAVF}/ffmpeg")
+ ENDIF (AVFORMAT_INCLUDE_DIR_FF_LAVF)
+ ENDIF (AVFORMAT_INCLUDE_DIR_LAVC)
+ ENDIF (AVFORMAT_INCLUDE_DIR_FF)
+@@ -32,4 +32,4 @@ IF (INC_FOUND)
+ ELSE (INC_FOUND)
+ MESSAGE(FATAL_ERROR "Could not find ${_lib}")
+ ENDIF (INC_FOUND)
+-ENDMACRO (FINDAVFORMAT _lib )
+\ No newline at end of file
++ENDMACRO (FINDAVFORMAT _lib )
+Index: k9copy-2.3.8-Source/cmake/FindAvutil.cmake
+===================================================================
+--- k9copy-2.3.8-Source.orig/cmake/FindAvutil.cmake
++++ k9copy-2.3.8-Source/cmake/FindAvutil.cmake
+@@ -6,11 +6,11 @@ IF (AVUTIL_INCLUDE_DIR_FF)
+ ELSE (AVUTIL_INCLUDE_DIR_FF)
+ FIND_PATH(AVUTIL_INCLUDE_DIR_LAVC "libavutil/avutil.h" PATHS)
+ IF (AVUTIL_INCLUDE_DIR_LAVC)
+- SET (AVUTIL_INCLUDE_DIR "${AVUTIL_INCLUDE_DIR_LAVC}/libavutil")
++ SET (AVUTIL_INCLUDE_DIR "${AVUTIL_INCLUDE_DIR_LAVC}")
+ ELSE (AVUTIL_INCLUDE_DIR_LAVC)
+ FIND_PATH(AVUTIL_INCLUDE_DIR_FF_LAVF "ffmpeg/libavutil/avutil.h" PATHS)
+ IF (AVUTIL_INCLUDE_DIR_FF_LAVF)
+- SET (AVUTIL_INCLUDE_DIR "${AVUTIL_INCLUDE_DIR_FF_LAVF}/ffmpeg/libavutil")
++ SET (AVUTIL_INCLUDE_DIR "${AVUTIL_INCLUDE_DIR_FF_LAVF}/ffmpeg")
+ ENDIF (AVUTIL_INCLUDE_DIR_FF_LAVF)
+ ENDIF (AVUTIL_INCLUDE_DIR_LAVC)
+ ENDIF (AVUTIL_INCLUDE_DIR_FF)
+@@ -32,4 +32,4 @@ IF (INC_FOUND)
+ ELSE (INC_FOUND)
+ MESSAGE(FATAL_ERROR "Could not find ${_lib}")
+ ENDIF (INC_FOUND)
+-ENDMACRO (FINDAVUTIL _lib )
+\ No newline at end of file
++ENDMACRO (FINDAVUTIL _lib )
+Index: k9copy-2.3.8-Source/cmake/FindFFmpegScale.cmake
+===================================================================
+--- k9copy-2.3.8-Source.orig/cmake/FindFFmpegScale.cmake
++++ k9copy-2.3.8-Source/cmake/FindFFmpegScale.cmake
+@@ -7,11 +7,11 @@ IF (FFMPEGSCALE_INCLUDE_DIR_FF)
+ ELSE (FFMPEGSCALE_INCLUDE_DIR_FF)
+ FIND_PATH(FFMPEGSCALE_INCLUDE_DIR_LAVC "libswscale/swscale.h" PATHS)
+ IF (FFMPEGSCALE_INCLUDE_DIR_LAVC)
+- SET (FFMPEGSCALE_INCLUDE_DIR "${FFMPEGSCALE_INCLUDE_DIR_LAVC}/libswscale")
++ SET (FFMPEGSCALE_INCLUDE_DIR "${FFMPEGSCALE_INCLUDE_DIR_LAVC}")
+ ELSE (FFMPEGSCALE_INCLUDE_DIR_LAVC)
+ FIND_PATH(FFMPEGSCALE_INCLUDE_DIR_FF_SCAL "ffmpeg/libswscale/swscale.h" PATHS)
+ IF (FFMPEGSCALE_INCLUDE_DIR_FF_SCAL)
+- SET (FFMPEGSCALE_INCLUDE_DIR "${FFMPEGSCALE_INCLUDE_DIR_FF_SCAL}/ffmpeg/libswscale")
++ SET (FFMPEGSCALE_INCLUDE_DIR "${FFMPEGSCALE_INCLUDE_DIR_FF_SCAL}/ffmpeg")
+ ENDIF (FFMPEGSCALE_INCLUDE_DIR_FF_SCAL)
+ ENDIF (FFMPEGSCALE_INCLUDE_DIR_LAVC)
+ ENDIF (FFMPEGSCALE_INCLUDE_DIR_FF)
+@@ -34,4 +34,4 @@ ELSE (HAVE_SWSCALE)
+ MESSAGE(STATUS "k9copy will be built without swscale support")
+ #MESSAGE(FATAL_ERROR "Could not find ${_lib}")
+ ENDIF (HAVE_SWSCALE)
+-ENDMACRO (FINDFFMPEGSCALE _lib )
+\ No newline at end of file
++ENDMACRO (FINDFFMPEGSCALE _lib )
+Index: k9copy-2.3.8-Source/src/import/k9avidecode.cpp
+===================================================================
+--- k9copy-2.3.8-Source.orig/src/import/k9avidecode.cpp
++++ k9copy-2.3.8-Source/src/import/k9avidecode.cpp
+@@ -10,14 +10,14 @@
+ //
+ //
+ #include "k9avidecode.h"
+-#include <avcodec.h>
++#include <libavcodec/avcodec.h>
+ #include <qimage.h>
+ #include <dlfcn.h>
+ #include "k9common.h"
+
+ #ifdef HAVE_SWSCALE
+
+-#include "swscale.h"
++#include <libswscale/swscale.h>
+
+ static int sws_flags = SWS_BICUBIC;
+
+Index: k9copy-2.3.8-Source/src/import/k9avidecode.h
+===================================================================
+--- k9copy-2.3.8-Source.orig/src/import/k9avidecode.h
++++ k9copy-2.3.8-Source/src/import/k9avidecode.h
+@@ -14,13 +14,13 @@
+
+ #include "k9common.h"
+ #include <qobject.h>
+-#include <avformat.h>
+-#include <avutil.h>
++#include <libavformat/avformat.h>
++#include <libavutil/avutil.h>
+ #include <qimage.h>
+ #include <cstdlib>
+ #include <QObject>
+ #ifdef HAVE_SWSCALE
+-#include <swscale.h>
++#include <libswscale/swscale.h>
+ #endif
+ /**
+ @author Jean-Michel PETIT <k9copy@free.fr>
+Index: k9copy-2.3.8-Source/src/vamps/k9ffmpeg.cpp
+===================================================================
+--- k9copy-2.3.8-Source.orig/src/vamps/k9ffmpeg.cpp
++++ k9copy-2.3.8-Source/src/vamps/k9ffmpeg.cpp
+@@ -12,7 +12,7 @@
+ #include "k9common.h"
+ #include "k9ffmpeg.h"
+ #ifdef HAVE_SWSCALE
+-#include "swscale.h"
++#include <libswscale/swscale.h>
+ #endif
+ #include <dlfcn.h>
+ #include <klocale.h>
+Index: k9copy-2.3.8-Source/src/vamps/k9ffmpeg.h
+===================================================================
+--- k9copy-2.3.8-Source.orig/src/vamps/k9ffmpeg.h
++++ k9copy-2.3.8-Source/src/vamps/k9ffmpeg.h
+@@ -13,12 +13,12 @@
+ #define K9FFMPEG_H
+
+ #include <QString>
+-#include <avcodec.h>
+-#include <avformat.h>
+-#include <avutil.h>
+-#include <avio.h>
++#include <libavcodec/avcodec.h>
++#include <libavformat/avformat.h>
++#include <libavutil/avutil.h>
++#include <libavformat/avio.h>
+ #ifdef HAVE_SWSCALE
+-#include <swscale.h>
++#include <libswscale/swscale.h>
+ #endif
+ /**
+ @author Jean-Michel PETIT <k9copy@free.fr>
diff --git a/app-cdr/k9copy/k9copy-2.3.8.ebuild b/app-cdr/k9copy/k9copy-2.3.8.ebuild
index e7f9d22df39f..e1cafb8c2157 100644
--- a/app-cdr/k9copy/k9copy-2.3.8.ebuild
+++ b/app-cdr/k9copy/k9copy-2.3.8.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-cdr/k9copy/k9copy-2.3.8.ebuild,v 1.4 2012/05/16 07:52:27 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/k9copy/k9copy-2.3.8.ebuild,v 1.5 2013/03/03 14:18:45 aballier Exp $
EAPI=4
@@ -37,6 +37,11 @@ DOCS=( README )
S=${WORKDIR}/${MY_P}
+PATCHES=(
+ "${FILESDIR}/${P}-ffmpeg-0.11.patch"
+ "${FILESDIR}/${P}-includepaths.patch"
+ )
+
pkg_postinst() {
kde4-base_pkg_postinst
has_version '>=app-cdr/k3b-1.50' || elog "If you want K3b burning support in ${P}, please install app-cdr/k3b separately."