Merge pull request #8314 from CvH/12.0/ffmpegx_up

Tvheadend updates and change to ffmpeg 6.0.x
This commit is contained in:
Matthias Reichl 2023-12-20 17:35:30 +01:00 committed by GitHub
commit 9874a2830b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 368 additions and 462 deletions

View File

@ -1,9 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="comskip"
PKG_VERSION="84fcd7388394c95fc8a7e558642bbadb43134507"
PKG_SHA256="4d45d30335ce1c28fb4de8865ada57f81de18d83a77950e9ab7c3ea26d24a883"
PKG_VERSION="6e66de54358498aa276d233f5b3e7fa673526af1"
PKG_SHA256="412f0cc543cbe327b36b0354c00ace260c996e95dd95cb585ca58dd52c926607"
PKG_LICENSE="GPL"
PKG_SITE="http://www.kaashoek.com/comskip/"
PKG_URL="https://github.com/erikkaashoek/Comskip/archive/${PKG_VERSION}.tar.gz"

View File

@ -1,12 +0,0 @@
diff --git a/mpeg2dec.c b/mpeg2dec.c
index 3013dc1..5b79227 100755
--- a/mpeg2dec.c
+++ b/mpeg2dec.c
@@ -161,7 +161,6 @@ int64_t pev_best_effort_timestamp = 0;
int video_stream_index = -1;
int audio_stream_index = -1;
-int width, height;
int have_frame_rate ;
int stream_index;

View File

@ -0,0 +1,58 @@
From 3f940e6f8e83fbb0cbbca6a4f55b506ccec8d3c4 Mon Sep 17 00:00:00 2001
From: bsperduto <brian.sperduto@gmail.com>
Date: Sun, 3 Dec 2023 08:50:41 -0600
Subject: [PATCH 1/2] Fix for deprecation of DECLARE_ALIGNED #164
---
comskip.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/comskip.c b/comskip.c
index 08ffd5e..e85f61a 100644
--- a/comskip.c
+++ b/comskip.c
@@ -733,9 +733,9 @@ int sceneChangePercent;
bool lastFrameWasBlack = false;
bool lastFrameWasSceneChange = false;
-#include <libavutil/avutil.h> // only for DECLARE_ALIGNED
-static DECLARE_ALIGNED(32, long, histogram)[256];
-static DECLARE_ALIGNED(32, long, lastHistogram)[256];
+
+static long histogram[256];
+static long lastHistogram[256];
#define MAXCSLENGTH 400*300
#define MAXCUTSCENES 8
@@ -10097,7 +10097,7 @@ void LoadCutScene(const char *filename)
#define OWN_HISTOGRAM_WIDTH 4
#define OWN_HISTOGRAM_HEIGHT 256
-static DECLARE_ALIGNED(32, int, own_histogram)[OWN_HISTOGRAM_WIDTH][OWN_HISTOGRAM_HEIGHT];
+static int own_histogram[OWN_HISTOGRAM_WIDTH][OWN_HISTOGRAM_HEIGHT];
int scan_step;
#define SCAN_MULTI
From eae0b430d7c9317333fb8759bd67369fd71a085a Mon Sep 17 00:00:00 2001
From: bsperduto <brian.sperduto@gmail.com>
Date: Sun, 10 Dec 2023 13:32:57 +0100
Subject: [PATCH 2/2] [PATCH] Update mpeg2dec.c
---
mpeg2dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mpeg2dec.c b/mpeg2dec.c
index 626a991..bb2fa2b 100755
--- a/mpeg2dec.c
+++ b/mpeg2dec.c
@@ -349,7 +349,7 @@ static void signal_handler (int sig)
#define AUDIOBUFFER 1600000
static double base_apts = 0.0, apts, top_apts = 0.0;
-static DECLARE_ALIGNED(16, short, audio_buffer[AUDIOBUFFER]);
+static short audio_buffer[AUDIOBUFFER];
static short *audio_buffer_ptr = audio_buffer;
static int audio_samples = 0;
#define ISSAME(T1,T2) (fabs((T1) - (T2)) < 0.001)

View File

