From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 223861395E2 for ; Mon, 5 Dec 2016 12:11:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5114AE0C70; Mon, 5 Dec 2016 12:11:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0CF03E0C70 for ; Mon, 5 Dec 2016 12:11:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D13123411B5 for ; Mon, 5 Dec 2016 12:11:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 49E49495 for ; Mon, 5 Dec 2016 12:11:30 +0000 (UTC) From: "Alexis Ballier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexis Ballier" Message-ID: <1480939882.a3b9e2c859ba23d5f868fd6b4d6ac89eeb47c04c.aballier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/bino/files/, media-video/bino/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/bino/bino-1.6.1-r2.ebuild media-video/bino/files/ffmpeg_2.9.patch X-VCS-Directories: media-video/bino/ media-video/bino/files/ X-VCS-Committer: aballier X-VCS-Committer-Name: Alexis Ballier X-VCS-Revision: a3b9e2c859ba23d5f868fd6b4d6ac89eeb47c04c X-VCS-Branch: master Date: Mon, 5 Dec 2016 12:11:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6cf39671-1e10-4996-a4ef-2ab1ecae9747 X-Archives-Hash: 3c314a0b1c224206969832533713e0a3 commit: a3b9e2c859ba23d5f868fd6b4d6ac89eeb47c04c Author: Alexis Ballier gentoo org> AuthorDate: Mon Dec 5 12:11:01 2016 +0000 Commit: Alexis Ballier gentoo org> CommitDate: Mon Dec 5 12:11:22 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3b9e2c8 media-video/bino: apply debian patch to build with ffmpeg 3, bug #587860 Package-Manager: portage-2.3.2 media-video/bino/bino-1.6.1-r2.ebuild | 1 + media-video/bino/files/ffmpeg_2.9.patch | 133 ++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) diff --git a/media-video/bino/bino-1.6.1-r2.ebuild b/media-video/bino/bino-1.6.1-r2.ebuild index 708c92d..4442bd2 100644 --- a/media-video/bino/bino-1.6.1-r2.ebuild +++ b/media-video/bino/bino-1.6.1-r2.ebuild @@ -46,6 +46,7 @@ DOCS=( AUTHORS ChangeLog NEWS README README.Linux ) PATCHES=( "${FILESDIR}/${PN}-1.4.2-lirc-detect.patch" # detect lirc + "${FILESDIR}/ffmpeg_2.9.patch" # build with latest ffmpeg, #587860 ) src_configure() { diff --git a/media-video/bino/files/ffmpeg_2.9.patch b/media-video/bino/files/ffmpeg_2.9.patch new file mode 100644 index 00000000..c790d6e --- /dev/null +++ b/media-video/bino/files/ffmpeg_2.9.patch @@ -0,0 +1,133 @@ +https://bugs.gentoo.org/show_bug.cgi?id=587860 +https://github.com/schaal/bino/blob/master/debian/patches/ffmpeg_2.9.patch + +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun +Last-Update: <2015-11-02> + +--- bino-1.6.0.orig/src/media_object.cpp ++++ bino-1.6.0/src/media_object.cpp +@@ -427,20 +427,20 @@ void media_object::set_video_frame_templ + video_frame_template.value_range = video_frame::u8_full; + video_frame_template.chroma_location = video_frame::center; + if (!_always_convert_to_bgra32 +- && (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P +- || video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10 +- || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P +- || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10 +- || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P +- || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P10)) ++ && (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P ++ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10 ++ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P ++ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10 ++ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P ++ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P10)) + { +- if (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P +- || video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10) ++ if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P ++ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10) + { + video_frame_template.layout = video_frame::yuv444p; + } +- else if (video_codec_ctx->pix_fmt == PIX_FMT_YUV422P +- || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10) ++ else if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P ++ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10) + { + video_frame_template.layout = video_frame::yuv422p; + } +@@ -453,9 +453,9 @@ void media_object::set_video_frame_templ + { + video_frame_template.color_space = video_frame::yuv709; + } +- if (video_codec_ctx->pix_fmt == PIX_FMT_YUV444P10 +- || video_codec_ctx->pix_fmt == PIX_FMT_YUV422P10 +- || video_codec_ctx->pix_fmt == PIX_FMT_YUV420P10) ++ if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV444P10 ++ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV422P10 ++ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUV420P10) + { + video_frame_template.value_range = video_frame::u10_mpeg; + if (video_codec_ctx->color_range == AVCOL_RANGE_JPEG) +@@ -482,15 +482,15 @@ void media_object::set_video_frame_templ + } + } + else if (!_always_convert_to_bgra32 +- && (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ444P +- || video_codec_ctx->pix_fmt == PIX_FMT_YUVJ422P +- || video_codec_ctx->pix_fmt == PIX_FMT_YUVJ420P)) ++ && (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ444P ++ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ422P ++ || video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ420P)) + { +- if (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ444P) ++ if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ444P) + { + video_frame_template.layout = video_frame::yuv444p; + } +- else if (video_codec_ctx->pix_fmt == PIX_FMT_YUVJ422P) ++ else if (video_codec_ctx->pix_fmt == AV_PIX_FMT_YUVJ422P) + { + video_frame_template.layout = video_frame::yuv422p; + } +@@ -898,15 +898,6 @@ void media_object::open(const std::strin + // Activate multithreaded decoding. This must be done before opening the codec; see + // http://lists.gnu.org/archive/html/bino-list/2011-08/msg00019.html + codec_ctx->thread_count = video_decoding_threads(); +- // Set CODEC_FLAG_EMU_EDGE in the same situations in which ffplay sets it. +- // I don't know what exactly this does, but it is necessary to fix the problem +- // described in this thread: http://lists.nongnu.org/archive/html/bino-list/2012-02/msg00039.html +- int lowres = 0; +-#ifdef FF_API_LOWRES +- lowres = codec_ctx->lowres; +-#endif +- if (lowres || (codec && (codec->capabilities & CODEC_CAP_DR1))) +- codec_ctx->flags |= CODEC_FLAG_EMU_EDGE; + } + // Find and open the codec. AV_CODEC_ID_TEXT is a special case: it has no decoder since it is unencoded raw data. + if (codec_ctx->codec_id != AV_CODEC_ID_TEXT && (!codec || (e = avcodec_open2(codec_ctx, codec, NULL)) < 0)) +@@ -944,8 +935,8 @@ void media_object::open(const std::strin + _ffmpeg->video_frames.push_back(av_frame_alloc()); + _ffmpeg->video_buffered_frames.push_back(av_frame_alloc()); + #endif +- enum PixelFormat frame_fmt = (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32 +- ? PIX_FMT_BGRA : _ffmpeg->video_codec_ctxs[j]->pix_fmt); ++ enum AVPixelFormat frame_fmt = (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32 ++ ? AV_PIX_FMT_BGRA : _ffmpeg->video_codec_ctxs[j]->pix_fmt); + int frame_bufsize = (avpicture_get_size(frame_fmt, + _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height)); + _ffmpeg->video_buffers.push_back(static_cast(av_malloc(frame_bufsize))); +@@ -958,7 +949,7 @@ void media_object::open(const std::strin + if (_ffmpeg->video_frame_templates[j].layout == video_frame::bgra32) + { + // Initialize things needed for software pixel format conversion +- int sws_bufsize = avpicture_get_size(PIX_FMT_BGRA, ++ int sws_bufsize = avpicture_get_size(AV_PIX_FMT_BGRA, + _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height); + #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 28, 1) + _ffmpeg->video_sws_frames.push_back(avcodec_alloc_frame()); +@@ -971,11 +962,11 @@ void media_object::open(const std::strin + throw exc(HERE + ": " + strerror(ENOMEM)); + } + avpicture_fill(reinterpret_cast(_ffmpeg->video_sws_frames[j]), _ffmpeg->video_sws_buffers[j], +- PIX_FMT_BGRA, _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height); ++ AV_PIX_FMT_BGRA, _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height); + // Call sws_getCachedContext(NULL, ...) instead of sws_getContext(...) just to avoid a deprecation warning. + _ffmpeg->video_sws_ctxs.push_back(sws_getCachedContext(NULL, + _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, _ffmpeg->video_codec_ctxs[j]->pix_fmt, +- _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, PIX_FMT_BGRA, ++ _ffmpeg->video_codec_ctxs[j]->width, _ffmpeg->video_codec_ctxs[j]->height, AV_PIX_FMT_BGRA, + SWS_POINT, NULL, NULL, NULL)); + if (!_ffmpeg->video_sws_ctxs[j]) + { +@@ -1529,7 +1520,7 @@ read_frame: + // We need to buffer the data because FFmpeg will clubber it when decoding the next frame. + av_picture_copy(reinterpret_cast(_ffmpeg->video_buffered_frames[_video_stream]), + reinterpret_cast(_ffmpeg->video_frames[_video_stream]), +- static_cast(_ffmpeg->video_codec_ctxs[_video_stream]->pix_fmt), ++ static_cast(_ffmpeg->video_codec_ctxs[_video_stream]->pix_fmt), + _ffmpeg->video_codec_ctxs[_video_stream]->width, + _ffmpeg->video_codec_ctxs[_video_stream]->height); + src_frame = _ffmpeg->video_buffered_frames[_video_stream];