summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2017-10-10 13:30:51 -0300
committerDaniel Bermond2017-10-10 13:30:51 -0300
commitb105f59d10bf5423147f09acd5801f1008ee185b (patch)
tree29bf7b70ac4a6329effa16de16ddf7ea95df0fad
parent6efa70125462991e0af16740b87589ead2a5ea6d (diff)
downloadaur-b105f59d10bf5423147f09acd5801f1008ee185b.tar.gz
Added support for openjpeg 2.3
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD5
-rw-r--r--ffmpeg-openjpeg2.3.patch97
3 files changed, 105 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4f969b28116..5ea8f61bbc1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Wed Sep 13 19:55:24 UTC 2017
+# Tue Oct 10 16:28:24 UTC 2017
pkgbase = ffmpeg-decklink
pkgdesc = Complete solution to record, convert and stream audio and video (decklink enabled)
pkgver = 3.3.4
- pkgrel = 1
+ pkgrel = 2
epoch = 1
url = http://ffmpeg.org/
arch = i686
@@ -69,9 +69,11 @@ pkgbase = ffmpeg-decklink
conflicts = ffmpeg-git
source = https://ffmpeg.org/releases/ffmpeg-3.3.4.tar.xz
source = ffmpeg-openjpeg2.2.patch
+ source = ffmpeg-openjpeg2.3.patch
source = LICENSE
sha256sums = 98b97e1b908dfeb6aeb6d407e5a5eacdfc253a40c2d195f5867ed2d1d46ea957
sha256sums = 490598f78d7879af8ef5b8d7f92ada83d0ee64f9609f6c7b989eb331c2539f68
+ sha256sums = b69a99b11de840f3a5d8e1ded7d4cc8c22cee7aef0b04df82046c8652ec2d40d
sha256sums = 04a7176400907fd7db0d69116b99de49e582a6e176b3bfb36a03e50a4cb26a36
pkgname = ffmpeg-decklink
diff --git a/PKGBUILD b/PKGBUILD
index c09e16d2b47..12a17cb0a95 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@
pkgname=ffmpeg-decklink
_srcname=ffmpeg
pkgver=3.3.4
-pkgrel=1
+pkgrel=2
epoch=1
pkgdesc='Complete solution to record, convert and stream audio and video (decklink enabled)'
arch=('i686' 'x86_64')
@@ -33,14 +33,17 @@ provides=('libavcodec.so' 'libavdevice.so' 'libavfilter.so' 'libavformat.so'
conflicts=('ffmpeg' 'ffmpeg-git')
source=("https://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.xz"
'ffmpeg-openjpeg2.2.patch'
+ 'ffmpeg-openjpeg2.3.patch'
'LICENSE')
sha256sums=('98b97e1b908dfeb6aeb6d407e5a5eacdfc253a40c2d195f5867ed2d1d46ea957'
'490598f78d7879af8ef5b8d7f92ada83d0ee64f9609f6c7b989eb331c2539f68'
+ 'b69a99b11de840f3a5d8e1ded7d4cc8c22cee7aef0b04df82046c8652ec2d40d'
'04a7176400907fd7db0d69116b99de49e582a6e176b3bfb36a03e50a4cb26a36')
prepare() {
cd "${_srcname}-${pkgver}"
patch -Np1 -i "${srcdir}/ffmpeg-openjpeg2.2.patch"
+ patch -Np1 -i "${srcdir}/ffmpeg-openjpeg2.3.patch"
}
build() {
diff --git a/ffmpeg-openjpeg2.3.patch b/ffmpeg-openjpeg2.3.patch
new file mode 100644
index 00000000000..ef7589ff1f9
--- /dev/null
+++ b/ffmpeg-openjpeg2.3.patch
@@ -0,0 +1,97 @@
+diff -Narup a/configure b/configure
+--- a/configure 2017-10-10 12:51:06.000000000 -0300
++++ b/configure 2017-10-10 13:11:15.512362438 -0300
+@@ -1875,6 +1875,7 @@ HEADERS_LIST="
+ machine_ioctl_meteor_h
+ malloc_h
+ opencv2_core_core_c_h
++ openjpeg_2_3_openjpeg_h
+ openjpeg_2_2_openjpeg_h
+ openjpeg_2_1_openjpeg_h
+ openjpeg_2_0_openjpeg_h
+@@ -5806,7 +5807,9 @@ enabled libopencv && { check_hea
+ require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
+ require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader; }
+ enabled libopenh264 && require_pkg_config openh264 wels/codec_api.h WelsGetCodecVersion
+-enabled libopenjpeg && { { check_lib openjpeg-2.2/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
++enabled libopenjpeg && { { check_lib libopenjpeg openjpeg-2.3/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
++ check_lib libopenjpeg openjpeg-2.3/openjpeg.h opj_version -lopenjp2 ||
++ { check_lib libopenjpeg openjpeg-2.2/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+ check_lib openjpeg-2.2/openjpeg.h opj_version -lopenjp2 ||
+ { check_lib openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+ check_lib openjpeg-2.1/openjpeg.h opj_version -lopenjp2 ||
+diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
+index 1210123265f..67d47bd6a0a 100644
+--- a/libavcodec/libopenjpegdec.c
++++ b/libavcodec/libopenjpegdec.c
+@@ -34,7 +34,9 @@
+ #include "internal.h"
+ #include "thread.h"
+
+-#if HAVE_OPENJPEG_2_2_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H
++# include <openjpeg-2.3/openjpeg.h>
++#elif HAVE_OPENJPEG_2_2_OPENJPEG_H
+ # include <openjpeg-2.2/openjpeg.h>
+ #elif HAVE_OPENJPEG_2_1_OPENJPEG_H
+ # include <openjpeg-2.1/openjpeg.h>
+@@ -46,7 +48,7 @@
+ # include <openjpeg.h>
+ #endif
+
+-#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+ # define OPENJPEG_MAJOR_VERSION 2
+ # define OPJ(x) OPJ_##x
+ #else
+@@ -431,7 +433,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
+ opj_stream_set_read_function(stream, stream_read);
+ opj_stream_set_skip_function(stream, stream_skip);
+ opj_stream_set_seek_function(stream, stream_seek);
+-#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
+ opj_stream_set_user_data(stream, &reader, NULL);
+ #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
+ opj_stream_set_user_data(stream, &reader);
+diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
+index b67e533d1da..92b4433b047 100644
+--- a/libavcodec/libopenjpegenc.c
++++ b/libavcodec/libopenjpegenc.c
+@@ -32,7 +32,9 @@
+ #include "avcodec.h"
+ #include "internal.h"
+
+-#if HAVE_OPENJPEG_2_2_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H
++# include <openjpeg-2.3/openjpeg.h>
++#elif HAVE_OPENJPEG_2_2_OPENJPEG_H
+ # include <openjpeg-2.2/openjpeg.h>
+ #elif HAVE_OPENJPEG_2_1_OPENJPEG_H
+ # include <openjpeg-2.1/openjpeg.h>
+@@ -44,7 +46,7 @@
+ # include <openjpeg.h>
+ #endif
+
+-#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+ # define OPENJPEG_MAJOR_VERSION 2
+ # define OPJ(x) OPJ_##x
+ #else
+@@ -307,7 +309,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx)
+
+ opj_set_default_encoder_parameters(&ctx->enc_params);
+
+-#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
+ switch (ctx->cinema_mode) {
+ case OPJ_CINEMA2K_24:
+ ctx->enc_params.rsiz = OPJ_PROFILE_CINEMA_2K;
+@@ -771,7 +773,7 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
+ opj_stream_set_write_function(stream, stream_write);
+ opj_stream_set_skip_function(stream, stream_skip);
+ opj_stream_set_seek_function(stream, stream_seek);
+-#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_3_OPENJPEG_H || HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
+ opj_stream_set_user_data(stream, &writer, NULL);
+ #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
+ opj_stream_set_user_data(stream, &writer);