diff options
author | Alexis Ballier <aballier@gentoo.org> | 2013-08-06 19:54:13 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2013-08-06 19:54:13 +0000 |
commit | 6c1ff29baefd76a68787849a082a6639621011f6 (patch) | |
tree | 85a0d85c8072ec2c60a01537568471d1dbf088e2 /media-plugins | |
parent | Version bump, drop old (diff) | |
download | gentoo-2-6c1ff29baefd76a68787849a082a6639621011f6.tar.gz gentoo-2-6c1ff29baefd76a68787849a082a6639621011f6.tar.bz2 gentoo-2-6c1ff29baefd76a68787849a082a6639621011f6.zip |
fix build with ffmpeg-2
(Portage version: 2.2.0_alpha194/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'media-plugins')
3 files changed, 213 insertions, 1 deletions
diff --git a/media-plugins/gst-plugins-libav/ChangeLog b/media-plugins/gst-plugins-libav/ChangeLog index 8e38eaf688b8..5ecd2bbdeaf8 100644 --- a/media-plugins/gst-plugins-libav/ChangeLog +++ b/media-plugins/gst-plugins-libav/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-plugins/gst-plugins-libav # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-libav/ChangeLog,v 1.26 2013/07/28 17:36:29 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-libav/ChangeLog,v 1.27 2013/08/06 19:54:13 aballier Exp $ + +*gst-plugins-libav-1.1.0_pre20130128-r1 (06 Aug 2013) + + 06 Aug 2013; Alexis Ballier <aballier@gentoo.org> + +gst-plugins-libav-1.1.0_pre20130128-r1.ebuild, + +files/gst-plugins-libav-1.1.0_pre20130128-ffmpeg2.patch: + fix build with ffmpeg-2 28 Jul 2013; Alexis Ballier <aballier@gentoo.org> gst-plugins-libav-1.1.0_pre20130128.ebuild: diff --git a/media-plugins/gst-plugins-libav/files/gst-plugins-libav-1.1.0_pre20130128-ffmpeg2.patch b/media-plugins/gst-plugins-libav/files/gst-plugins-libav-1.1.0_pre20130128-ffmpeg2.patch new file mode 100644 index 000000000000..66b965afd833 --- /dev/null +++ b/media-plugins/gst-plugins-libav/files/gst-plugins-libav-1.1.0_pre20130128-ffmpeg2.patch @@ -0,0 +1,121 @@ +Index: gst-libav-1.1.0_pre20130128/ext/libav/gstavauddec.c +=================================================================== +--- gst-libav-1.1.0_pre20130128.orig/ext/libav/gstavauddec.c ++++ gst-libav-1.1.0_pre20130128/ext/libav/gstavauddec.c +@@ -420,7 +420,7 @@ gst_ffmpegauddec_audio_frame (GstFFMpegA + GstBuffer ** outbuf, GstFlowReturn * ret) + { + gint len = -1; +- gint have_data = AVCODEC_MAX_AUDIO_FRAME_SIZE; ++ gint have_data = 0; + AVPacket packet; + AVFrame frame; + +Index: gst-libav-1.1.0_pre20130128/ext/libav/gstavaudenc.c +=================================================================== +--- gst-libav-1.1.0_pre20130128.orig/ext/libav/gstavaudenc.c ++++ gst-libav-1.1.0_pre20130128/ext/libav/gstavaudenc.c +@@ -266,7 +266,6 @@ gst_ffmpegaudenc_set_format (GstAudioEnc + ffmpegaudenc->context->coder_type = 0; + ffmpegaudenc->context->context_model = 0; + ffmpegaudenc->context->scenechange_threshold = 0; +- ffmpegaudenc->context->inter_threshold = 0; + + /* fetch pix_fmt and so on */ + gst_ffmpeg_audioinfo_to_context (info, ffmpegaudenc->context); +Index: gst-libav-1.1.0_pre20130128/ext/libav/gstavcfg.c +=================================================================== +--- gst-libav-1.1.0_pre20130128.orig/ext/libav/gstavcfg.c ++++ gst-libav-1.1.0_pre20130128/ext/libav/gstavcfg.c +@@ -171,13 +171,10 @@ gst_ffmpeg_idct_algo_get_type (void) + {FF_IDCT_INT, "JPEG reference Integer", "int"}, + {FF_IDCT_SIMPLE, "Simple", "simple"}, + {FF_IDCT_SIMPLEMMX, "Simple MMX", "simplemmx"}, +- {FF_IDCT_LIBMPEG2MMX, "LIBMPEG2MMX", "libmpeg2mmx"}, + {FF_IDCT_ARM, "ARM", "arm"}, + {FF_IDCT_ALTIVEC, "ALTIVEC", "altivec"}, + {FF_IDCT_SH4, "SH4", "sh4"}, + {FF_IDCT_SIMPLEARM, "SIMPLEARM", "simplearm"}, +- {FF_IDCT_H264, "H264", "h264"}, +- {FF_IDCT_VP3, "VP3", "vp3"}, + {FF_IDCT_IPP, "IPP", "ipp"}, + {FF_IDCT_XVIDMMX, "XVIDMMX", "xvidmmx"}, + {0, NULL, NULL}, +@@ -274,9 +271,6 @@ gst_ffmpeg_flags_get_type (void) + "global-headers"}, + {CODEC_FLAG_AC_PRED, "H263 Advanced Intra Coding / MPEG4 AC prediction", + "aic"}, +- {CODEC_FLAG_CBP_RD, "Rate Distoration Optimization for CBP", "cbp-rd"}, +- {CODEC_FLAG_QP_RD, "Rate Distoration Optimization for QP selection", +- "qp-rd"}, + {CODEC_FLAG_CLOSED_GOP, "Closed GOP", "closedgop"}, + {0, NULL, NULL}, + }; +@@ -564,18 +558,6 @@ gst_ffmpeg_cfg_init (void) + -100, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + gst_ffmpeg_add_pspec (pspec, max_key_interval, FALSE, mpeg, NULL); + +- pspec = g_param_spec_int ("luma-elim-threshold", +- "Luma Elimination Threshold", +- "Luma Single Coefficient Elimination Threshold", +- -99, 99, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); +- gst_ffmpeg_add_pspec (pspec, config.luma_elim_threshold, FALSE, mpeg, NULL); +- +- pspec = g_param_spec_int ("chroma-elim-threshold", +- "Chroma Elimination Threshold", +- "Chroma Single Coefficient Elimination Threshold", +- -99, 99, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); +- gst_ffmpeg_add_pspec (pspec, config.chroma_elim_threshold, FALSE, mpeg, NULL); +- + pspec = g_param_spec_float ("lumi-masking", "Luminance Masking", + "Luminance Masking", -1.0f, 1.0f, 0.0f, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); +Index: gst-libav-1.1.0_pre20130128/ext/libav/gstavcodecmap.c +=================================================================== +--- gst-libav-1.1.0_pre20130128.orig/ext/libav/gstavcodecmap.c ++++ gst-libav-1.1.0_pre20130128/ext/libav/gstavcodecmap.c +@@ -797,13 +797,11 @@ gst_ffmpeg_codecid_to_caps (enum AVCodec + break; + } + +- /* FIXME: context->sub_id must be filled in during decoding */ + caps = + gst_ff_vid_caps_new (context, NULL, codec_id, encode, + "video/x-pn-realvideo", "systemstream", G_TYPE_BOOLEAN, FALSE, + "rmversion", G_TYPE_INT, version, NULL); + if (context) { +- gst_caps_set_simple (caps, "format", G_TYPE_INT, context->sub_id, NULL); + if (context->extradata_size >= 8) { + gst_caps_set_simple (caps, + "subformat", G_TYPE_INT, GST_READ_UINT32_BE (context->extradata), +@@ -2855,18 +2853,6 @@ gst_ffmpeg_caps_with_codecid (enum AVCod + } + break; + +- case AV_CODEC_ID_RV10: +- case AV_CODEC_ID_RV20: +- case AV_CODEC_ID_RV30: +- case AV_CODEC_ID_RV40: +- { +- gint format; +- +- if (gst_structure_get_int (str, "format", &format)) +- context->sub_id = format; +- +- break; +- } + case AV_CODEC_ID_COOK: + case AV_CODEC_ID_RA_288: + case AV_CODEC_ID_RA_144: +Index: gst-libav-1.1.0_pre20130128/ext/libav/gstavvidenc.c +=================================================================== +--- gst-libav-1.1.0_pre20130128.orig/ext/libav/gstavvidenc.c ++++ gst-libav-1.1.0_pre20130128/ext/libav/gstavvidenc.c +@@ -332,7 +332,6 @@ gst_ffmpegvidenc_set_format (GstVideoEnc + ffmpegenc->context->coder_type = 0; + ffmpegenc->context->context_model = 0; + ffmpegenc->context->scenechange_threshold = 0; +- ffmpegenc->context->inter_threshold = 0; + + /* and last but not least the pass; CBR, 2-pass, etc */ + ffmpegenc->context->flags |= ffmpegenc->pass; diff --git a/media-plugins/gst-plugins-libav/gst-plugins-libav-1.1.0_pre20130128-r1.ebuild b/media-plugins/gst-plugins-libav/gst-plugins-libav-1.1.0_pre20130128-r1.ebuild new file mode 100644 index 000000000000..8d46334f9e40 --- /dev/null +++ b/media-plugins/gst-plugins-libav/gst-plugins-libav-1.1.0_pre20130128-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-libav/gst-plugins-libav-1.1.0_pre20130128-r1.ebuild,v 1.1 2013/08/06 19:54:13 aballier Exp $ + +EAPI="5" + +inherit eutils flag-o-matic + +MY_PN="gst-libav" +DESCRIPTION="FFmpeg based gstreamer plugin" +HOMEPAGE="http://gstreamer.freedesktop.org/modules/gst-libav.html" +#SRC_URI="http://gstreamer.freedesktop.org/src/${MY_PN}/${MY_PN}-${PV}.tar.xz" +SRC_URI="http://dev.gentoo.org/~tetromino/distfiles/${PN}/${MY_PN}-${PV}.tar.xz" + +LICENSE="GPL-2" +SLOT="1.0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="+orc" + +RDEPEND=" + media-libs/gstreamer:1.0 + media-libs/gst-plugins-base:1.0 + >=virtual/ffmpeg-0.10 + orc? ( >=dev-lang/orc-0.4.16 ) +" +DEPEND="${RDEPEND} + >=dev-util/gtk-doc-am-1.12 + virtual/pkgconfig +" + +S="${WORKDIR}/${MY_PN}-${PV}" + +src_prepare() { + sed -e 's/sleep 15//' -i configure.ac configure || die + + # allow building with gstreamer-1.0.x + sed -e 's/REQ=1.1.0/REQ=1.0.0/' -i configure.ac configure || die + # Disable GBR color support; it requires >=gst-plugins-base-1.1 + epatch -R "${FILESDIR}/${P}-gbr-color.patch" + # Let it be compatible with older ffmpeg/libav releases, add the compat glue + epatch "${FILESDIR}/${P}-compat.patch" + # Some muxers contains coma too. + epatch "${FILESDIR}/${P}-coma.patch" + # compatibility with recent releases + # TODO: likely apply them with libav-10 when it's out but there will + # probably be an upstream gst-libav release compatible at that time. + if has_version '>=media-video/ffmpeg-2.0' ; then + sed -i -e 's/ CODEC_ID/ AV_CODEC_ID/g' \ + -e 's/ CodecID/ AVCodecID/g' \ + ext/libav/*.{c,h} || die + epatch "${FILESDIR}/${P}-ffmpeg2.patch" + fi +} + +src_configure() { + GST_PLUGINS_BUILD="" + # always use system ffmpeg/libav if possible + econf \ + --disable-maintainer-mode \ + --with-package-name="Gentoo GStreamer ebuild" \ + --with-package-origin="http://www.gentoo.org" \ + --disable-fatal-warnings \ + --with-system-libav \ + $(use_enable orc) +} + +src_compile() { + # Don't build with -Werror + emake ERROR_CFLAGS= +} + +src_install() { + DOCS="AUTHORS ChangeLog NEWS README TODO" + default + prune_libtool_files --modules +} + +pkg_postinst() { + if has_version "media-video/ffmpeg"; then + elog "Please note that upstream uses media-video/libav" + elog "rather than media-video/ffmpeg. If you encounter any" + elog "issues try to move from ffmpeg to libav." + fi +} |