diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2012-05-20 16:24:24 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2012-05-20 16:24:24 +0000 |
commit | 61b30b950d61cb99b6c57a64b2cc7c9c630b02a5 (patch) | |
tree | 6568ccae17e21811305c6059fdf27236e50f68cb | |
parent | Simplify PYTHON_DEPEND. (diff) | |
download | gentoo-2-61b30b950d61cb99b6c57a64b2cc7c9c630b02a5.tar.gz gentoo-2-61b30b950d61cb99b6c57a64b2cc7c9c630b02a5.tar.bz2 gentoo-2-61b30b950d61cb99b6c57a64b2cc7c9c630b02a5.zip |
Use latest upstream revision to avoid using deprecated FFMPEG API.
(Portage version: 2.2.0_alpha107/cvs/Linux x86_64)
3 files changed, 130 insertions, 1 deletions
diff --git a/media-video/ffmpegthumbnailer/ChangeLog b/media-video/ffmpegthumbnailer/ChangeLog index 1291951f03f3..084bcda3e7bc 100644 --- a/media-video/ffmpegthumbnailer/ChangeLog +++ b/media-video/ffmpegthumbnailer/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-video/ffmpegthumbnailer # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpegthumbnailer/ChangeLog,v 1.132 2012/05/05 08:58:54 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpegthumbnailer/ChangeLog,v 1.133 2012/05/20 16:24:24 ssuominen Exp $ + +*ffmpegthumbnailer-2.0.7-r1 (20 May 2012) + + 20 May 2012; Samuli Suominen <ssuominen@gentoo.org> + +ffmpegthumbnailer-2.0.7-r1.ebuild, + +files/ffmpegthumbnailer-2.0.7-r238-r241.patch: + Use latest upstream revision to avoid using deprecated FFMPEG API. 05 May 2012; Jeff Horelick <jdhore@gentoo.org> ffmpegthumbnailer-2.0.7.ebuild: diff --git a/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.7-r1.ebuild b/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.7-r1.ebuild new file mode 100644 index 000000000000..e06f7eff71ce --- /dev/null +++ b/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.7-r1.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.7-r1.ebuild,v 1.1 2012/05/20 16:24:24 ssuominen Exp $ + +EAPI=4 +inherit eutils + +DESCRIPTION="Lightweight video thumbnailer that can be used by file managers" +HOMEPAGE="http://code.google.com/p/ffmpegthumbnailer/" +SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="gtk jpeg png" + +COMMON_DEPEND=">=virtual/ffmpeg-0.10.2 + png? ( >=media-libs/libpng-1.2:0 ) + jpeg? ( virtual/jpeg )" +RDEPEND="${COMMON_DEPEND} + gtk? ( >=dev-libs/glib-2.14 )" +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig" + +DOCS="AUTHORS ChangeLog README" + +src_prepare() { + epatch "${FILESDIR}"/${P}-r238-r241.patch +} + +src_configure() { + econf \ + --disable-static \ + $(use_enable png) \ + $(use_enable jpeg) \ + $(use_enable gtk gio) +} + +src_install() { + default + find "${D}" -name '*.la' -exec rm -f {} + +} diff --git a/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.7-r238-r241.patch b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.7-r238-r241.patch new file mode 100644 index 000000000000..0f9b21099f96 --- /dev/null +++ b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.7-r238-r241.patch @@ -0,0 +1,80 @@ +This is `svn diff -r238:241 http://ffmpegthumbnailer.googlecode.com/svn/trunk` but without unnecessary configure.ac +indentation cleanup. + +--- libffmpegthumbnailer/moviedecoder.cpp ++++ libffmpegthumbnailer/moviedecoder.cpp +@@ -58,19 +58,26 @@ + void MovieDecoder::initialize(const string& filename) + { + av_register_all(); +- avcodec_init(); + avcodec_register_all(); + + string inputFile = filename == "-" ? "pipe:" : filename; + m_AllowSeek = (filename != "-") && (filename.find("rtsp://") != 0); +- ++ ++#if LIBAVCODEC_VERSION_MAJOR < 53 + if ((!m_FormatContextWasGiven) && av_open_input_file(&m_pFormatContext, inputFile.c_str(), NULL, 0, NULL) != 0) ++#else ++ if ((!m_FormatContextWasGiven) && avformat_open_input(&m_pFormatContext, inputFile.c_str(), NULL, NULL) != 0) ++#endif + { + destroy(); + throw logic_error(string("Could not open input file: ") + filename); + } + ++#if LIBAVCODEC_VERSION_MAJOR < 53 + if (av_find_stream_info(m_pFormatContext) < 0) ++#else ++ if (avformat_find_stream_info(m_pFormatContext, NULL) < 0) ++#endif + { + destroy(); + throw logic_error(string("Could not find stream information")); +@@ -90,8 +97,12 @@ + + if ((!m_FormatContextWasGiven) && m_pFormatContext) + { ++#if LIBAVCODEC_VERSION_MAJOR < 53 + av_close_input_file(m_pFormatContext); + m_pFormatContext = NULL; ++#else ++ avformat_close_input(&m_pFormatContext); ++#endif + } + + if (m_pPacket) +@@ -159,7 +170,11 @@ + + m_pVideoCodecContext->workaround_bugs = 1; + ++#if LIBAVCODEC_VERSION_MAJOR < 53 + if (avcodec_open(m_pVideoCodecContext, m_pVideoCodec) < 0) ++#else ++ if (avcodec_open2(m_pVideoCodecContext, m_pVideoCodec, NULL) < 0) ++#endif + { + throw logic_error("Could not open video codec"); + } +--- main.cpp ++++ main.cpp +@@ -243,10 +243,18 @@ + freeFunc(pPath); + } + } ++ else ++ { ++ cerr << "Not a native file, thumbnailing will likely fail" << endl; ++ } + + unrefFunc(pFile); + } + } ++ else ++ { ++ cerr << "Failed to load gio libraries" << endl; ++ } + + if (gioLib) dlclose(gioLib); + if (gobjectLib) dlclose(gobjectLib); |