alarm/kodi-rpi to 19.4-6

Switch back to ffmpeg 4.3.2 due to broken audio passthrough[1].

The original update to v4.4.2 was a response to a compatibility issue w/ ffmpeg
4.3.2 under the experimental rpi-5.19.y branch of kernels[2].  Users wanting
that combo will have to run kodi-rpi-git or build their own version of Matrix.

1. https://archlinuxarm.org/forum/viewtopic.php?f=15&t=16177
2. https://github.com/raspberrypi/linux/issues/5136
This commit is contained in:
graysky 2022-09-18 10:30:28 -04:00
parent a1d572e2b1
commit 179f1d4b45
3 changed files with 119 additions and 8 deletions

View file

@ -0,0 +1,23 @@
From 927178e6fa67ab7f56160f42217dbf5d0b5d243b Mon Sep 17 00:00:00 2001
Date: Sun, 18 Sep 2022 08:12:22 -0400
Subject: [PATCH] add dav1d patch to build system
---
cmake/modules/FindFFMPEG.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake
index 9ce807c..de4287d 100644
--- a/cmake/modules/FindFFMPEG.cmake
+++ b/cmake/modules/FindFFMPEG.cmake
@@ -279,6 +279,7 @@ if(NOT FFMPEG_FOUND)
${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/FindGnuTls.cmake
<SOURCE_DIR> &&
patch -p1 < ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/0001-rpi-Add-hevc-acceleration.patch &&
+ patch -p1 < ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/0002-add-dav1d-patch-to-build-system.patch &&
echo "########################################## patched ffmpeg ##############################"
)
--
2.37.3

View file