@ -1,9 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="x264"
PKG_VERSION="9c3c71688226fbb23f4d36399fab08f018e760b0"
PKG_SHA256="1b0e11f6ce9dc8c8da5e78006bd1a26dffe866d21f85d4305fd555f107d97b9a"
PKG_VERSION="a354f11f8f019a2a34ae7ef554ff07b31f0818f3"
PKG_SHA256="3f87b564f71e7fccf2b58c1bafcdb74b88ce2d57fff5cf870a5703fb33691d38"
PKG_LICENSE="GPL"
PKG_SITE="http://www.videolan.org/developers/x264.html"
PKG_URL="https://code.videolan.org/videolan/x264/-/archive/${PKG_VERSION}/x264-${PKG_VERSION}.tar.bz2"

View File

@ -1,10 +1,10 @@
# SPDX-License-Identifier: GPL-2.0
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="ffmpegx"
PKG_VERSION="4.4.3"
PKG_SHA256="6c5b6c195e61534766a0b5fe16acc919170c883362612816d0a1c7f4f947006e"
PKG_LICENSE="LGPLv2.1+"
PKG_VERSION="6.0.1"
PKG_SHA256="9b16b8731d78e596b4be0d720428ca42df642bb2d78342881ff7f5bc29fc9623"
PKG_LICENSE="GPL-3.0-only"
PKG_SITE="https://ffmpeg.org"
PKG_URL="https://ffmpeg.org/releases/ffmpeg-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain aom bzip2 openssl lame libvorbis opus x264 zlib"
@ -64,9 +64,9 @@ pre_configure_target() {
PKG_FFMPEG_X26x_GENERIC="\
--enable-libx264 \
--enable-encoder=x264 \
--enable-encoder=libx264 \
--enable-libx265 \
--enable-encoder=x265"
--enable-encoder=libx265"
fi
# Encoders
@ -134,7 +134,6 @@ configure_target() {
${PKG_FFMPEG_ENCODERS} \
\
`#General options` \
--enable-avresample \
--disable-lzma \
--disable-alsa \
${PKG_FFMPEG_X11_GRAB} \

View File

@ -1,44 +0,0 @@
From 1d23e125b6f76e74b754560c3b6931507cacddce Mon Sep 17 00:00:00 2001
From: Timo Rothenpieler <timo@rothenpieler.org>
Date: Tue, 7 Sep 2021 19:35:31 +0200
Subject: [PATCH] configure: account for openssl3 license change
---
configure | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index c87a010387..ed7345b2c1 100755
--- a/configure
+++ b/configure
@@ -1765,7 +1765,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
EXTERNAL_LIBRARY_NONFREE_LIST="
decklink
libfdk_aac
- openssl
libtls
"
@@ -1857,6 +1856,7 @@ EXTERNAL_LIBRARY_LIST="
mediacodec
openal
opengl
+ openssl
pocketsphinx
vapoursynth
"
@@ -6572,7 +6572,10 @@ enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR
die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } &&
enable omx
enabled omx && require_headers OMX_Core.h
-enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
+enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h OPENSSL_init_ssl &&
+ { enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } ||
+ { enabled gpl && ! enabled nonfree && die "ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } ||
+ check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
--
2.34.1

View File

@ -1,84 +0,0 @@
From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
Date: Sun, 16 Jul 2023 18:18:02 +0300
Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
instructions within inline assembly
Fixes assembling with binutils as >= 2.41
Upstream: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=effadce6c756247ea8bae32dc13bb3e6f464f0eb
Bug reports for this change in binutils:
https://fftrac-bg.ffmpeg.org/ticket/10405
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108941
https://sourceware.org/bugzilla/show_bug.cgi?id=30578
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
index 6298f5ed19..ca7e2dffc1 100644
--- a/libavcodec/x86/mathops.h
+++ b/libavcodec/x86/mathops.h
@@ -35,12 +35,20 @@
static av_always_inline av_const int MULL(int a, int b, unsigned shift)
{
int rt, dummy;
+ if (__builtin_constant_p(shift))
__asm__ (
"imull %3 \n\t"
"shrdl %4, %%edx, %%eax \n\t"
:"=a"(rt), "=d"(dummy)
- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
+ :"a"(a), "rm"(b), "i"(shift & 0x1F)
);
+ else
+ __asm__ (
+ "imull %3 \n\t"
+ "shrdl %4, %%edx, %%eax \n\t"
+ :"=a"(rt), "=d"(dummy)
+ :"a"(a), "rm"(b), "c"((uint8_t)shift)
+ );
return rt;
}
@@ -113,19 +121,31 @@ __asm__ volatile(\
// avoid +32 for shift optimization (gcc should do that ...)
#define NEG_SSR32 NEG_SSR32
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
+ if (__builtin_constant_p(s))
__asm__ ("sarl %1, %0\n\t"
: "+r" (a)
- : "ic" ((uint8_t)(-s))
+ : "i" (-s & 0x1F)
);
+ else
+ __asm__ ("sarl %1, %0\n\t"
+ : "+r" (a)
+ : "c" ((uint8_t)(-s))
+ );
return a;
}
#define NEG_USR32 NEG_USR32
static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
+ if (__builtin_constant_p(s))
__asm__ ("shrl %1, %0\n\t"
: "+r" (a)
- : "ic" ((uint8_t)(-s))
+ : "i" (-s & 0x1F)
);
+ else
+ __asm__ ("shrl %1, %0\n\t"
+ : "+r" (a)
+ : "c" ((uint8_t)(-s))
+ );
return a;
}
--
2.30.2

View File

@ -10,7 +10,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.tvheadend.org"
PKG_URL="https://github.com/tvheadend/tvheadend/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain avahi comskip curl dvb-apps ffmpegx libdvbcsa libhdhomerun \
PKG_DEPENDS_TARGET="toolchain avahi comskip curl dvb-apps libdvbcsa libhdhomerun \
libiconv openssl pngquant:host Python3:host dtv-scan-tables"
PKG_DEPENDS_CONFIG="ffmpegx"
PKG_SECTION="service"
@ -33,20 +33,20 @@ PKG_TVH_TRANSCODING="\
--disable-libvpx_static \
--disable-libx264_static \
--disable-libx265_static \
--enable-libav \
--enable-libfdkaac \
--enable-libopus \
--enable-libvorbis \
--enable-libx264"
--disable-libav \
--disable-libfdkaac \
--disable-libopus \
--disable-libvorbis \
--disable-libx264"
# hw specific transcoding options
if [ "${TARGET_ARCH}" = "x86_64" ]; then
PKG_DEPENDS_TARGET+=" libva"
# specific transcoding options
PKG_TVH_TRANSCODING="${PKG_TVH_TRANSCODING} \
--enable-vaapi \
--enable-libvpx \
--enable-libx265"
--disable-vaapi \
--disable-libvpx \
--disable-libx265"
else
# for != "x86_64" targets
# specific transcoding options

View File

@ -1,6 +1,6 @@
--- a/src/input/mpegts/scanfile.c
+++ b/src/input/mpegts/scanfile.c
@@ -903,7 +903,7 @@ scanfile_init ( const char *muxconf_path, int lock )
@@ -906,7 +906,7 @@ scanfile_init ( const char *muxconf_path
#elif defined(PLATFORM_FREEBSD)
path = "/usr/local/share/dtv-scan-tables";
#else

View File

@ -2,7 +2,7 @@ fix libhdhomerun includes
--- a/configure
+++ b/configure
@@ -362,7 +362,7 @@ if enabled hdhomerun_static; then
@@ -394,7 +394,7 @@ if enabled hdhomerun_static; then
else
if enabled_or_auto hdhomerun_client; then

View File

@ -11,13 +11,11 @@ causing an FTBFS. Instead, recognize both the old and new symbols.
src/input/mpegts/tvhdhomerun/tvhdhomerun.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/input/mpegts/tvhdhomerun/tvhdhomerun.c b/src/input/mpegts/tvhdhomerun/tvhdhomerun.c
index 58dec51ab3..18068faf5d 100644
--- a/src/input/mpegts/tvhdhomerun/tvhdhomerun.c
+++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun.c
@@ -32,7 +32,8 @@
#include "config.h"
@@ -28,7 +28,8 @@
#include <arpa/inet.h>
#include <openssl/sha.h>
-#ifdef HDHOMERUN_TAG_DEVICE_AUTH_BIN
+#if defined(HDHOMERUN_TAG_DEVICE_AUTH_BIN) \

View File

@ -9,11 +9,9 @@ Subject: [PATCH] Fix building with -fno-common (default from GCC 10)
src/input/mpegts.h | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/input.h b/src/input.h
index a9c96df048..3dce355c6a 100644
--- a/src/input.h
+++ b/src/input.h
@@ -133,8 +133,8 @@ void tvh_hardware_delete ( tvh_hardware_t *th );
@@ -128,8 +128,8 @@ void tvh_hardware_delete ( tvh_hardware_
extern const idclass_t tvh_input_class;
extern const idclass_t tvh_input_instance_class;
@ -24,8 +22,6 @@ index a9c96df048..3dce355c6a 100644
#define TVH_INPUT_FOREACH(x) LIST_FOREACH(x, &tvh_inputs, ti_link)
#define TVH_HARDWARE_FOREACH(x) LIST_FOREACH(x, &tvh_hardware, th_link)
diff --git a/src/input/mpegts.c b/src/input/mpegts.c
index e02d491f19..fca4f34296 100644
--- a/src/input/mpegts.c
+++ b/src/input/mpegts.c
@@ -20,6 +20,8 @@
@ -37,11 +33,9 @@ index e02d491f19..fca4f34296 100644
extern memoryinfo_t mpegts_input_queue_memoryinfo;
extern memoryinfo_t mpegts_input_table_memoryinfo;
diff --git a/src/input/mpegts.h b/src/input/mpegts.h
index 9dda3bacaa..9c4c57b73b 100644
--- a/src/input/mpegts.h
+++ b/src/input/mpegts.h
@@ -1149,7 +1149,7 @@ typedef struct mpegts_listener
@@ -1132,7 +1132,7 @@ typedef struct mpegts_listener
void (*ml_mux_delete) (mpegts_mux_t *mm, void *p);
} mpegts_listener_t;

View File

@ -21,7 +21,6 @@ https://github.com/tvheadend/tvheadend/commit/ce09077056f9c6558c188d135cec3be85c
}
function playProgram() {
--- a/src/webui/static/app/dvr.js
+++ b/src/webui/static/app/dvr.js
@@ -87,13 +87,11 @@ tvheadend.dvrDetails = function(uuid) {

View File

@ -8,11 +8,9 @@ Subject: [PATCH] SAT>IP client: UPnP header field names are case insensitive
src/input/mpegts/satip/satip.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/input/mpegts/satip/satip.c b/src/input/mpegts/satip/satip.c
index 4d522e19c4..58e91d30bb 100644
--- a/src/input/mpegts/satip/satip.c
+++ b/src/input/mpegts/satip/satip.c
@@ -1175,19 +1175,19 @@ satip_discovery_service_received
@@ -1125,19 +1125,19 @@ satip_discovery_service_received
if (ptr == NULL)
break;
if (http_tokenize(ptr, argv, 2, ':') == 2) {

View File

@ -2,9 +2,9 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="tvheadend43"
PKG_VERSION="905b4f0d0387818cbbf7012bf4dffb25e9893748"
PKG_SHA256="3decc29681e7eefac7a734116078b6f36fa125d81c8b9c9998b96070fcbe53a0"
PKG_VERSION_NUMBER="4.3-2091"
PKG_VERSION="3dcb7ecf36666dcb43211a84141b1b645c9ca757"
PKG_SHA256="c7c8414bca5304276cc8f07aa291e36b50e1190d441f2af2ce256631b7c033c2"
PKG_VERSION_NUMBER="4.3-2180"
PKG_REV="0"
PKG_ARCH="any"
PKG_LICENSE="GPL"

View File

@ -1,6 +1,6 @@
--- a/src/input/mpegts/scanfile.c
+++ b/src/input/mpegts/scanfile.c
@@ -921,7 +921,7 @@ scanfile_init ( const char *muxconf_path
@@ -922,7 +922,7 @@ scanfile_init ( const char *muxconf_path
#elif defined(PLATFORM_FREEBSD)
path = "/usr/local/share/dtv-scan-tables";
#else

View File

@ -2,7 +2,7 @@ fix libhdhomerun includes
--- a/configure
+++ b/configure
@@ -419,7 +419,7 @@ if enabled hdhomerun_static; then
@@ -481,7 +481,7 @@ if enabled hdhomerun_static; then
else
if enabled_or_auto hdhomerun_client; then