diff options
author | 2013-06-17 18:42:02 +0000 | |
---|---|---|
committer | 2013-06-17 18:42:02 +0000 | |
commit | 8a2e1a0a374cf2462a146642cdeed86bb7860af8 (patch) | |
tree | 84f0e16dadc269dd9cc5b1e5097eda70bbb00a73 | |
parent | amd64 stable wrt bug #459884 (diff) | |
download | historical-8a2e1a0a374cf2462a146642cdeed86bb7860af8.tar.gz historical-8a2e1a0a374cf2462a146642cdeed86bb7860af8.tar.bz2 historical-8a2e1a0a374cf2462a146642cdeed86bb7860af8.zip |
Update ffmpeg patches to match upstream commits, add one more change to build with libav9. Wrt bug#443194.
Package-Manager: portage-2.2.0_alpha180/cvs/Linux x86_64
Manifest-Sign-Key: 0x8EEE3BE8
-rw-r--r-- | media-video/motion/ChangeLog | 9 | ||||
-rw-r--r-- | media-video/motion/Manifest | 30 | ||||
-rw-r--r-- | media-video/motion/files/ffmpeg-1.patch | 95 | ||||
-rw-r--r-- | media-video/motion/files/ffmpeg-2.patch | 141 | ||||
-rw-r--r-- | media-video/motion/files/ffmpeg-3.patch | 35 | ||||
-rw-r--r-- | media-video/motion/files/ffmpeg-4.patch | 68 | ||||
-rw-r--r-- | media-video/motion/files/ffmpeg-5.patch (renamed from media-video/motion/files/ffmpeg1.patch) | 0 | ||||
-rw-r--r-- | media-video/motion/files/ffmpeg08.patch | 53 | ||||
-rw-r--r-- | media-video/motion/files/libav-9.patch | 21 | ||||
-rw-r--r-- | media-video/motion/motion-3.2.12-r2.ebuild | 9 |
10 files changed, 396 insertions, 65 deletions
diff --git a/media-video/motion/ChangeLog b/media-video/motion/ChangeLog index aa215deacfe8..8c09f64b68b8 100644 --- a/media-video/motion/ChangeLog +++ b/media-video/motion/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-video/motion # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.42 2013/02/15 19:17:27 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.43 2013/06/17 18:41:51 scarabeus Exp $ + + 17 Jun 2013; Tomáš Chvátal <scarabeus@gentoo.org> +files/ffmpeg-1.patch, + +files/ffmpeg-2.patch, +files/ffmpeg-3.patch, +files/ffmpeg-4.patch, + +files/ffmpeg-5.patch, +files/libav-9.patch, -files/ffmpeg08.patch, + -files/ffmpeg1.patch, motion-3.2.12-r2.ebuild: + Update ffmpeg patches to match upstream commits, add one more change to build + with libav9. Wrt bug#443194. 15 Feb 2013; Alexis Ballier <aballier@gentoo.org> +files/ffmpeg1.patch, motion-3.2.12-r2.ebuild: diff --git a/media-video/motion/Manifest b/media-video/motion/Manifest index b5659f1ed48b..f0797eeafb9c 100644 --- a/media-video/motion/Manifest +++ b/media-video/motion/Manifest @@ -1,19 +1,33 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 -AUX ffmpeg08.patch 2118 SHA256 98522037700b1b437c217f31fdade69fa3d407eba8593903e9e0057ac040b299 SHA512 0968d6b698834bfcc409085ef79da64b14623c0a14062e363355a25f5e4c7b447cc974970dafda40717d78e689e560ac8e094ef1dcec5b714f8f0fc4819ebed6 WHIRLPOOL 6890a42529a73e395640c91067f1e4742ac24df589a3ddfce718bc4232078a3f31915098743d77afcba154332490c7f2f39606c9ae30a779ecaad684eb28c422 -AUX ffmpeg1.patch 4370 SHA256 5a11fe115253e6681087e8b09feaeac06a048eedb62c5d97f0b322d333f2ff5b SHA512 36bcc4f7a74a560020e88e660fa109c081ad25887351a4cc3afb8287ec4a6a1c527e5e9b75534c4879aef93aaa210b27cc0d84434f619d09ebaf0cb8b412fd94 WHIRLPOOL ee4edbf013425ad6ad6bbd2e198c71e5128a8d3779d2800a370fa0d286015ed18438dfb0d73c673e519c9f7d188a60f778d1e25b4ca4acc8ba1166022c8bdb46 +AUX ffmpeg-1.patch 3333 SHA256 8493a859745901708fc9e1d6411a2ecf2b389f50c8ff86300efcbaeaf50029e8 SHA512 9cde33b50013d22969f900c0cc94af8ca0d083a27c18e5c9cb49943da09056eb6f91723d72c14cff99528e96d075c87f6685a09228fa47f1dddff3f51423ed8b WHIRLPOOL aff0267302f8be0d8727da53f29ebe6fdae9e84448f649ef264a9aa7894446da610f1b5b729aacc0fd3020851141439dc0fb8059ad15cea9688614115ff14182 +AUX ffmpeg-2.patch 4736 SHA256 34fb37de0c0e05b02fa5ad14ce9dbf8a108b162a291e70e0ee345f9f76885993 SHA512 4bc8c0a123c55a9b4c365c7e00c35e712a4e7043338610672de56d2dd5f31bafe09384675235f08781abb07fa9a919954eb7bfd764825b15fcc6c6a412fe7d1b WHIRLPOOL cef04e472ce52328daf863e4ecbc138be459f97d805f5371b0ff788b54fd4f10f87dbcfc296dac04de2d7d2f84173d9c1aac68132ed43e3ee97736fe0fb3150b +AUX ffmpeg-3.patch 1279 SHA256 3fefdc338992c4dc8e5973088df3422e1c21ab37d503377cdaae344e3d7ca3ac SHA512 4453a9c38b1d52801db7c5311513da0e7bbba79a1f813b110f993987bbecee99bde9bdc300877c94c7cd5ebdae43c90b27489724616d932c8b339220a2dc4491 WHIRLPOOL 7f12fb07d0e654c7838fba6fb143a5af59075bbd44d0764637d96cf27afe5ff689e9373315db26b9498299fb9195dbc931deb325a7690e35b095ababb8a4763a +AUX ffmpeg-4.patch 2354 SHA256 d6aca285e96b237919b72e6af34b53fdfb7287b0db8a54bbb49ce6a0f6e72dc4 SHA512 d7defc0e95b1e01f8ef3d37253376679819d30133dff8229394865f3e23b98e1ed998d745f331497b8f16412988635f3461982a43b7a5e4dcbb7bd0fa398fd46 WHIRLPOOL 7f0c6bf53f0968107fa6c26cd3d8942efe4f6f31e5ef5aca3ff945a7db4198b5aca3602990f9cf45d1cda5973ba3cd23b4d0c9fad068a9839372d60e9dc8bd6d +AUX ffmpeg-5.patch 4370 SHA256 5a11fe115253e6681087e8b09feaeac06a048eedb62c5d97f0b322d333f2ff5b SHA512 36bcc4f7a74a560020e88e660fa109c081ad25887351a4cc3afb8287ec4a6a1c527e5e9b75534c4879aef93aaa210b27cc0d84434f619d09ebaf0cb8b412fd94 WHIRLPOOL ee4edbf013425ad6ad6bbd2e198c71e5128a8d3779d2800a370fa0d286015ed18438dfb0d73c673e519c9f7d188a60f778d1e25b4ca4acc8ba1166022c8bdb46 +AUX libav-9.patch 899 SHA256 a3fc789ef4348b66304ddc534ae7c3e9221a5c1869632ad2e61de6aa17ea6d15 SHA512 3153568c9ff839e4a718e1062bd7fede7f6b245b1a1bbde04ff07343467ee5db14e751b026e5313ba9dee4b87c7eb07e402c04be057bc8a7e1fa9e92ba4d60ad WHIRLPOOL 103f57169051b9c8e8c14263a031cef393ec89aee97e06b48d164377c2e6e5408010128be57debfd57cf1f8dfb71a5aefd4644232627561493146305efec0d33 AUX motion-3.2.12-workaround-v4l1_deprecation.patch 786 SHA256 70791141dfd39b3c52a4707720c934d12f455ac8328bfef18429e973a89695fe SHA512 f1ec270bf7ccf1328310ea055300cea76fe5c3f53b4567c2058eddf1083687047bf3820c93d9ca03223b3db426e95a0d2df236fad15ab8121456ec5db122f0c7 WHIRLPOOL ca77a0e8aa04119a99ee1a983a2cb964e32f8b61b2369eff192e7eb83af9d7448e032357a7329206bbd0c6054a129ab68566e8912c91b5d8cbe3c990c4339934 AUX motion.confd 99 SHA256 c43ac28bcf76d96b105a03d0d3685688c5f731894bf68a501706681bba76b060 SHA512 b0135b220ac2f1857012455726fb5c5aaa73a79f864619cb7fbfbb1e8aaf95b0c4dd51bbc30f29714cc29a271f9196f3d92e160fa75a90ccbcf0024640620d5d WHIRLPOOL fc69fca880a1f6b53d216b2ca7ffba73041f696e64a9df6986ec98bc49306d0770d8b7164c17c1961bb5300cc5bb4c7665d0aad5418f2645cf1cb561743774ee AUX motion.initd-r2 904 SHA256 a862507d2b0096efca041768a21ebeaac1733211aa008ebacc73fd4c214be6e0 SHA512 5fc1c01fa4dad1db6ee205cc22aad5aedfc4ba0ba9947ab87705b77a10be1325d15cf815b1758c656f259427e01456bbf8a7299d17182ea4e91fdaff746f9757 WHIRLPOOL 65dd450d49cb4a50486d02e6c9b4881bcb282dfdda79566ae56f27b48ba90e200853672e6d356d0975b075c1aa7eec0a9954ed8af7cc2c5eb5b2a216dece1f10 DIST motion-3.2.12.tar.gz 425729 SHA256 a597f8d7ec0bf3c5fb62722c4eead59717fe01c2ae0d256c642027cea74b2f0a SHA512 d44620f8865420da71ff1dc1e1d8ba8e5465b395f2cf3b2cc9a91d3d415694b26376a9f8e3a1b78ffd0efde22d9e0338daa77237aed38c060dc3577af4c0864c WHIRLPOOL 0b7618d48161e8ffefacc5331d1078004d87839b532100c37bfaf06e99772921228feea6eea063301dfdc9e5f5a1dc07fd0847858440c6f876c1e03deaa078c8 -EBUILD motion-3.2.12-r2.ebuild 1761 SHA256 bf999f8806b503e55f12253a36cb740d9c27a24bbe4567c8de6765b1ecfa37f3 SHA512 1b65675529ae9cb98418f0ca154bb3562a1af0d9759e49e60caee8756f7b3fa5ebd7914a922264530213f70766c20b7dfb1021829bff04c87211e47d95357957 WHIRLPOOL a1d7c001841e76543d5e4c916bc99901350cfd0a789d661ffb18e8abb1a3e3090edeb8158d2006fc3547106eb20f5584699ba8482262612eb506f09779c5a62b -MISC ChangeLog 6680 SHA256 06f1c314f7ae8f6b0af02f1ac9f206a9c977114a7f8dd28a5c01b47e9841ac03 SHA512 2aafdac943ec860bb5980c24a15174f4187e5b17a9c19bb797ff4fec7ba18cbd5ed1d74eedea9b7de94ca8f927a4ed22380b919bd6beebe73500361060f94338 WHIRLPOOL ee01889705241bdf98bb889d6d91cb48ef7cc0cc8c00f5dcd26e7c76d7e8e5481ae104500693495fbf1dc366d6b30c1f6c85de391a2f3f933f27103353829fb8 +EBUILD motion-3.2.12-r2.ebuild 1862 SHA256 57a7895004313a2e44d5fbe2b1abf6a0f04ed269d727f5be86e94e630dcda72e SHA512 4a32f94c68c9dbf22d21a354799d368c39f98f6814a3c21328c25bcf39af5caa4c67622bc3c78290e47a6d8d15fddc89105bb49bde2b0e5d5b92fcb6d0e57d4a WHIRLPOOL ac015b2fb69b39b3c5b1b01792c440a98a4fa545118177c6f346a37700138919dfd13e62c625c3fd2a94f6780794f09c51786dfcadbc4691ae4d25ef00e416dc +MISC ChangeLog 7061 SHA256 2c30af76ce3002d25212aca1aa9449c0cfafcd552358ab001a3cbb05abb8e10e SHA512 4f70875a73c71c42d25485be277ad256a713400611b590c11dcec87fc4c2e3b05219ae3beb6d760c35e4e923a527248c36c3ed686c5624e7ecb11fbe2cf34137 WHIRLPOOL abaca1c755c2829750b5b1f4c1e4f7e3085e24be5f2630e5f128a163db690222ae74db0b0d77494e00a7e353befe7338328da02f4ffc811fa6a8800a32cd87d0 MISC metadata.xml 223 SHA256 dd48e823ec9a151bc3611121402ed26ee24eb3304aa62870b1e875a8fa0ac812 SHA512 cacba929b8688a7270637f34d348216fdeb89e725cdee4b40e5577ca3f626c5f72e73c1c125605a284506aff47265f41e3fedaa76ed4074c540fc1f200e6d494 WHIRLPOOL dcd04d57abcfe2704036097ed68500917f74b7024b46580e9054e1c933d55678992c350fe07ff0efd590b9345fbcdd81665b8ce546f786dd31f5a0f4eb654da3 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.19 (GNU/Linux) +Version: GnuPG v2.0.20 (GNU/Linux) -iEYEAREIAAYFAlEeicgACgkQvFcC4BYPU0ozLACfft0Y9G7/IuOj3y4dPuvYOwIa -+ZUAn1QJ0jOSQyXpu8LqqS26Zp49pteY -=Knhp +iQIcBAEBCAAGBQJRv1hmAAoJEOSiRoyO7jvov8oP/ivGY4/9F4mWDSp/SpSV0DP0 +vZUwDG7r3lyEgnhrnyOLnQig6OrNjaH257ORT6JBln+KhgtN5MtyVshPlR7k3olp +NLzXG/KEAlI51Bh3rrTfe9DfSiIob2W794muk8W0jHQfXEPFv5AzaGy+lynbBCkU +YT7EcrMULusCxoL7IQo7bSM1WLthRwWkNDbEuhakDkuk0EsvdnN0x0UG4uOXFOxt +sKHmOAgzZMFXC67iIWTdXTdkZGynFZgPRsYwTkEq9m7ROGOlR//zjOh5v3cBMWFG +xEUYELmEvzisjuNAbIZYA6xZzAO1413UiDZiMnLnPqurz4SIuBQDrHUR1AfdL/Tp +kZ0RFq2l5Snb4yj/GNg06ROEdxKV5G0n0kubbCognK7pQxt3RnCmUsvHofS5p9P1 +JyeRfxiQI6oyd0IaHANckCXXivvVW47tgNWLIWauTBUUr2pAjRp9KZ43g7Q4IcI+ +Tzdku/eWBcaDSsmaTkjz+G4+PXVecOaxQEES3IjLRNXNbQgldU0W85XWVvFmuOsA +n48xCEpsRy4yght1SFUrm1J/CoOaPnAOS9laFKGeP5Td+/EBgfT43iXQNxrTYWur +y33E36Fk9KBKbiX2PLjYalKzQgKT5YHEwfXj1sv2xE6ttweL+I9NtJDBteXCLIsc +OxeU7MAoPhOY2E6/p4yY +=gE1n -----END PGP SIGNATURE----- diff --git a/media-video/motion/files/ffmpeg-1.patch b/media-video/motion/files/ffmpeg-1.patch new file mode 100644 index 000000000000..56c83c474f09 --- /dev/null +++ b/media-video/motion/files/ffmpeg-1.patch @@ -0,0 +1,95 @@ +Description: Fix FFmpeg guess_format() deprecation warning +Author: Angel Carpintero <motiondevelop@gmail.com> +Origin: Upstream, https://github.com/sackmotion/motion/commit/527377#svn517 +Last-Update: 2012-02-12 + +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -36,6 +36,11 @@ + # endif /* __GNUC__ */ + #endif /* LIBAVCODEC_BUILD > 4680 */ + ++#if defined LIBAVFORMAT_VERSION_MAJOR && defined LIBAVFORMAT_VERSION_MINOR ++#if LIBAVFORMAT_VERSION_MAJOR < 53 && LIBAVFORMAT_VERSION_MINOR < 45 ++ #define GUESS_NO_DEPRECATED ++#endif ++#endif + + #if LIBAVFORMAT_BUILD >= 4616 + /* The API for av_write_frame changed with FFmpeg version 0.4.9pre1. +@@ -258,7 +263,11 @@ + /* We use "mpeg1video" for raw mpeg1 format. Using "mpeg" would + * result in a muxed output file, which isn't appropriate here. + */ +- of = guess_format("mpeg1video", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("mpeg1video", NULL, NULL); ++#endif + if (of) { + /* But we want the trailer to be correctly written. */ + of->write_trailer = mpeg1_write_trailer; +@@ -270,24 +279,44 @@ + #endif + } else if (strcmp(codec, "mpeg4") == 0) { + ext = ".avi"; +- of = guess_format("avi", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("avi", NULL, NULL); ++#endif + } else if (strcmp(codec, "msmpeg4") == 0) { + ext = ".avi"; +- of = guess_format("avi", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("avi", NULL, NULL); ++#endif + if (of) { + /* Manually override the codec id. */ + of->video_codec = CODEC_ID_MSMPEG4V2; + } + } else if (strcmp(codec, "swf") == 0) { + ext = ".swf"; +- of = guess_format("swf", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("swf", NULL, NULL); ++#endif + } else if (strcmp(codec, "flv") == 0) { + ext = ".flv"; +- of = guess_format("flv", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("flv", NULL, NULL); ++#endif + of->video_codec = CODEC_ID_FLV1; + } else if (strcmp(codec, "ffv1") == 0) { + ext = ".avi"; +- of = guess_format("avi", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("avi", NULL, NULL); ++#endif + if (of) { + /* Use the FFMPEG Lossless Video codec (experimental!). + Requires strict_std_compliance to be <= -2 */ +@@ -295,7 +324,11 @@ + } + } else if (strcmp(codec, "mov") == 0) { + ext = ".mov"; +- of = guess_format("mov", NULL, NULL); ++#ifdef GUESS_NO_DEPRECATED ++ of = guess_format("mpeg1video", NULL, NULL); ++#else ++ of = av_guess_format("mov", NULL, NULL); ++#endif + } else { + motion_log(LOG_ERR, 0, "ffmpeg_video_codec option value %s is not supported", codec); + return NULL; diff --git a/media-video/motion/files/ffmpeg-2.patch b/media-video/motion/files/ffmpeg-2.patch new file mode 100644 index 000000000000..480819d9987d --- /dev/null +++ b/media-video/motion/files/ffmpeg-2.patch @@ -0,0 +1,141 @@ +Description: Improve detection of av_register_protocol() for ffmpeg. +Author: Angel Carpintero <motiondevelop@gmail.com> +Origin: Upstream, https://github.com/sackmotion/motion/commit/7aec4b#svn538 +Last-Update: 2012-02-12 + +--- a/configure.in ++++ b/configure.in +@@ -316,7 +316,7 @@ + # + else if test "${FFMPEG_DIR}" = "yes"; then + # AUTODETECT STATIC/SHARED LIB +- AC_MSG_CHECKING(for ffmpeg autodetecting) ++ AC_MSG_CHECKING(for ffmpeg autodetecting libraries) + + if test -f /usr/lib64/libavcodec.a -o -f /usr/lib64/libavcodec.so && test -f /usr/lib64/libavformat.a -o -f /usr/lib64/libavformat.so ; then + AC_MSG_RESULT(found in /usr/lib64) +@@ -347,7 +347,7 @@ + echo "" + fi + else +- AC_MSG_CHECKING(for ffmpeg in -> [${FFMPEG_DIR}] <-) ++ AC_MSG_CHECKING(for ffmpeg libraries in -> [${FFMPEG_DIR}] <-) + if test -f ${FFMPEG_DIR}/lib/libavcodec.a -o -f ${FFMPEG_DIR}/lib/libavcodec.so && test -f ${FFMPEG_DIR}/lib/libavformat.a -o -f ${FFMPEG_DIR}/lib/libavformat.so ; then + AC_MSG_RESULT(found) + FFMPEG_OK="found" +@@ -392,9 +392,11 @@ + elif test -f ${FFMPEG_DIR}/include/libavformat/avformat.h; then + AC_MSG_RESULT(found ${FFMPEG_DIR}/include/libavformat/avformat.h) + FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include -DFFMPEG_NEW_INCLUDES" ++ AVFORMAT="-I${FFMPEG_DIR}/include/libavformat" + elif test -f ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h; then + AC_MSG_RESULT(found ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h) + FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include/ffmpeg -DFFMPEG_NEW_INCLUDES" ++ AVFORMAT="-I${FFMPEG_DIR}/include/ffmpeg/libavformat" + else + AC_MSG_RESULT(not found) + FFMPEG_OK="no_found" +@@ -423,9 +425,11 @@ + AC_MSG_CHECKING([file_protocol is defined in ffmpeg ?]) + saved_CFLAGS=$CFLAGS + saved_LIBS=$LIBS +- CFLAGS="${FFMPEG_CFLAGS}" ++ ++ ++ CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}" + LIBS="$TEMP_LIBS" +- ++ + AC_COMPILE_IFELSE( + [ + #include <avformat.h> +@@ -442,7 +446,35 @@ + ] + ) + CFLAGS=$saved_CFLAGS +- LIBS=$saved_LIBS ++ LIBS=$saved_LIBS ++ ++ AC_MSG_CHECKING([av_register_protocol is defined in ffmpeg ?]) ++ saved_CFLAGS=$CFLAGS ++ saved_LIBS=$LIBS ++ CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}" ++ LIBS="$TEMP_LIBS" ++ ++ AC_COMPILE_IFELSE( ++ [ ++ #include <avformat.h> ++ URLProtocol test_file_protocol; ++ int main(void){ ++ av_register_protocol(&test_file_protocol); ++ return 0; ++ } ++ ], ++ [ ++ AC_MSG_RESULT(yes) ++ TEMP_CFLAGS="${TEMP_CFLAGS} -DHAVE_FFMPEG_AV_REGISTER_PROTOCOL" ++ ], ++ [ ++ AC_MSG_RESULT(no) ++ ] ++ ) ++ ++ CFLAGS=$saved_CFLAGS ++ LIBS=$saved_LIBS ++ + fi + fi + fi +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -232,11 +232,11 @@ + mpeg1_file_protocol.url_seek = file_protocol.url_seek; + mpeg1_file_protocol.url_close = file_protocol.url_close; + +- /* Register the append file protocol. */ +-#if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8) ++/* Register the append file protocol. */ ++#ifdef HAVE_FFMPEG_AV_REGISTER_PROTOCOL + av_register_protocol(&mpeg1_file_protocol); + #else +- register_protocol(&mpeg1_file_protocol); ++ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol)); + #endif + } + +@@ -410,7 +410,11 @@ + + ffmpeg->c = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st); + c->codec_id = ffmpeg->oc->oformat->video_codec; ++#if LIBAVCODEC_VERSION_MAJOR < 53 + c->codec_type = CODEC_TYPE_VIDEO; ++#else ++ c->codec_type = AVMEDIA_TYPE_VIDEO; ++#endif + is_mpeg1 = c->codec_id == CODEC_ID_MPEG1VIDEO; + + if (strcmp(ffmpeg_video_codec, "ffv1") == 0) +@@ -679,7 +683,11 @@ + if (ffmpeg->oc->oformat->flags & AVFMT_RAWPICTURE) { + /* raw video case. The API will change slightly in the near future for that */ + #ifdef FFMPEG_AVWRITEFRAME_NEWAPI ++#if LIBAVCODEC_VERSION_MAJOR < 53 + pkt.flags |= PKT_FLAG_KEY; ++#else ++ pkt.flags |= AV_PKT_FLAG_KEY; ++#endif + pkt.data = (uint8_t *)pic; + pkt.size = sizeof(AVPicture); + ret = av_write_frame(ffmpeg->oc, &pkt); +@@ -700,7 +708,11 @@ + #ifdef FFMPEG_AVWRITEFRAME_NEWAPI + pkt.pts = AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->pts; + if (AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->key_frame) { ++#if LIBAVCODEC_VERSION_MAJOR < 53 + pkt.flags |= PKT_FLAG_KEY; ++#else ++ pkt.flags |= AV_PKT_FLAG_KEY; ++#endif + } + pkt.data = ffmpeg->video_outbuf; + pkt.size = out_size; diff --git a/media-video/motion/files/ffmpeg-3.patch b/media-video/motion/files/ffmpeg-3.patch new file mode 100644 index 000000000000..1d6be1959229 --- /dev/null +++ b/media-video/motion/files/ffmpeg-3.patch @@ -0,0 +1,35 @@ +Description: Fix avoid crash producing MPEG4 with newer FFmpeg. +Author: Angel Carpintero <motiondevelop@gmail.com> +Origin: Upstream, https://github.com/sackmotion/motion/commit/734155#svn539 +Bug: http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2011x10x05x071936 +Last-Update: 2012-02-12 + +--- a/configure.in ++++ b/configure.in +@@ -1099,6 +1099,10 @@ + LIBS="${TEMP_LIBS}" + LDFLAGS="${TEMP_LDFLAGS}" + ++ ++AC_CHECK_FUNC(avformat_alloc_context, AC_DEFINE([have_avformat_alloc_context],1,[Define to 1 if you have avformat_alloc_context support])) ++AC_CHECK_FUNC(av_avformat_alloc_context, AC_DEFINE([have_av_avformat_alloc_context],1,[Define to 1 if you have av_avformat_alloc_context support])) ++ + # + # Add the right exec path for rc scripts + # +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -373,7 +373,13 @@ + snprintf(ffmpeg->codec, sizeof(ffmpeg->codec), "%s", ffmpeg_video_codec); + + /* allocation the output media context */ ++#ifdef have_avformat_alloc_context ++ ffmpeg->oc = avformat_alloc_context(); ++#elif defined have_av_avformat_alloc_context ++ ffmpeg->oc = av_alloc_format_context(); ++#else + ffmpeg->oc = av_mallocz(sizeof(AVFormatContext)); ++#endif + + if (!ffmpeg->oc) { + motion_log(LOG_ERR, 1, "Memory error while allocating output media context"); diff --git a/media-video/motion/files/ffmpeg-4.patch b/media-video/motion/files/ffmpeg-4.patch new file mode 100644 index 000000000000..05abd9e28410 --- /dev/null +++ b/media-video/motion/files/ffmpeg-4.patch @@ -0,0 +1,68 @@ +Description: Improve av_register_protocol2()/av_register_protocol() detection +Author: Angel Carpintero <motiondevelop@gmail.com> +Origin: Upstream, https://github.com/sackmotion/motion/commit/5dd9ed#svn540#svn540 +Last-Update: 2012-02-12 + +--- a/configure.in ++++ b/configure.in +@@ -448,33 +448,6 @@ + CFLAGS=$saved_CFLAGS + LIBS=$saved_LIBS + +- AC_MSG_CHECKING([av_register_protocol is defined in ffmpeg ?]) +- saved_CFLAGS=$CFLAGS +- saved_LIBS=$LIBS +- CFLAGS="${FFMPEG_CFLAGS} ${AVFORMAT}" +- LIBS="$TEMP_LIBS" +- +- AC_COMPILE_IFELSE( +- [ +- #include <avformat.h> +- URLProtocol test_file_protocol; +- int main(void){ +- av_register_protocol(&test_file_protocol); +- return 0; +- } +- ], +- [ +- AC_MSG_RESULT(yes) +- TEMP_CFLAGS="${TEMP_CFLAGS} -DHAVE_FFMPEG_AV_REGISTER_PROTOCOL" +- ], +- [ +- AC_MSG_RESULT(no) +- ] +- ) +- +- CFLAGS=$saved_CFLAGS +- LIBS=$saved_LIBS +- + fi + fi + fi +@@ -1102,6 +1075,9 @@ + + AC_CHECK_FUNC(avformat_alloc_context, AC_DEFINE([have_avformat_alloc_context],1,[Define to 1 if you have avformat_alloc_context support])) + AC_CHECK_FUNC(av_avformat_alloc_context, AC_DEFINE([have_av_avformat_alloc_context],1,[Define to 1 if you have av_avformat_alloc_context support])) ++AC_CHECK_FUNC(av_register_protocol2, AC_DEFINE([have_av_register_protocol2],1,[Define to 1 if you have av_register_protocol2 support])) ++AC_CHECK_FUNC(av_register_protocol, AC_DEFINE([have_av_register_protocol],1,[Define to 1 if you have av_register_protocol support])) ++ + + # + # Add the right exec path for rc scripts +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -233,10 +233,12 @@ + mpeg1_file_protocol.url_close = file_protocol.url_close; + + /* Register the append file protocol. */ +-#ifdef HAVE_FFMPEG_AV_REGISTER_PROTOCOL ++#ifdef have_av_register_protocol2 ++ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol)); ++#elif defined have_av_register_protocol + av_register_protocol(&mpeg1_file_protocol); + #else +- av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol)); ++# warning av_register_protocolXXX missing + #endif + } + diff --git a/media-video/motion/files/ffmpeg1.patch b/media-video/motion/files/ffmpeg-5.patch index c7d114b1470a..c7d114b1470a 100644 --- a/media-video/motion/files/ffmpeg1.patch +++ b/media-video/motion/files/ffmpeg-5.patch diff --git a/media-video/motion/files/ffmpeg08.patch b/media-video/motion/files/ffmpeg08.patch deleted file mode 100644 index f6743e36fad4..000000000000 --- a/media-video/motion/files/ffmpeg08.patch +++ /dev/null @@ -1,53 +0,0 @@ -Index: motion-3.2.12/ffmpeg.c -=================================================================== ---- motion-3.2.12.orig/ffmpeg.c -+++ motion-3.2.12/ffmpeg.c -@@ -60,6 +60,10 @@ - */ - #define APPEND_PROTO "appfile" - -+#ifndef guess_format -+#define guess_format av_guess_format -+#endif -+ - /* Some forward-declarations. */ - void ffmpeg_put_frame(struct ffmpeg *, AVFrame *); - void ffmpeg_cleanups(struct ffmpeg *); -@@ -228,7 +232,9 @@ void ffmpeg_init() - mpeg1_file_protocol.url_close = file_protocol.url_close; - - /* Register the append file protocol. */ --#if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8) -+#if LIBAVFORMAT_BUILD >= (53<<16 ) -+ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol)); -+#elif LIBAVFORMAT_BUILD >= (52<<16 | 31<<8) - av_register_protocol(&mpeg1_file_protocol); - #else - register_protocol(&mpeg1_file_protocol); -@@ -377,7 +383,7 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_ - - ffmpeg->c = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st); - c->codec_id = ffmpeg->oc->oformat->video_codec; -- c->codec_type = CODEC_TYPE_VIDEO; -+ c->codec_type = AVMEDIA_TYPE_VIDEO; - is_mpeg1 = c->codec_id == CODEC_ID_MPEG1VIDEO; - - if (strcmp(ffmpeg_video_codec, "ffv1") == 0) -@@ -646,7 +652,7 @@ void ffmpeg_put_frame(struct ffmpeg *ffm - if (ffmpeg->oc->oformat->flags & AVFMT_RAWPICTURE) { - /* raw video case. The API will change slightly in the near future for that */ - #ifdef FFMPEG_AVWRITEFRAME_NEWAPI -- pkt.flags |= PKT_FLAG_KEY; -+ pkt.flags |= AV_PKT_FLAG_KEY; - pkt.data = (uint8_t *)pic; - pkt.size = sizeof(AVPicture); - ret = av_write_frame(ffmpeg->oc, &pkt); -@@ -667,7 +673,7 @@ void ffmpeg_put_frame(struct ffmpeg *ffm - #ifdef FFMPEG_AVWRITEFRAME_NEWAPI - pkt.pts = AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->pts; - if (AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->key_frame) { -- pkt.flags |= PKT_FLAG_KEY; -+ pkt.flags |= AV_PKT_FLAG_KEY; - } - pkt.data = ffmpeg->video_outbuf; - pkt.size = out_size; diff --git a/media-video/motion/files/libav-9.patch b/media-video/motion/files/libav-9.patch new file mode 100644 index 000000000000..39b4059df0bd --- /dev/null +++ b/media-video/motion/files/libav-9.patch @@ -0,0 +1,21 @@ +diff -urN motion-3.2.12.old/ffmpeg.c motion-3.2.12/ffmpeg.c +--- motion-3.2.12.old/ffmpeg.c 2013-06-17 20:36:45.355529743 +0200 ++++ motion-3.2.12/ffmpeg.c 2013-06-17 20:35:41.868532001 +0200 +@@ -409,7 +409,7 @@ + ffmpeg->video_st = NULL; + + if (ffmpeg->oc->oformat->video_codec != CODEC_ID_NONE) { +- ffmpeg->video_st = av_new_stream(ffmpeg->oc, 0); ++ ffmpeg->video_st = avformat_new_stream(ffmpeg->oc, 0); + if (!ffmpeg->video_st) { + motion_log(LOG_ERR, 1, "av_new_stream - could not alloc stream"); + ffmpeg_cleanups(ffmpeg); +@@ -487,7 +487,7 @@ + pthread_mutex_lock(&global_lock); + + /* open the codec */ +- if (avcodec_open(c, codec) < 0) { ++ if (avcodec_open2(c, codec, NULL) < 0) { + /* Release the lock. */ + pthread_mutex_unlock(&global_lock); + motion_log(LOG_ERR, 1, "avcodec_open - could not open codec"); diff --git a/media-video/motion/motion-3.2.12-r2.ebuild b/media-video/motion/motion-3.2.12-r2.ebuild index 3ae75b05b750..ac5398c73b53 100644 --- a/media-video/motion/motion-3.2.12-r2.ebuild +++ b/media-video/motion/motion-3.2.12-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/motion/motion-3.2.12-r2.ebuild,v 1.4 2013/02/15 19:17:27 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/motion/motion-3.2.12-r2.ebuild,v 1.5 2013/06/17 18:41:51 scarabeus Exp $ EAPI=4 inherit eutils user @@ -30,8 +30,11 @@ pkg_setup() { src_prepare() { epatch \ - "${FILESDIR}"/ffmpeg08.patch \ - "${FILESDIR}"/ffmpeg1.patch \ + "${FILESDIR}"/ffmpeg-1.patch \ + "${FILESDIR}"/ffmpeg-2.patch \ + "${FILESDIR}"/ffmpeg-3.patch \ + "${FILESDIR}"/ffmpeg-4.patch \ + "${FILESDIR}"/ffmpeg-5.patch \ "${FILESDIR}"/${P}-workaround-v4l1_deprecation.patch } |