From owner-svn-ports-head@freebsd.org Fri Apr 27 10:39:11 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A8D3FA4711; Fri, 27 Apr 2018 10:39:11 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFFF071F21; Fri, 27 Apr 2018 10:39:10 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E56142550C; Fri, 27 Apr 2018 10:39:10 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3RAdATh015421; Fri, 27 Apr 2018 10:39:10 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3RAdAVK015420; Fri, 27 Apr 2018 10:39:10 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201804271039.w3RAdAVK015420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 27 Apr 2018 10:39:10 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r468417 - head/multimedia/QtAV/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/multimedia/QtAV/files X-SVN-Commit-Revision: 468417 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2018 10:39:11 -0000 Author: jbeich Date: Fri Apr 27 10:39:10 2018 New Revision: 468417 URL: https://svnweb.freebsd.org/changeset/ports/468417 Log: multimedia/QtAV: unbreak with ffmpeg 4.0 In file included from /wrkdirs/usr/ports/multimedia/QtAV/work/QtAV-1.12.0/src/AudioResamplerFF.cpp:23: In file included from /wrkdirs/usr/ports/multimedia/QtAV/work/QtAV-1.12.0/src/AudioResamplerTemplate.cpp:24: In file included from /wrkdirs/usr/ports/multimedia/QtAV/work/QtAV-1.12.0/src/QtAV/private/AudioResampler_p.h:26: src/QtAV/private/AVCompat.h:82:10: fatal error: 'libavfilter/avfiltergraph.h' file not found #include /*code is here for old version*/ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PR: 227726 Obtained from: upstream Added: head/multimedia/QtAV/files/patch-ffmpeg4 (contents, props changed) Added: head/multimedia/QtAV/files/patch-ffmpeg4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/QtAV/files/patch-ffmpeg4 Fri Apr 27 10:39:10 2018 (r468417) @@ -0,0 +1,111 @@ +https://github.com/wang-bin/QtAV/commit/7f6929b49c25 +https://github.com/wang-bin/QtAV/commit/1633f2962e19 + +--- src/AVMuxer.cpp.orig 2017-06-21 01:47:15 UTC ++++ src/AVMuxer.cpp +@@ -122,7 +122,7 @@ AVStream *AVMuxer::Private::addStream(AVFormatContext* + c->time_base = s->time_base; + /* Some formats want stream headers to be separate. */ + if (ctx->oformat->flags & AVFMT_GLOBALHEADER) +- c->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + // expose avctx to encoder and set properties in encoder? + // list codecs for a given format in ui + return s; +--- src/QtAV/private/AVCompat.h.orig 2017-06-21 01:47:15 UTC ++++ src/QtAV/private/AVCompat.h +@@ -59,6 +59,7 @@ extern "C" + #include + #include + #include ++#include + + #if !FFMPEG_MODULE_CHECK(LIBAVUTIL, 51, 73, 101) + #include +@@ -79,8 +80,11 @@ extern "C" + #endif //QTAV_HAVE(AVRESAMPLE) + + #if QTAV_HAVE(AVFILTER) ++#if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,8,0) + #include /*code is here for old version*/ ++#else + #include ++#endif + #include + #include + #endif //QTAV_HAVE(AVFILTER) +@@ -456,3 +460,15 @@ const char *get_codec_long_name(AVCodecID id); + } } while(0) + + #endif //QTAV_COMPAT_H ++ ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,33,0) ++#define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER ++#endif ++ ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,56,100) ++#define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE ++#endif ++ ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,56,100) ++#define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE ++#endif +--- src/codec/audio/AudioEncoderFFmpeg.cpp.orig 2017-06-21 01:47:15 UTC ++++ src/codec/audio/AudioEncoderFFmpeg.cpp +@@ -153,8 +153,8 @@ bool AudioEncoderFFmpegPrivate::open() + } else { + buffer_size = frame_size*format_used.bytesPerSample()*format_used.channels()*2+200; + } +- if (buffer_size < FF_MIN_BUFFER_SIZE) +- buffer_size = FF_MIN_BUFFER_SIZE; ++ if (buffer_size < AV_INPUT_BUFFER_MIN_SIZE) ++ buffer_size = AV_INPUT_BUFFER_MIN_SIZE; + buffer.resize(buffer_size); + return true; + } +--- src/codec/video/VideoEncoderFFmpeg.cpp.orig 2017-06-21 01:47:15 UTC ++++ src/codec/video/VideoEncoderFFmpeg.cpp +@@ -245,7 +245,7 @@ bool VideoEncoderFFmpegPrivate::open() + applyOptionsForContext(); + AV_ENSURE_OK(avcodec_open2(avctx, codec, &dict), false); + // from mpv ao_lavc +- const int buffer_size = qMax(qMax(width*height*6+200, FF_MIN_BUFFER_SIZE), sizeof(AVPicture));//?? ++ const int buffer_size = qMax(qMax(width*height*6+200, AV_INPUT_BUFFER_MIN_SIZE), sizeof(AVPicture));//?? + buffer.resize(buffer_size); + return true; + } +--- src/filter/LibAVFilter.cpp.orig 2017-06-21 01:47:15 UTC ++++ src/filter/LibAVFilter.cpp +@@ -120,7 +120,10 @@ class LibAVFilter::Private (public) + // pixel_aspect==sar, pixel_aspect is more compatible + QString buffersrc_args = args; + qDebug("buffersrc_args=%s", buffersrc_args.toUtf8().constData()); +- AVFilter *buffersrc = avfilter_get_by_name(video ? "buffer" : "abuffer"); ++#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(7,0,0) ++ const ++#endif ++ AVFilter *buffersrc = avfilter_get_by_name(video ? "buffer" : "abuffer"); + Q_ASSERT(buffersrc); + AV_ENSURE_OK(avfilter_graph_create_filter(&in_filter_ctx, + buffersrc, +@@ -128,6 +131,9 @@ class LibAVFilter::Private (public) + filter_graph) + , false); + /* buffer video sink: to terminate the filter chain. */ ++#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(7,0,0) ++ const ++#endif + AVFilter *buffersink = avfilter_get_by_name(video ? "buffersink" : "abuffersink"); + Q_ASSERT(buffersink); + AV_ENSURE_OK(avfilter_graph_create_filter(&out_filter_ctx, buffersink, "out", +--- src/subtitle/SubtitleProcessorFFmpeg.cpp.orig 2017-06-21 01:47:15 UTC ++++ src/subtitle/SubtitleProcessorFFmpeg.cpp +@@ -249,7 +249,7 @@ bool SubtitleProcessorFFmpeg::processHeader(const QByt + codec_ctx->time_base.den = 1000; + if (!data.isEmpty()) { + av_free(codec_ctx->extradata); +- codec_ctx->extradata = (uint8_t*)av_mallocz(data.size() + FF_INPUT_BUFFER_PADDING_SIZE); ++ codec_ctx->extradata = (uint8_t*)av_mallocz(data.size() + AV_INPUT_BUFFER_PADDING_SIZE); + if (!codec_ctx->extradata) + return false; + codec_ctx->extradata_size = data.size();