diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-plugins/gst-plugins-libav | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-plugins/gst-plugins-libav')
9 files changed, 670 insertions, 0 deletions
diff --git a/media-plugins/gst-plugins-libav/Manifest b/media-plugins/gst-plugins-libav/Manifest new file mode 100644 index 000000000000..1e995970e045 --- /dev/null +++ b/media-plugins/gst-plugins-libav/Manifest @@ -0,0 +1,2 @@ +DIST gst-libav-1.2.4.tar.xz 4580144 SHA256 2a69480d63fc2db93249d9e2e229ab3541bbc2db881b0f64de13d0bfc7d1f037 SHA512 64b24f0995865bc736946ad0709b37d6557ce1b91359371c7aaf48d02a0cb486f3bf90b72f483c8ccb661cd5fb637564809bc92d070ad901576bae5b17db0273 WHIRLPOOL 94948887c9ff642ab7e87695acb19b2a210946dd1938776d7d653017fc5231c9144e48c3d467f8c893513a29976d4e8b88457ed44bb0849cdb6f721e1ea576b0 +DIST gst-libav-1.4.5.tar.xz 5220508 SHA256 605c62624604f3bb5c870844cc1f2711779cc533b004c2aa1d8c0d58557afbbc SHA512 a2f9250a51440358d205ef160119498d52cf4944fe810e736e4561f2cdbb8dabad6220d6e4da507f013c42bea69ce72acc373982642278de0a03605bbcd4f75f WHIRLPOOL 075ad91101def8ee8958eaf3051390a76efa3860a4d6796b7f5f86f9b175ca493aa3094e59b24b19c59025337683178f43346e887d7b5efe46b0f9aeadcd28d2 diff --git a/media-plugins/gst-plugins-libav/files/gst-plugins-libav-1.2.4-ffmpeg2.patch b/media-plugins/gst-plugins-libav/files/gst-plugins-libav-1.2.4-ffmpeg2.patch new file mode 100644 index 000000000000..3deeea061512 --- /dev/null +++ b/media-plugins/gst-plugins-libav/files/gst-plugins-libav-1.2.4-ffmpeg2.patch @@ -0,0 +1,120 @@ +Index: gst-libav-1.2.0/ext/libav/gstavauddec.c +=================================================================== +--- gst-libav-1.2.0.orig/ext/libav/gstavauddec.c ++++ gst-libav-1.2.0/ext/libav/gstavauddec.c +@@ -460,7 +460,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.2.0/ext/libav/gstavaudenc.c +=================================================================== +--- gst-libav-1.2.0.orig/ext/libav/gstavaudenc.c ++++ gst-libav-1.2.0/ext/libav/gstavaudenc.c +@@ -289,7 +289,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.2.0/ext/libav/gstavcfg.c +=================================================================== +--- gst-libav-1.2.0.orig/ext/libav/gstavcfg.c ++++ gst-libav-1.2.0/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.2.0/ext/libav/gstavcodecmap.c +=================================================================== +--- gst-libav-1.2.0.orig/ext/libav/gstavcodecmap.c ++++ gst-libav-1.2.0/ext/libav/gstavcodecmap.c +@@ -788,12 +788,10 @@ 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", "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), +@@ -2892,18 +2890,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.2.0/ext/libav/gstavvidenc.c +=================================================================== +--- gst-libav-1.2.0.orig/ext/libav/gstavvidenc.c ++++ gst-libav-1.2.0/ext/libav/gstavvidenc.c +@@ -338,7 +338,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/files/gst-plugins-libav-1.2.4-fix-memory-leak.patch b/media-plugins/gst-plugins-libav/files/gst-plugins-libav-1.2.4-fix-memory-leak.patch new file mode 100644 index 000000000000..6745e800b6f7 --- /dev/null +++ b/media-plugins/gst-plugins-libav/files/gst-plugins-libav-1.2.4-fix-memory-leak.patch @@ -0,0 +1,96 @@ +--- ext/libav/gstavviddec.c ++++ ext/libav/gstavviddec.c +@@ -523,6 +523,7 @@ open_failed: + + typedef struct + { ++ GstFFMpegVidDec *ffmpegdec; + GstVideoCodecFrame *frame; + gboolean mapped; + GstVideoFrame vframe; +@@ -530,13 +531,17 @@ typedef struct + } GstFFMpegVidDecVideoFrame; + + static GstFFMpegVidDecVideoFrame * +-gst_ffmpegviddec_video_frame_new (GstVideoCodecFrame * frame) ++gst_ffmpegviddec_video_frame_new (GstFFMpegVidDec * ffmpegdec, ++ GstVideoCodecFrame * frame) + { + GstFFMpegVidDecVideoFrame *dframe; + + dframe = g_slice_new0 (GstFFMpegVidDecVideoFrame); ++ dframe->ffmpegdec = ffmpegdec; + dframe->frame = frame; + ++ GST_DEBUG_OBJECT (ffmpegdec, "new video frame %p", dframe); ++ + return dframe; + } + +@@ -544,6 +549,8 @@ static void + gst_ffmpegviddec_video_frame_free (GstFFMpegVidDec * ffmpegdec, + GstFFMpegVidDecVideoFrame * frame) + { ++ GST_DEBUG_OBJECT (ffmpegdec, "free video frame %p", frame); ++ + if (frame->mapped) + gst_video_frame_unmap (&frame->vframe); + gst_video_decoder_release_frame (GST_VIDEO_DECODER (ffmpegdec), frame->frame); +@@ -551,6 +558,14 @@ gst_ffmpegviddec_video_frame_free (GstFFMpegVidDec * ffmpegdec, + g_slice_free (GstFFMpegVidDecVideoFrame, frame); + } + ++static void ++dummy_free_buffer (void *opaque, uint8_t * data) ++{ ++ GstFFMpegVidDecVideoFrame *frame = opaque; ++ ++ gst_ffmpegviddec_video_frame_free (frame->ffmpegdec, frame); ++} ++ + /* called when ffmpeg wants us to allocate a buffer to write the decoded frame + * into. We try to give it memory from our pool */ + static int +@@ -589,7 +604,8 @@ gst_ffmpegviddec_get_buffer (AVCodecContext * context, AVFrame * picture) + goto duplicate_frame; + + /* GstFFMpegVidDecVideoFrame receives the frame ref */ +- picture->opaque = dframe = gst_ffmpegviddec_video_frame_new (frame); ++ picture->opaque = dframe = ++ gst_ffmpegviddec_video_frame_new (ffmpegdec, frame); + + GST_DEBUG_OBJECT (ffmpegdec, "storing opaque %p", dframe); + +@@ -695,12 +711,20 @@ invalid_frame: + fallback: + { + int c; ++ gboolean first = TRUE; + int ret = avcodec_default_get_buffer (context, picture); + + GST_LOG_OBJECT (ffmpegdec, "performing fallback alloc"); +- for (c = 0; c < AV_NUM_DATA_POINTERS; c++) ++ for (c = 0; c < AV_NUM_DATA_POINTERS; c++) { + ffmpegdec->stride[c] = picture->linesize[c]; + ++ if (picture->buf[c] == NULL && first) { ++ picture->buf[c] = ++ av_buffer_create (NULL, 0, dummy_free_buffer, dframe, 0); ++ first = FALSE; ++ } ++ } ++ + return ret; + } + duplicate_frame: +@@ -1684,8 +1718,8 @@ gst_ffmpegviddec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query) + avcodec_align_dimensions2 (ffmpegdec->context, &width, &height, + linesize_align); + edge = +- ffmpegdec->context-> +- flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width (); ++ ffmpegdec-> ++ context->flags & CODEC_FLAG_EMU_EDGE ? 0 : avcodec_get_edge_width (); + /* increase the size for the padding */ + width += edge << 1; + height += edge << 1; diff --git a/media-plugins/gst-plugins-libav/files/gst-plugins-libav-1.4.5-libav9.patch b/media-plugins/gst-plugins-libav/files/gst-plugins-libav-1.4.5-libav9.patch new file mode 100644 index 000000000000..a1a4f90db0cd --- /dev/null +++ b/media-plugins/gst-plugins-libav/files/gst-plugins-libav-1.4.5-libav9.patch @@ -0,0 +1,180 @@ +Add compatibility for libav-9 not to require still hardmasked libav-10. +aballier@gentoo.org + + +Index: work/gst-libav-1.4.5/ext/libav/gstavauddec.c +=================================================================== +--- work.orig/gst-libav-1.4.5/ext/libav/gstavauddec.c ++++ work/gst-libav-1.4.5/ext/libav/gstavauddec.c +@@ -582,9 +582,11 @@ gst_ffmpegauddec_audio_frame (GstFFMpegA + ffmpegdec->info.position); + } + ++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,17,0) + /* Mark corrupted frames as corrupted */ + if (frame.flags & AV_FRAME_FLAG_CORRUPT) + GST_BUFFER_FLAG_SET (*outbuf, GST_BUFFER_FLAG_CORRUPTED); ++#endif + } else { + *outbuf = NULL; + } +Index: work/gst-libav-1.4.5/ext/libav/gstavcodecmap.c +=================================================================== +--- work.orig/gst-libav-1.4.5/ext/libav/gstavcodecmap.c ++++ work/gst-libav-1.4.5/ext/libav/gstavcodecmap.c +@@ -1206,6 +1206,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodec + } + break; + ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,41,0) + case AV_CODEC_ID_HEVC: + caps = + gst_ff_vid_caps_new (context, NULL, codec_id, encode, "video/x-h265", +@@ -1226,6 +1227,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodec + g_value_unset (&arr); + } + break; ++#endif + + case AV_CODEC_ID_INDEO5: + caps = +@@ -1706,11 +1708,13 @@ gst_ffmpeg_codecid_to_caps (enum AVCodec + } + break; + ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,5,0) + case AV_CODEC_ID_AIC: + caps = + gst_ff_vid_caps_new (context, NULL, codec_id, encode, + "video/x-apple-intermediate-codec", NULL); + break; ++#endif + + case AV_CODEC_ID_WS_VQA: + case AV_CODEC_ID_IDCIN: +@@ -3760,9 +3764,11 @@ gst_ffmpeg_caps_to_codecid (const GstCap + id = AV_CODEC_ID_FFV1; + video = TRUE; + } ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,5,0) + } else if (!strcmp (mimetype, "video/x-apple-intermediate-codec")) { + id = AV_CODEC_ID_AIC; + video = TRUE; ++#endif + } else if (!strcmp (mimetype, "audio/x-adpcm")) { + const gchar *layout; + +@@ -3924,9 +3930,11 @@ gst_ffmpeg_caps_to_codecid (const GstCap + } else if (!strcmp (mimetype, "video/x-h264")) { + id = AV_CODEC_ID_H264; + video = TRUE; ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,41,0) + } else if (!strcmp (mimetype, "video/x-h265")) { + id = AV_CODEC_ID_HEVC; + video = TRUE; ++#endif + } else if (!strcmp (mimetype, "video/x-flash-video")) { + gint flvversion = 0; + +Index: work/gst-libav-1.4.5/ext/libav/gstavviddec.c +=================================================================== +--- work.orig/gst-libav-1.4.5/ext/libav/gstavviddec.c ++++ work/gst-libav-1.4.5/ext/libav/gstavviddec.c +@@ -368,8 +368,10 @@ gst_ffmpegviddec_open (GstFFMpegVidDec * + break; + } + ++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,17,0) + gst_ffmpegviddec_context_set_flags (ffmpegdec->context, + CODEC_FLAG_OUTPUT_CORRUPT, ffmpegdec->output_corrupt); ++#endif + + return TRUE; + +@@ -733,17 +735,21 @@ invalid_frame: + fallback: + { + int c; ++#if LIBAVUTIL_VERSION_MAJOR >= 53 + gboolean first = TRUE; ++#endif + int ret = avcodec_default_get_buffer (context, picture); + + for (c = 0; c < AV_NUM_DATA_POINTERS; c++) { + ffmpegdec->stride[c] = picture->linesize[c]; + ++#if LIBAVUTIL_VERSION_MAJOR >= 53 + if (picture->buf[c] == NULL && first) { + picture->buf[c] = + av_buffer_create (NULL, 0, dummy_free_buffer, dframe, 0); + first = FALSE; + } ++#endif + } + + return ret; +@@ -1280,8 +1286,10 @@ gst_ffmpegviddec_video_frame (GstFFMpegV + ffmpegdec->picture->repeat_pict); + GST_DEBUG_OBJECT (ffmpegdec, "interlaced_frame:%d (current:%d)", + ffmpegdec->picture->interlaced_frame, ffmpegdec->ctx_interlaced); ++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,17,0) + GST_DEBUG_OBJECT (ffmpegdec, "corrupted frame: %d", + ! !(ffmpegdec->picture->flags & AV_FRAME_FLAG_CORRUPT)); ++#endif + + if (G_UNLIKELY (ffmpegdec->picture->interlaced_frame != + ffmpegdec->ctx_interlaced)) { +@@ -1298,9 +1306,11 @@ gst_ffmpegviddec_video_frame (GstFFMpegV + if (G_UNLIKELY (*ret != GST_FLOW_OK)) + goto no_output; + ++#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52,17,0) + /* Mark corrupted frames as corrupted */ + if (ffmpegdec->picture->flags & AV_FRAME_FLAG_CORRUPT) + GST_BUFFER_FLAG_SET (out_frame->output_buffer, GST_BUFFER_FLAG_CORRUPTED); ++#endif + + if (ffmpegdec->ctx_interlaced) { + /* set interlaced flags */ +@@ -1980,7 +1990,9 @@ gst_ffmpegviddec_register (GstPlugin * p + case AV_CODEC_ID_MPEG4: + case AV_CODEC_ID_MSMPEG4V3: + case AV_CODEC_ID_H264: ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,41,0) + case AV_CODEC_ID_HEVC: ++#endif + case AV_CODEC_ID_RV10: + case AV_CODEC_ID_RV20: + case AV_CODEC_ID_RV30: +Index: work/gst-libav-1.4.5/ext/libav/gstavaudenc.c +=================================================================== +--- work.orig/gst-libav-1.4.5/ext/libav/gstavaudenc.c ++++ work/gst-libav-1.4.5/ext/libav/gstavaudenc.c +@@ -409,7 +409,11 @@ gst_ffmpegaudenc_set_format (GstAudioEnc + static void + gst_ffmpegaudenc_free_avpacket (gpointer pkt) + { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,16,0) + av_packet_unref ((AVPacket *) pkt); ++#else ++ av_destruct_packet ((AVPacket *) pkt); ++#endif + g_slice_free (AVPacket, pkt); + } + +Index: work/gst-libav-1.4.5/ext/libav/gstavvidenc.c +=================================================================== +--- work.orig/gst-libav-1.4.5/ext/libav/gstavvidenc.c ++++ work/gst-libav-1.4.5/ext/libav/gstavvidenc.c +@@ -576,7 +576,11 @@ gst_ffmpegvidenc_propose_allocation (Gst + static void + gst_ffmpegvidenc_free_avpacket (gpointer pkt) + { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,16,0) + av_packet_unref ((AVPacket *) pkt); ++#else ++ av_destruct_packet ((AVPacket *) pkt); ++#endif + g_slice_free (AVPacket, pkt); + } + diff --git a/media-plugins/gst-plugins-libav/gst-plugins-libav-1.2.4-r1.ebuild b/media-plugins/gst-plugins-libav/gst-plugins-libav-1.2.4-r1.ebuild new file mode 100644 index 000000000000..6b8fa349b307 --- /dev/null +++ b/media-plugins/gst-plugins-libav/gst-plugins-libav-1.2.4-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +inherit eutils flag-o-matic multilib-minimal + +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" + +LICENSE="GPL-2" +SLOT="1.0" +KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="libav +orc" + +RDEPEND=" + >=media-libs/gstreamer-1.2.3:1.0[${MULTILIB_USEDEP}] + >=media-libs/gst-plugins-base-1.2.3:1.0[${MULTILIB_USEDEP}] + libav? ( + <media-video/libav-10:0=[${MULTILIB_USEDEP}] + >=media-video/libav-9.12:0=[${MULTILIB_USEDEP}] ) + !libav? ( >=media-video/ffmpeg-1.2.6-r1:0=[${MULTILIB_USEDEP}] ) + orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + >=dev-util/gtk-doc-am-1.12 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] +" + +S="${WORKDIR}/${MY_PN}-${PV}" + +src_prepare() { + # 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}/${PN}-1.2.4-ffmpeg2.patch" + epatch "${FILESDIR}/${PN}-1.2.4-fix-memory-leak.patch" #494282 + fi +} + +multilib_src_configure() { + GST_PLUGINS_BUILD="" + # always use system ffmpeg/libav if possible + ECONF_SOURCE=${S} \ + 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) +} + +multilib_src_compile() { + # Don't build with -Werror + emake ERROR_CFLAGS= +} + +multilib_src_install_all() { + einstalldocs + prune_libtool_files --modules +} + +pkg_postinst() { + if ! use libav; 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 +} diff --git a/media-plugins/gst-plugins-libav/gst-plugins-libav-1.2.4.ebuild b/media-plugins/gst-plugins-libav/gst-plugins-libav-1.2.4.ebuild new file mode 100644 index 000000000000..d21cfa1da4bb --- /dev/null +++ b/media-plugins/gst-plugins-libav/gst-plugins-libav-1.2.4.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +inherit eutils flag-o-matic multilib-minimal + +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" + +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.2.3:1.0[${MULTILIB_USEDEP}] + >=media-libs/gst-plugins-base-1.2.3:1.0[${MULTILIB_USEDEP}] + >=virtual/ffmpeg-9-r1[${MULTILIB_USEDEP}] + !!>=media-video/libav-10 + orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + >=dev-util/gtk-doc-am-1.12 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] +" + +S="${WORKDIR}/${MY_PN}-${PV}" + +src_prepare() { + # 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}/${PN}-1.2.4-ffmpeg2.patch" + epatch "${FILESDIR}/${PN}-1.2.4-fix-memory-leak.patch" #494282 + fi +} + +multilib_src_configure() { + GST_PLUGINS_BUILD="" + # always use system ffmpeg/libav if possible + ECONF_SOURCE=${S} \ + 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) +} + +multilib_src_compile() { + # Don't build with -Werror + emake ERROR_CFLAGS= +} + +multilib_src_install_all() { + einstalldocs + 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 +} diff --git a/media-plugins/gst-plugins-libav/gst-plugins-libav-1.4.5-r1.ebuild b/media-plugins/gst-plugins-libav/gst-plugins-libav-1.4.5-r1.ebuild new file mode 100644 index 000000000000..168beaa07aa1 --- /dev/null +++ b/media-plugins/gst-plugins-libav/gst-plugins-libav-1.4.5-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +inherit eutils flag-o-matic multilib-minimal + +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" + +LICENSE="GPL-2" +SLOT="1.0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="libav +orc" + +RDEPEND=" + >=media-libs/gstreamer-1.4.0:1.0[${MULTILIB_USEDEP}] + >=media-libs/gst-plugins-base-1.4.0:1.0[${MULTILIB_USEDEP}] + !libav? ( >=media-video/ffmpeg-2.2:0=[${MULTILIB_USEDEP}] ) + libav? ( >=media-video/libav-9:0=[${MULTILIB_USEDEP}] ) + orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + app-arch/xz-utils + >=dev-util/gtk-doc-am-1.12 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] +" + +S="${WORKDIR}/${MY_PN}-${PV}" + +src_prepare() { + # https://bugzilla.gnome.org/show_bug.cgi?id=743984 + epatch "${FILESDIR}/${PN}-1.4.5-libav9.patch" +} + +multilib_src_configure() { + GST_PLUGINS_BUILD="" + # always use system ffmpeg/libav if possible + ECONF_SOURCE=${S} \ + 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) +} + +multilib_src_compile() { + # Don't build with -Werror + emake ERROR_CFLAGS= +} + +multilib_src_install_all() { + einstalldocs + prune_libtool_files --modules +} diff --git a/media-plugins/gst-plugins-libav/gst-plugins-libav-1.4.5.ebuild b/media-plugins/gst-plugins-libav/gst-plugins-libav-1.4.5.ebuild new file mode 100644 index 000000000000..f211f52b632f --- /dev/null +++ b/media-plugins/gst-plugins-libav/gst-plugins-libav-1.4.5.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +inherit eutils flag-o-matic multilib-minimal + +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" + +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.4.0:1.0[${MULTILIB_USEDEP}] + >=media-libs/gst-plugins-base-1.4.0:1.0[${MULTILIB_USEDEP}] + || ( >=media-video/ffmpeg-2.2:0[${MULTILIB_USEDEP}] >=media-video/libav-9[${MULTILIB_USEDEP}] ) + orc? ( >=dev-lang/orc-0.4.17[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + app-arch/xz-utils + >=dev-util/gtk-doc-am-1.12 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] +" + +S="${WORKDIR}/${MY_PN}-${PV}" + +src_prepare() { + # https://bugzilla.gnome.org/show_bug.cgi?id=743984 + epatch "${FILESDIR}/${PN}-1.4.5-libav9.patch" +} + +multilib_src_configure() { + GST_PLUGINS_BUILD="" + # always use system ffmpeg/libav if possible + ECONF_SOURCE=${S} \ + 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) +} + +multilib_src_compile() { + # Don't build with -Werror + emake ERROR_CFLAGS= +} + +multilib_src_install_all() { + einstalldocs + prune_libtool_files --modules +} diff --git a/media-plugins/gst-plugins-libav/metadata.xml b/media-plugins/gst-plugins-libav/metadata.xml new file mode 100644 index 000000000000..d1096fb54bd8 --- /dev/null +++ b/media-plugins/gst-plugins-libav/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>gstreamer</herd> +</pkgmetadata> |