From owner-svn-ports-all@freebsd.org Tue May 1 04:54:39 2018 Return-Path: Delivered-To: svn-ports-all@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 30192FC5123; Tue, 1 May 2018 04:54:39 +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 D754D6ACF9; Tue, 1 May 2018 04:54:38 +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 CF4DF1D7D6; Tue, 1 May 2018 04:54:38 +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 w414sc2D066197; Tue, 1 May 2018 04:54:38 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w414sck9066196; Tue, 1 May 2018 04:54:38 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201805010454.w414sck9066196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Tue, 1 May 2018 04:54:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r468753 - head/multimedia/webcamoid/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/multimedia/webcamoid/files X-SVN-Commit-Revision: 468753 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2018 04:54:39 -0000 Author: jbeich Date: Tue May 1 04:54:38 2018 New Revision: 468753 URL: https://svnweb.freebsd.org/changeset/ports/468753 Log: multimedia/webcamoid: unbreak with ffmpeg 4.0 src/mediawriterffmpeg.cpp:254:47: error: 'CODEC_CAP_EXPERIMENTAL' was not declared in this scope if (codec->capabilities & CODEC_CAP_EXPERIMENTAL ^~~~~~~~~~~~~~~~~~~~~~ PR: 227726 Reported by: antoine (via exp-run) Added: head/multimedia/webcamoid/files/patch-ffmpeg4 (contents, props changed) Added: head/multimedia/webcamoid/files/patch-ffmpeg4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/webcamoid/files/patch-ffmpeg4 Tue May 1 04:54:38 2018 (r468753) @@ -0,0 +1,152 @@ +https://github.com/webcamoid/webcamoid/pull/119 + +--- libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.cpp.orig 2017-10-09 06:45:30 UTC ++++ libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.cpp +@@ -62,7 +62,7 @@ AbstractStream::AbstractStream(const AVFormatContext * + + // Some formats want stream headers to be separate. + if (formatContext->oformat->flags & AVFMT_GLOBALHEADER) +- this->m_codecContext->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ this->m_codecContext->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + + this->m_codecContext->strict_std_compliance = CODEC_COMPLIANCE; + +--- libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.h.orig 2017-10-09 06:45:30 UTC ++++ libAvKys/Plugins/MultiSink/src/ffmpeg/src/abstractstream.h +@@ -29,6 +29,15 @@ extern "C" + { + #include + #include ++ #ifndef AV_CODEC_CAP_EXPERIMENTAL ++ #define AV_CODEC_CAP_EXPERIMENTAL CODEC_CAP_EXPERIMENTAL ++ #endif ++ #ifndef AV_CODEC_CAP_VARIABLE_FRAME_SIZE ++ #define AV_CODEC_CAP_VARIABLE_FRAME_SIZE CODEC_CAP_VARIABLE_FRAME_SIZE ++ #endif ++ #ifndef AV_CODEC_FLAG_GLOBAL_HEADER ++ #define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER ++ #endif + } + + #define CODEC_COMPLIANCE FF_COMPLIANCE_VERY_STRICT +--- libAvKys/Plugins/MultiSink/src/ffmpeg/src/audiostream.cpp.orig 2017-10-09 06:45:30 UTC ++++ libAvKys/Plugins/MultiSink/src/ffmpeg/src/audiostream.cpp +@@ -267,7 +267,7 @@ void AudioStream::convertPacket(const AkPacket &packet + this->deleteFrame(&this->m_frame); + this->m_frame = oFrame; + +- if (codecContext->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE ++ if (codecContext->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE + || oFrame->nb_samples >= codecContext->frame_size) { + this->m_frameReady.wakeAll(); + } +@@ -280,7 +280,7 @@ int AudioStream::encodeData(AVFrame *frame) + auto codecContext = this->codecContext(); + + if (!frame +- && codecContext->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) ++ && codecContext->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) + return AVERROR_EOF; + + if (frame) { +@@ -366,7 +366,7 @@ AVFrame *AudioStream::dequeueFrame() + this->m_frameMutex.lock(); + + if (!this->m_frame +- || (!(codecContext->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) ++ || (!(codecContext->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) + && this->m_frame->nb_samples < codecContext->frame_size)) { + if (!this->m_frameReady.wait(&this->m_frameMutex, THREAD_WAIT_LIMIT)) { + this->m_frameMutex.unlock(); +@@ -377,7 +377,7 @@ AVFrame *AudioStream::dequeueFrame() + + AVFrame *oFrame = nullptr; + +- if (codecContext->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE ++ if (codecContext->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE + || this->m_frame->nb_samples == codecContext->frame_size) { + oFrame = this->m_frame; + this->m_frame = nullptr; +--- libAvKys/Plugins/MultiSink/src/ffmpeg/src/mediawriterffmpeg.cpp.orig 2017-10-09 06:45:30 UTC ++++ libAvKys/Plugins/MultiSink/src/ffmpeg/src/mediawriterffmpeg.cpp +@@ -251,7 +251,7 @@ class MediaWriterFFmpegGlobal + AVCodec *codec = nullptr; + + while ((codec = av_codec_next(codec))) { +- if (codec->capabilities & CODEC_CAP_EXPERIMENTAL ++ if (codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL + && CODEC_COMPLIANCE > FF_COMPLIANCE_EXPERIMENTAL) + continue; + +--- libAvKys/Plugins/MultiSink/src/ffmpeg/src/videostream.cpp.orig 2017-10-09 06:45:30 UTC ++++ libAvKys/Plugins/MultiSink/src/ffmpeg/src/videostream.cpp +@@ -273,8 +273,10 @@ int VideoStream::encodeData(AVFrame *frame) + { + auto formatContext = this->formatContext(); + ++#ifdef AVFMT_RAWPICTURE + if (!frame && formatContext->oformat->flags & AVFMT_RAWPICTURE) + return AVERROR_EOF; ++#endif + + auto codecContext = this->codecContext(); + +@@ -300,6 +302,7 @@ int VideoStream::encodeData(AVFrame *frame) + + auto stream = this->stream(); + ++#ifdef AVFMT_RAWPICTURE + if (formatContext->oformat->flags & AVFMT_RAWPICTURE) { + // Raw video case - directly store the picture in the packet + AVPacket pkt; +@@ -315,6 +318,7 @@ int VideoStream::encodeData(AVFrame *frame) + + return 0; + } ++#endif + + // encode the image + #ifdef HAVE_SENDRECV +--- libAvKys/Plugins/MultiSrc/src/ffmpeg/src/abstractstream.cpp.orig 2017-10-09 06:45:30 UTC ++++ libAvKys/Plugins/MultiSrc/src/ffmpeg/src/abstractstream.cpp +@@ -96,8 +96,10 @@ AbstractStream::AbstractStream(const AVFormatContext * + this->m_codecContext->idct_algo = FF_IDCT_AUTO; + this->m_codecContext->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK; + ++#ifdef CODEC_FLAG_EMU_EDGE + if (this->m_codec->capabilities & CODEC_CAP_DR1) + this->m_codecContext->flags |= CODEC_FLAG_EMU_EDGE; ++#endif + + av_dict_set(&this->m_codecOptions, "refcounted_frames", "0", 0); + } +--- libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.cpp.orig 2017-10-09 06:45:30 UTC ++++ libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.cpp +@@ -219,11 +219,13 @@ bool ConvertVideoFFmpeg::init(const AkCaps &caps) + if (!this->m_codecContext) + return false; + +- if (codec->capabilities & CODEC_CAP_TRUNCATED) +- this->m_codecContext->flags |= CODEC_FLAG_TRUNCATED; ++ if (codec->capabilities & AV_CODEC_CAP_TRUNCATED) ++ this->m_codecContext->flags |= AV_CODEC_FLAG_TRUNCATED; + ++#ifdef CODEC_FLAG_EMU_EDGE + if (codec->capabilities & CODEC_CAP_DR1) + this->m_codecContext->flags |= CODEC_FLAG_EMU_EDGE; ++#endif + + this->m_codecContext->pix_fmt = rawToFF->value(fourcc, AV_PIX_FMT_NONE); + this->m_codecContext->width = caps.property("width").toInt(); +--- libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.h.orig 2017-10-09 06:45:30 UTC ++++ libAvKys/Plugins/VideoCapture/src/ffmpeg/src/convertvideoffmpeg.h +@@ -33,6 +33,9 @@ extern "C" + #include + #include + #include ++ #ifndef AV_CODEC_FLAG_TRUNCATED ++ #define AV_CODEC_FLAG_TRUNCATED CODEC_FLAG_TRUNCATED ++ #endif + } + + #include "convertvideo.h"