X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail.cmpwn.com (mail.cmpwn.com [45.56.77.53]) by lists.alpinelinux.org (Postfix) with ESMTP id 2D8CD5C595A for ; Thu, 1 Nov 2018 15:36:03 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cmpwn.com; s=cmpwn; t=1541087171; bh=P68ddLL9Vk1Mnf12FBCEuoUqH4o7qAraqCFFRt/DrmM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2sFBi72viUaoBhK/ly8d8eCDhP7jj+eW95MEfYJcMP3QCYY96fOtmccFoxwqlok69 AZ9LaEtqmqRs4OqgqAVZPi1vCXXWa5TR8w2zN9tcriOxVNb07zlg/0xvH+Vkdri0r+ tIhPKhJbVtH+Xc30AZK1/q0ke+eh8ERn0785shUo= From: Drew DeVault To: alpine-aports@lists.alpinelinux.org Cc: Drew DeVault , Mika Havela , Leonardo Arena Subject: [alpine-aports] [PATCH v2 07/15] testing/motion: patch for ffmpeg 4 Date: Thu, 1 Nov 2018 11:35:34 -0400 Message-Id: <20181101153542.3243-7-sir@cmpwn.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181030001137.13087-1-sir@cmpwn.com> References: <20181030001137.13087-1-sir@cmpwn.com> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- testing/motion/APKBUILD | 7 ++++-- testing/motion/ffmpeg4.patch | 43 ++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 testing/motion/ffmpeg4.patch diff --git a/testing/motion/APKBUILD b/testing/motion/APKBUILD index ec74858b84..f4b3036c15 100644 --- a/testing/motion/APKBUILD +++ b/testing/motion/APKBUILD @@ -4,7 +4,7 @@ # Maintainer: Mika Havela pkgname=motion pkgver=4.1.1 -pkgrel=0 +pkgrel=1 pkgdesc="Detect if a significant part of the picture has changed (e.g. from a webcam)." url="https://motion-project.github.io" arch="all" @@ -17,10 +17,12 @@ depends_dev="" makedepends="$depends_dev autoconf automake bash jpeg-dev v4l-utils-dev linux-headers ffmpeg-dev" install="$pkgname.pre-install" subpackages="$pkgname-doc" +# ffmpeg4.patch courtesy of Arch Linux source="$pkgname-$pkgver.tar.gz::https://github.com/Motion-Project/$pkgname/archive/release-$pkgver.tar.gz motion.confd motion.initd motion-dist.conf.in.patch + ffmpeg4.patch " builddir="$srcdir"/$pkgname-release-$pkgver @@ -55,4 +57,5 @@ package() { sha512sums="3b08d464f9243ccfc4b53b16cfc2001d1e0d206bf0295d55d8914914bc14ad0248ce5ac622cb7eb89ed32e1913a9a10add1b56497c4094ba876f7f85d6ad4143 motion-4.1.1.tar.gz 8a67b5b0360924e58ba3136a737ce73bb43201a49b2b6e2c632426561b830f6ab55cbbeaa89be7f1683aa8fd322b4f31b9f560e67a93eaceb964c9f56ceef363 motion.confd be30f19595dba27f2d0ca8133c93e134161781935a152bd1701e581410039e37742acd11987c38e6e64f495b1fd2b0a74a8c61ae0e6e211a475fca7994172501 motion.initd -c27d7ded3ed7a56101791bca86eb083450f5b8a1f431b3f7ee8538f682ac5f5d4b50104d9d61f40be964f1f1975a114313ba3d30d7357035dc25ebe925db6a89 motion-dist.conf.in.patch" +c27d7ded3ed7a56101791bca86eb083450f5b8a1f431b3f7ee8538f682ac5f5d4b50104d9d61f40be964f1f1975a114313ba3d30d7357035dc25ebe925db6a89 motion-dist.conf.in.patch +808a43fe51dd2d9436320fa3ba3ac3b3f87c829b276f175b52c77313acaa647dda43cd2acc0f9c6a3106ca0dec568ee12c6db7ad89cc49f501e34cd223bfb65e ffmpeg4.patch" diff --git a/testing/motion/ffmpeg4.patch b/testing/motion/ffmpeg4.patch new file mode 100644 index 0000000000..3ac4c7967b --- /dev/null +++ b/testing/motion/ffmpeg4.patch @@ -0,0 +1,43 @@ +diff --git a/ffmpeg.c b/ffmpeg.c +index 1e6cdf6..4299ba3 100644 +--- a/ffmpeg.c ++++ b/ffmpeg.c +@@ -67,6 +67,19 @@ + + #endif + ++/*********************************************/ ++#if (LIBAVCODEC_VERSION_MAJOR >= 57) ++ ++#define MY_CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++#define MY_CODEC_FLAG_QSCALE AV_CODEC_FLAG_QSCALE ++ ++#else ++ ++#define MY_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER ++#define MY_CODEC_FLAG_QSCALE CODEC_FLAG_QSCALE ++ ++#endif ++ + /*********************************************/ + AVFrame *my_frame_alloc(void){ + AVFrame *pic; +@@ -548,7 +561,7 @@ static int ffmpeg_set_quality(struct ffmpeg *ffmpeg){ + /* The selection of 8000 is a subjective number based upon viewing output files */ + if (ffmpeg->vbr > 0){ + ffmpeg->vbr =(int)(((100-ffmpeg->vbr)*(100-ffmpeg->vbr)*(100-ffmpeg->vbr) * 8000) / 1000000) + 1; +- ffmpeg->ctx_codec->flags |= CODEC_FLAG_QSCALE; ++ ffmpeg->ctx_codec->flags |= MY_CODEC_FLAG_QSCALE; + ffmpeg->ctx_codec->global_quality=ffmpeg->vbr; + } + } +@@ -673,7 +686,7 @@ static int ffmpeg_set_codec(struct ffmpeg *ffmpeg){ + ffmpeg->ctx_codec->strict_std_compliance = -2; + ffmpeg->ctx_codec->level = 3; + } +- ffmpeg->ctx_codec->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ ffmpeg->ctx_codec->flags |= MY_CODEC_FLAG_GLOBAL_HEADER; + + retcd = ffmpeg_set_quality(ffmpeg); + if (retcd < 0){ + -- 2.18.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---