@ -13,8 +13,8 @@ pkgname=(
'kodi-rpi-eventclients' 'kodi-rpi-tools-texturepacker' 'kodi-rpi-dev'
)
pkgver=19.4
pkgrel=5
_commit=176201ccb46e8a809ce91e31205016f757ceea39
pkgrel=6
_commit=3bd38ab88bb24992c275ec57d4a2d87db9360d52
arch=('armv7h' 'aarch64')
url="https://github.com/graysky2/xbmc/tree/gs-gbm_matrix"
license=('GPL2')
@ -34,7 +34,7 @@ _init_version=1.136
_libdvdcss_version="1.4.2-Leia-Beta-5"
_libdvdnav_version="6.0.0-Leia-Alpha-3"
_libdvdread_version="6.0.0-Leia-Alpha-3"
_ffmpeg_version="4.4.2"
_ffmpeg_version="4.3.2-$_codename-19.2"
_fmt_version="6.1.2"
_spdlog_version="1.5.0"
_crossguid_version="8f399e8bd4"
@ -45,7 +45,7 @@ source=(
"libdvdcss-$_libdvdcss_version.tar.gz::https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_version.tar.gz"
"libdvdnav-$_libdvdnav_version.tar.gz::https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_version.tar.gz"
"libdvdread-$_libdvdread_version.tar.gz::https://github.com/xbmc/libdvdread/archive/$_libdvdread_version.tar.gz"
https://ffmpeg.org/releases/ffmpeg-4.4.2.tar.gz
"ffmpeg-$_ffmpeg_version.tar.gz::https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz"
"http://mirrors.kodi.tv/build-deps/sources/fmt-$_fmt_version.tar.gz"
"http://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_version.tar.gz"
"http://mirrors.kodi.tv/build-deps/sources/fstrcmp-$_fstrcmp_version.tar.gz"
@ -53,6 +53,8 @@ source=(
"http://mirrors.kodi.tv/build-deps/sources/libudfread-$_libudfread_version.tar.gz"
"ArchARM-kodi-init-v$_init_version.tar.gz::https://github.com/graysky2/kodi-standalone-service/archive/v$_init_version.tar.gz"
kodi.config.txt
build-fix-for-dav1d-1.0.0.patch
0001-add-dav1d-patch-to-build-system.patch
)
backup=(boot/kodi.config.txt etc/conf.d/kodi-standalone)
noextract=(
@ -66,24 +68,32 @@ noextract=(
"fstrcmp-$_fstrcmp_version.tar.gz"
"libudfread-$_libudfread_version.tar.gz"
)
sha256sums=('fbe7029f1dca674406ad8695662ddd85442bcee9342b2dee44723b8108b1b723'
sha256sums=('d9fee52314453ae64b38c68afb2fc7d2ad9b1129c0c7d313a6440d05cc7e2cf0'
'38816f8373e243bc5950449b4f3b18938c4e1c59348e3411e23f31db4072e40d'
'071e414e61b795f2ff9015b21a85fc009dde967f27780d23092643916538a57a'
'a30b6aa0aad0f2c505bc77948af2d5531a80b6e68112addb4c123fca24d5d3bf'
'058efd4b6459bc9df54186f17a989d0af619a793aa62f07e96b88632706d6a17'
'58fe3a3ba38d2b30cd8bfe40e1b3bf82296b258627d0740c284af29f0c8a6655'
'1cafc80701b746085dddf41bd9193e6d35089e1c6ec1940e037fcb9c98f62365'
'3d77d09a5df0de510aeeb940df4cb534787ddff3bb1828779753f5dfa1229d10'
'e4018e850f80700acee8da296e56e15b1eef711ab15157e542e7d7e1237c3476'
'b38e0bbef7faac2b82fed550a0c19b0d4e7f6737d5321d4fd8f216b80f8aee8a'
'5ad9f95c53e8f29853c1fefa0a20a301be4045e2c7ae49d1164bc74d94155627'
'b94c70baa45e30346224ceecfab031dd183e09303b1f97d6522f9941da9b0067'
'92d063169017bf9e1770d8a7cce77c0c55d197692d10820a7e4aecad9e58178c')
'92d063169017bf9e1770d8a7cce77c0c55d197692d10820a7e4aecad9e58178c'
'bcde6299a805430c3ca1f2807101edc7001e77b1934088db9057f74d9a9dd8f6'
'f95032d1f2955aab175fc9077a6101cee539b7c4dbad0159fe3b5a8644257ac2')
prepare() {
[[ -d kodi-build ]] && rm -rf kodi-build
mkdir "$srcdir/kodi-build"
#cd "xbmc-$_commit"
cd "xbmc-$_commit"
cp ../build-fix-for-dav1d-1.0.0.patch \
tools/depends/target/ffmpeg/0002-add-dav1d-patch-to-build-system.patch
# patch kodi build system to apply the patch we just injected
patch -p1 -i ../0001-add-dav1d-patch-to-build-system.patch
}
build() {

View file

@ -0,0 +1,78 @@
From 2546e1ed27f92a840a2cf319e3c1833799974cf1 Mon Sep 17 00:00:00 2001
From: BlackEagle <ike.devolder@gmail.com>
Date: Fri, 29 Apr 2022 14:33:12 +0200
Subject: [PATCH] add build fix for dav1d 1.0.0
Taken from https://github.com/FFmpeg/FFmpeg/commit/e204846ec16c1ab34c7f3a681734cf5190433018
add FF_DAV1D_VERSION_AT_LEAST
Extracted from https://github.com/FFmpeg/FFmpeg/commit/7ee17ec7e46afef0e0af20af196292ec75f50b62
Signed-off-by: BlackEagle <ike.devolder@gmail.com>
---
libavcodec/libdav1d.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index bbb3ec1e6c..08b4af8ac8 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -30,6 +30,9 @@
#include "decode.h"
#include "internal.h"
+#define FF_DAV1D_VERSION_AT_LEAST(x,y) \
+ (DAV1D_API_VERSION_MAJOR > (x) || DAV1D_API_VERSION_MAJOR == (x) && DAV1D_API_VERSION_MINOR >= (y))
+
typedef struct Libdav1dContext {
AVClass *class;
Dav1dContext *c;
@@ -140,6 +143,15 @@ static av_cold int libdav1d_init(AVCodecContext *c)
if (dav1d->operating_point >= 0)
s.operating_point = dav1d->operating_point;
+#if FF_DAV1D_VERSION_AT_LEAST(6,0)
+ if (dav1d->frame_threads || dav1d->tile_threads)
+ s.n_threads = FFMAX(dav1d->frame_threads, dav1d->tile_threads);
+ else
+ s.n_threads = FFMIN(threads, DAV1D_MAX_THREADS);
+ s.max_frame_delay = (c->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : s.n_threads;
+ av_log(c, AV_LOG_DEBUG, "Using %d threads, %d max_frame_delay\n",
+ s.n_threads, s.max_frame_delay);
+#else
s.n_tile_threads = dav1d->tile_threads
? dav1d->tile_threads
: FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS);
@@ -148,6 +160,7 @@ static av_cold int libdav1d_init(AVCodecContext *c)
: FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS);
av_log(c, AV_LOG_DEBUG, "Using %d frame threads, %d tile threads\n",
s.n_frame_threads, s.n_tile_threads);
+#endif
res = dav1d_open(&dav1d->c, &s);
if (res < 0)
@@ -384,11 +397,18 @@ static av_cold int libdav1d_close(AVCodecContext *c)
return 0;
}
+#ifndef DAV1D_MAX_FRAME_THREADS
+#define DAV1D_MAX_FRAME_THREADS DAV1D_MAX_THREADS
+#endif
+#ifndef DAV1D_MAX_TILE_THREADS
+#define DAV1D_MAX_TILE_THREADS DAV1D_MAX_THREADS
+#endif
+
#define OFFSET(x) offsetof(Libdav1dContext, x)
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
static const AVOption libdav1d_options[] = {
- { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD },
- { "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD },
+ { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD | AV_OPT_FLAG_DEPRECATED },
+ { "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD | AV_OPT_FLAG_DEPRECATED },
{ "filmgrain", "Apply Film Grain", OFFSET(apply_grain), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD },
{ "oppoint", "Select an operating point of the scalable bitstream", OFFSET(operating_point), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 31, VD },
{ "alllayers", "Output all spatial layers", OFFSET(all_layers), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VD },
--
2.36.0