diff options
author | prspkt <prspkt@protonmail.com> | 2019-02-23 17:31:56 +0200 |
---|---|---|
committer | prspkt <prspkt@protonmail.com> | 2019-02-23 18:26:07 +0200 |
commit | 9bf0fe2712b247548200717386a428f232fe865b (patch) | |
tree | 11de2e208569508798fcc42acffe7985f547c650 /testing/obs-studio | |
parent | 0e93540912fd36c242d0e67e36831d813f102621 (diff) | |
download | aports-9bf0fe2712b247548200717386a428f232fe865b.tar.bz2 aports-9bf0fe2712b247548200717386a428f232fe865b.tar.xz |
testing/obs-studio: rebuild against libfdk-aac.so.2
Diffstat (limited to 'testing/obs-studio')
-rw-r--r-- | testing/obs-studio/APKBUILD | 9 | ||||
-rw-r--r-- | testing/obs-studio/fdk-aac-2-api-compat.patch | 53 |
2 files changed, 59 insertions, 3 deletions
diff --git a/testing/obs-studio/APKBUILD b/testing/obs-studio/APKBUILD index 4ce192b955..9d2f768160 100644 --- a/testing/obs-studio/APKBUILD +++ b/testing/obs-studio/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=obs-studio pkgver=22.0.2 -pkgrel=2 +pkgrel=3 pkgdesc="Free and open source software for live streaming and screen recording" url="https://obsproject.com/" arch="x86 x86_64" @@ -14,7 +14,9 @@ makedepends="cmake ffmpeg-dev libxinerama-dev pulseaudio-dev jack-dev vlc-dev alsa-lib-dev fdk-aac-dev speexdsp-dev v4l-utils-dev jansson-dev eudev-dev swig mbedtls-dev python3-dev" subpackages="$pkgname-dev" -source="$pkgname-$pkgver.tar.gz::https://github.com/jp9000/$pkgname/archive/$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/jp9000/$pkgname/archive/$pkgver.tar.gz + fdk-aac-2-api-compat.patch + " builddir="$srcdir/$pkgname-$pkgver" prepare() { @@ -36,4 +38,5 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="2e4e187e828236757d77f745855910e6c4f8c5164f69772f753564356d711cd865a9497f62b910164977d47c34202ce94425181355b4bd13c078ec3099cd476f obs-studio-22.0.2.tar.gz" +sha512sums="2e4e187e828236757d77f745855910e6c4f8c5164f69772f753564356d711cd865a9497f62b910164977d47c34202ce94425181355b4bd13c078ec3099cd476f obs-studio-22.0.2.tar.gz +4958042e50c0c3a27f0eb6a1768d3d7a0ba315f66bea223fd79c5c62ec5e34e71a301fa9256b51d69fc85b7c0c8830bea32a769c9daa524f17f6bda9be418226 fdk-aac-2-api-compat.patch" diff --git a/testing/obs-studio/fdk-aac-2-api-compat.patch b/testing/obs-studio/fdk-aac-2-api-compat.patch new file mode 100644 index 0000000000..a1e6f8bb6e --- /dev/null +++ b/testing/obs-studio/fdk-aac-2-api-compat.patch @@ -0,0 +1,53 @@ +From 5cf2b5fbf925412620e2a40552d6348203851cb3 Mon Sep 17 00:00:00 2001 +From: pkviet <pkv.stream@gmail.com> +Date: Thu, 29 Nov 2018 21:10:45 +0100 +Subject: [PATCH] obs-libfdk: Compatibility fix for new API + +fdk-aac v2.0.0 (aacenc 4.0.0) changes the AACENC_InfoStruct: +the encoderDelay parameter is replaced by two, nDelay and +nDelayCore. This patch checks the lib version and adjust the parameter +accordingly. +--- + plugins/obs-libfdk/obs-libfdk.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/plugins/obs-libfdk/obs-libfdk.c b/plugins/obs-libfdk/obs-libfdk.c +index d6eb496184..94b139de57 100644 +--- a/plugins/obs-libfdk/obs-libfdk.c ++++ b/plugins/obs-libfdk/obs-libfdk.c +@@ -9,7 +9,6 @@ + + #include <fdk-aac/aacenc_lib.h> + +- + static const char *libfdk_get_error(AACENC_ERROR err) + { + switch(err) { +@@ -224,7 +223,7 @@ static bool libfdk_encode(void *data, struct encoder_frame *frame, + void *in_ptr; + void *out_ptr; + AACENC_ERROR err; +- ++ int64_t encoderDelay; + + in_ptr = frame->data[0]; + in_size = enc->frame_size_bytes; +@@ -261,10 +260,13 @@ static bool libfdk_encode(void *data, struct encoder_frame *frame, + } + + *received_packet = true; +- +- packet->pts = enc->total_samples - +- enc->info.encoderDelay; // TODO: Just a guess, find out if that's actualy right +- packet->dts = enc->total_samples - enc->info.encoderDelay; ++#if (AACENCODER_LIB_VL0 >= 4) ++ encoderDelay= enc->info.nDelay; ++#else ++ encoderDelay= enc->info.encoderDelay; ++#endif ++ packet->pts = enc->total_samples - encoderDelay; ++ packet->dts = enc->total_samples - encoderDelay; + packet->data = enc->packet_buffer; + packet->size = out_args.numOutBytes; + packet->type = OBS_ENCODER_AUDIO; + |