From owner-svn-ports-all@freebsd.org Fri May 4 11:41:29 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 92A48FAA2DC; Fri, 4 May 2018 11:41:29 +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 0997884729; Fri, 4 May 2018 11:41:29 +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 049A16656; Fri, 4 May 2018 11:41:29 +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 w44BfS3e058213; Fri, 4 May 2018 11:41:28 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w44BfSRC058211; Fri, 4 May 2018 11:41:28 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201805041141.w44BfSRC058211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 4 May 2018 11:41:28 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r469021 - in head/multimedia/simplescreenrecorder: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in head/multimedia/simplescreenrecorder: . files X-SVN-Commit-Revision: 469021 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: Fri, 04 May 2018 11:41:29 -0000 Author: jbeich Date: Fri May 4 11:41:28 2018 New Revision: 469021 URL: https://svnweb.freebsd.org/changeset/ports/469021 Log: multimedia/simplescreenrecorder: unbreak with ffmpeg 4.0 src/AV/Output/AudioEncoder.cpp:61:51: error: use of undeclared identifier 'CODEC_CAP_VARIABLE_FRAME_SIZE' return (GetCodecContext()->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)? DEFAULT_FRAME_SAMPLES : GetCodecContext()->frame_size; ^ src/AV/Output/AudioEncoder.cpp:125:28: error: use of undeclared identifier 'CODEC_FLAG_QSCALE' codec_context->flags |= CODEC_FLAG_QSCALE; ^ PR: 227726 Reported by: antoine (via exp-run) Added: head/multimedia/simplescreenrecorder/files/patch-ffmpeg4 (contents, props changed) Modified: head/multimedia/simplescreenrecorder/Makefile (contents, props changed) Modified: head/multimedia/simplescreenrecorder/Makefile ============================================================================== --- head/multimedia/simplescreenrecorder/Makefile Fri May 4 11:41:14 2018 (r469020) +++ head/multimedia/simplescreenrecorder/Makefile Fri May 4 11:41:28 2018 (r469021) @@ -12,8 +12,6 @@ COMMENT= Screen video recorder LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN= fails to build with ffmpeg 4.0 - LIB_DEPENDS= libasound.so:audio/alsa-lib \ libavformat.so:multimedia/ffmpeg Added: head/multimedia/simplescreenrecorder/files/patch-ffmpeg4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/simplescreenrecorder/files/patch-ffmpeg4 Fri May 4 11:41:28 2018 (r469021) @@ -0,0 +1,59 @@ +https://github.com/MaartenBaert/ssr/issues/640 + +--- src/AV/Output/AudioEncoder.cpp.orig 2018-03-18 17:25:55 UTC ++++ src/AV/Output/AudioEncoder.cpp +@@ -58,7 +58,7 @@ AudioEncoder::~AudioEncoder() { + + unsigned int AudioEncoder::GetFrameSize() { + #if SSR_USE_AVCODEC_ENCODE_AUDIO2 +- return (GetCodecContext()->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)? DEFAULT_FRAME_SAMPLES : GetCodecContext()->frame_size; ++ return (GetCodecContext()->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE)? DEFAULT_FRAME_SAMPLES : GetCodecContext()->frame_size; + #else + return (GetCodecContext()->frame_size <= 1)? DEFAULT_FRAME_SAMPLES : GetCodecContext()->frame_size; + #endif +@@ -122,7 +122,7 @@ void AudioEncoder::PrepareStream(AVStream* stream, AVC + if(key == "threads") { + codec_context->thread_count = ParseCodecOptionInt(key, value, 1, 100); + } else if(key == "qscale") { +- codec_context->flags |= CODEC_FLAG_QSCALE; ++ codec_context->flags |= AV_CODEC_FLAG_QSCALE; + codec_context->global_quality = lrint(ParseCodecOptionDouble(key, value, -1.0e6, 1.0e6, FF_QP2LAMBDA)); + } else if(key == "sampleformat") { + sample_format_name = value; +--- src/AV/Output/BaseEncoder.cpp.orig 2018-03-18 17:25:55 UTC ++++ src/AV/Output/BaseEncoder.cpp +@@ -213,7 +213,7 @@ void BaseEncoder::EncoderThread() { + } + + // flush the encoder +- if(!m_should_stop && (m_codec_context->codec->capabilities & CODEC_CAP_DELAY)) { ++ if(!m_should_stop && (m_codec_context->codec->capabilities & AV_CODEC_CAP_DELAY)) { + Logger::LogInfo("[BaseEncoder::EncoderThread] " + Logger::tr("Flushing encoder ...")); + while(!m_should_stop) { + if(!EncodeFrame(NULL)) { +--- src/AV/Output/Muxer.cpp.orig 2018-03-18 17:25:55 UTC ++++ src/AV/Output/Muxer.cpp +@@ -313,10 +313,10 @@ AVStream* Muxer::AddStream(AVCodec* codec, AVCodecCont + + // not sure why this is needed, but it's in the example code and it doesn't work without this + if(m_format_context->oformat->flags & AVFMT_GLOBALHEADER) +- (*codec_context)->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ (*codec_context)->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + + // if the codec is experimental, allow it +- if(codec->capabilities & CODEC_CAP_EXPERIMENTAL) { ++ if(codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) { + Logger::LogWarning("[Muxer::AddStream] " + Logger::tr("Warning: This codec is considered experimental by libav/ffmpeg.")); + (*codec_context)->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL; + } +--- src/AV/Output/VideoEncoder.cpp.orig 2018-03-18 17:25:55 UTC ++++ src/AV/Output/VideoEncoder.cpp +@@ -130,7 +130,7 @@ void VideoEncoder::PrepareStream(AVStream* stream, AVC + if(key == "threads") { + codec_context->thread_count = ParseCodecOptionInt(key, value, 1, 100); + } else if(key == "qscale") { +- codec_context->flags |= CODEC_FLAG_QSCALE; ++ codec_context->flags |= AV_CODEC_FLAG_QSCALE; + codec_context->global_quality = lrint(ParseCodecOptionDouble(key, value, -1.0e6, 1.0e6, FF_QP2LAMBDA)); + } else if(key == "minrate") { + codec_context->rc_min_rate = ParseCodecOptionInt(key, value, 1, 1000000, 1000); // kbit/s