
commit
b21cdf8e22
11 changed files with 14519 additions and 0 deletions
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
From 94845266b705dc9de7921408531b9d7704f4458f Mon Sep 17 00:00:00 2001 |
||||
From: Dominic Mayers <dominic.mayers@meditationstudies.org> |
||||
Date: Sun, 28 Mar 2021 04:37:54 -0400 |
||||
Subject: [PATCH] Get addr by ref. from getConnectionEndpointAddress. |
||||
|
||||
Fixes issue #25473 in code.videolan.org. The maintainers of live555 changed |
||||
connectionEndpointAddresss to getConnectionEndpointAddress, which now provides |
||||
the address value by reference. Before, connectionEndpointAddresss returned |
||||
the value. So, in modules/access/live555.cpp, we must first get the value and |
||||
then pass it to IsMulticastAddress. The code will not compile with the recent |
||||
live555 unless we also modify modules/access/Makefile.am - a different patch. |
||||
--- |
||||
modules/access/live555.cpp | 7 +++++-- |
||||
1 file changed, 5 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp |
||||
index 01c535ca5b..95e15e35d9 100644 |
||||
--- a/modules/access/live555.cpp |
||||
+++ b/modules/access/live555.cpp |
||||
@@ -60,6 +60,7 @@ |
||||
#include <liveMedia.hh> |
||||
#include <liveMedia_version.hh> |
||||
#include <Base64.hh> |
||||
+#include <NetAddress.hh> |
||||
|
||||
extern "C" { |
||||
#include "../access/mms/asf.h" /* Who said ugly ? */ |
||||
@@ -727,7 +728,8 @@ static int SessionsSetup( demux_t *p_demux ) |
||||
unsigned const thresh = 200000; /* RTP reorder threshold .2 second (default .1) */ |
||||
const char *p_sess_lang = NULL; |
||||
const char *p_lang; |
||||
- |
||||
+ struct sockaddr_storage addr; |
||||
+ |
||||
b_rtsp_tcp = var_CreateGetBool( p_demux, "rtsp-tcp" ) || |
||||
var_GetBool( p_demux, "rtsp-http" ); |
||||
i_client_port = var_InheritInteger( p_demux, "rtp-client-port" ); |
||||
@@ -850,7 +852,8 @@ static int SessionsSetup( demux_t *p_demux ) |
||||
if( !p_sys->b_multicast ) |
||||
{ |
||||
/* We need different rollover behaviour for multicast */ |
||||
- p_sys->b_multicast = IsMulticastAddress( sub->connectionEndpointAddress() ); |
||||
+ sub->getConnectionEndpointAddress(addr); |
||||
+ p_sys->b_multicast = IsMulticastAddress( addr ); |
||||
} |
||||
|
||||
tk = (live_track_t*)malloc( sizeof( live_track_t ) ); |
||||
-- |
||||
2.25.1 |
||||
|
@ -0,0 +1,74 @@
@@ -0,0 +1,74 @@
|
||||
From b107d105f8489edd6deafb340c65f435ab6e1c29 Mon Sep 17 00:00:00 2001 |
||||
From: Leigh Scott <leigh123linux@gmail.com> |
||||
Date: Mon, 14 Jun 2021 12:26:09 +0100 |
||||
Subject: [PATCH] Revert "access: libdvdread 6.1.2 supports UTF-8 paths in |
||||
Windows." |
||||
|
||||
This reverts commit 02b784c0cefe6d0d36bbc3b668a7f238c7f7b3ed. |
||||
--- |
||||
modules/access/dvdnav.c | 9 --------- |
||||
modules/access/dvdread.c | 9 --------- |
||||
2 files changed, 18 deletions(-) |
||||
|
||||
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c |
||||
index 69abe50c8c..89fb66f11e 100644 |
||||
--- a/modules/access/dvdnav.c |
||||
+++ b/modules/access/dvdnav.c |
||||
@@ -371,14 +371,7 @@ static int AccessDemuxOpen ( vlc_object_t *p_this ) |
||||
goto bailout; |
||||
|
||||
/* Open dvdnav */ |
||||
-#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2) |
||||
- /* In libdvdread prior to 6.1.2, UTF8 is not supported for windows and |
||||
- * requires a prior conversion. |
||||
- * For non win32/os2 platforms, this is just a no-op */ |
||||
psz_path = ToLocale( psz_file ); |
||||
-#else |
||||
- psz_path = psz_file; |
||||
-#endif |
||||
#if DVDNAV_VERSION >= 60100 |
||||
dvdnav_logger_cb cbs; |
||||
cbs.pf_log = DvdNavLog; |
||||
@@ -397,10 +390,8 @@ static int AccessDemuxOpen ( vlc_object_t *p_this ) |
||||
|
||||
bailout: |
||||
free( psz_file ); |
||||
-#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2) |
||||
if( psz_path ) |
||||
LocaleFree( psz_path ); |
||||
-#endif |
||||
return i_ret; |
||||
} |
||||
|
||||
diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c |
||||
index 749cbd47e0..e75bef5986 100644 |
||||
--- a/modules/access/dvdread.c |
||||
+++ b/modules/access/dvdread.c |
||||
@@ -212,14 +212,7 @@ static int Open( vlc_object_t *p_this ) |
||||
} |
||||
|
||||
/* Open dvdread */ |
||||
-#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2) |
||||
- /* In libdvdread prior to 6.1.2, UTF8 is not supported for windows and |
||||
- * requires a prior conversion. |
||||
- * For non win32/os2 platforms, this is just a no-op */ |
||||
const char *psz_path = ToLocale( psz_file ); |
||||
-#else |
||||
- const char *psz_path = psz_file; |
||||
-#endif |
||||
#if DVDREAD_VERSION >= DVDREAD_VERSION_CODE(6, 1, 0) |
||||
dvd_logger_cb cbs; |
||||
cbs.pf_log = DvdReadLog; |
||||
@@ -227,9 +220,7 @@ static int Open( vlc_object_t *p_this ) |
||||
#else |
||||
dvd_reader_t *p_dvdread = DVDOpen( psz_path ); |
||||
#endif |
||||
-#if DVDREAD_VERSION < DVDREAD_VERSION_CODE(6, 1, 2) |
||||
LocaleFree( psz_path ); |
||||
-#endif |
||||
if( p_dvdread == NULL ) |
||||
{ |
||||
msg_Err( p_demux, "DVDRead cannot open source: %s", psz_file ); |
||||
-- |
||||
2.31.1 |
||||
|
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
From 3039aec58203513f29edb03f84471ea941a0c226 Mon Sep 17 00:00:00 2001 |
||||
From: Nicolas Chauvet <kwizart@gmail.com> |
||||
Date: Mon, 24 Sep 2018 18:28:26 +0200 |
||||
Subject: [PATCH] Use @SYSTEM wide ciphers for gnutls |
||||
|
||||
Gnutls upstream has support for system defined ciphers list |
||||
This is decribed at |
||||
https://fedoraproject.org/wiki/Packaging:CryptoPolicies |
||||
Also found on the debian wiki |
||||
https://wiki.debian.org/CryptoPolicy |
||||
|
||||
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> |
||||
--- |
||||
modules/misc/gnutls.c | 2 ++ |
||||
1 file changed, 2 insertions(+) |
||||
|
||||
diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c |
||||
index 7b63cc34c4..3ca665f3d3 100644 |
||||
--- a/modules/misc/gnutls.c |
||||
+++ b/modules/misc/gnutls.c |
||||
@@ -768,12 +768,14 @@ static void CloseServer (vlc_tls_creds_t *crd) |
||||
"hash functions and compression methods can be selected. " \ |
||||
"Refer to GNU TLS documentation for detailed syntax.") |
||||
static const char *const priorities_values[] = { |
||||
+ "@SYSTEM", |
||||
"PERFORMANCE", |
||||
"NORMAL", |
||||
"SECURE128", |
||||
"SECURE256", |
||||
}; |
||||
static const char *const priorities_text[] = { |
||||
+ N_("System (default to system crypto ciphers policy)"), |
||||
N_("Performance (prioritize faster ciphers)"), |
||||
N_("Normal"), |
||||
N_("Secure 128-bits (exclude 256-bits ciphers)"), |
||||
-- |
||||
2.25.4 |
||||
|
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
From fefc0d51b9d3ec6046a73cf317b31870048d1fc2 Mon Sep 17 00:00:00 2001 |
||||
From: Nicolas Chauvet <kwizart@gmail.com> |
||||
Date: Mon, 6 Apr 2020 09:08:08 +0200 |
||||
Subject: [PATCH] Lower libgcrypt to 1.5.3 |
||||
|
||||
Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> |
||||
--- |
||||
configure.ac | 8 ++++---- |
||||
1 file changed, 4 insertions(+), 4 deletions(-) |
||||
|
||||
diff --git a/configure.ac b/configure.ac |
||||
index 1dfe2fce9b..cdac533e10 100644 |
||||
--- a/configure.ac |
||||
+++ b/configure.ac |
||||
@@ -4038,14 +4038,14 @@ AC_ARG_ENABLE(libgcrypt, |
||||
AC_ARG_VAR([GCRYPT_CFLAGS], [C compiler flags for gcrypt]) |
||||
AC_ARG_VAR([GCRYPT_LIBS], [linker flags flags for gcrypt]) |
||||
|
||||
-# require libgcrypt >= 1.6.0 |
||||
+# require libgcrypt >= 1.5.3 |
||||
AS_IF([test "${enable_libgcrypt}" != "no"], [ |
||||
- AC_CACHE_CHECK([for gcrypt 1.6.0 or later], [ac_cv_lib_gcrypt], [ |
||||
+ AC_CACHE_CHECK([for gcrypt 1.5.3 or later], [ac_cv_lib_gcrypt], [ |
||||
VLC_SAVE_FLAGS |
||||
CFLAGS="${CFLAGS} ${GCRYPT_CFLAGS}" |
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ |
||||
[#include <gcrypt.h> |
||||
-#if GCRYPT_VERSION_NUMBER < 0x010600 |
||||
+#if GCRYPT_VERSION_NUMBER < 0x010503 |
||||
#error |
||||
#endif]])], [ |
||||
ac_cv_lib_gcrypt=yes |
||||
@@ -4059,7 +4059,7 @@ AS_IF([test "${enable_libgcrypt}" != "no"], [ |
||||
AC_DEFINE([HAVE_GCRYPT], 1, [Defined if having gcrypt]) |
||||
], [ |
||||
AS_IF([test "${enable_libgcrypt}" = "yes"], [ |
||||
- AC_MSG_ERROR([libgcrypt version 1.6.0 or higher not found. Install libgcrypt or pass --disable-libgcrypt.]) |
||||
+ AC_MSG_ERROR([libgcrypt version 1.5.3 or higher not found. Install libgcrypt or pass --disable-libgcrypt.]) |
||||
]) |
||||
]) |
||||
]) |
||||
-- |
||||
2.25.1 |
||||
|
@ -0,0 +1,98 @@
@@ -0,0 +1,98 @@
|
||||
diff -uNrp a/modules/video_output/caca.c b/modules/video_output/caca.c |
||||
--- a/modules/video_output/caca.c 2022-01-14 06:09:28.000000000 +0000 |
||||
+++ b/modules/video_output/caca.c 2022-01-18 23:09:44.979137301 +0000 |
||||
@@ -74,9 +74,9 @@ static void Place(vout_display_t *, vout |
||||
|
||||
/* */ |
||||
struct vout_display_sys_t { |
||||
- cucul_canvas_t *cv; |
||||
+ caca_canvas_t *cv; |
||||
caca_display_t *dp; |
||||
- cucul_dither_t *dither; |
||||
+ caca_dither_t *dither; |
||||
|
||||
picture_pool_t *pool; |
||||
vout_display_event_thread_t *et; |
||||
@@ -153,9 +153,9 @@ static int Open(vlc_object_t *object) |
||||
if (!sys) |
||||
goto error; |
||||
|
||||
- sys->cv = cucul_create_canvas(0, 0); |
||||
+ sys->cv = caca_create_canvas(0, 0); |
||||
if (!sys->cv) { |
||||
- msg_Err(vd, "cannot initialize libcucul"); |
||||
+ msg_Err(vd, "cannot initialize libcaca"); |
||||
goto error; |
||||
} |
||||
|
||||
@@ -209,11 +209,11 @@ error: |
||||
if (sys->pool) |
||||
picture_pool_Release(sys->pool); |
||||
if (sys->dither) |
||||
- cucul_free_dither(sys->dither); |
||||
+ caca_free_dither(sys->dither); |
||||
if (sys->dp) |
||||
caca_free_display(sys->dp); |
||||
if (sys->cv) |
||||
- cucul_free_canvas(sys->cv); |
||||
+ caca_free_canvas(sys->cv); |
||||
|
||||
free(sys); |
||||
} |
||||
@@ -235,9 +235,9 @@ static void Close(vlc_object_t *object) |
||||
if (sys->pool) |
||||
picture_pool_Release(sys->pool); |
||||
if (sys->dither) |
||||
- cucul_free_dither(sys->dither); |
||||
+ caca_free_dither(sys->dither); |
||||
caca_free_display(sys->dp); |
||||
- cucul_free_canvas(sys->cv); |
||||
+ caca_free_canvas(sys->cv); |
||||
|
||||
#if defined(_WIN32) |
||||
FreeConsole(); |
||||
@@ -266,7 +266,7 @@ static void Prepare(vout_display_t *vd, |
||||
|
||||
if (!sys->dither) { |
||||
/* Create the libcaca dither object */ |
||||
- sys->dither = cucul_create_dither(32, |
||||
+ sys->dither = caca_create_dither(32, |
||||
vd->source.i_visible_width, |
||||
vd->source.i_visible_height, |
||||
picture->p[0].i_pitch, |
||||
@@ -284,12 +284,12 @@ static void Prepare(vout_display_t *vd, |
||||
vout_display_place_t place; |
||||
Place(vd, &place); |
||||
|
||||
- cucul_set_color_ansi(sys->cv, CUCUL_COLOR_DEFAULT, CUCUL_COLOR_BLACK); |
||||
- cucul_clear_canvas(sys->cv); |
||||
+ caca_set_color_ansi(sys->cv, CACA_DEFAULT, CACA_BLACK); |
||||
+ caca_clear_canvas(sys->cv); |
||||
|
||||
const int crop_offset = vd->source.i_y_offset * picture->p->i_pitch + |
||||
vd->source.i_x_offset * picture->p->i_pixel_pitch; |
||||
- cucul_dither_bitmap(sys->cv, place.x, place.y, |
||||
+ caca_dither_bitmap(sys->cv, place.x, place.y, |
||||
place.width, place.height, |
||||
sys->dither, |
||||
&picture->p->p_pixels[crop_offset]); |
||||
@@ -328,7 +328,7 @@ static int Control(vout_display_t *vd, i |
||||
|
||||
case VOUT_DISPLAY_CHANGE_SOURCE_CROP: |
||||
if (sys->dither) |
||||
- cucul_free_dither(sys->dither); |
||||
+ caca_free_dither(sys->dither); |
||||
sys->dither = NULL; |
||||
return VLC_SUCCESS; |
||||
|
||||
@@ -366,8 +366,8 @@ static void Place(vout_display_t *vd, vo |
||||
|
||||
vout_display_PlacePicture(place, &vd->source, vd->cfg, false); |
||||
|
||||
- const int canvas_width = cucul_get_canvas_width(sys->cv); |
||||
- const int canvas_height = cucul_get_canvas_height(sys->cv); |
||||
+ const int canvas_width = caca_get_canvas_width(sys->cv); |
||||
+ const int canvas_height = caca_get_canvas_height(sys->cv); |
||||
const int display_width = caca_get_display_width(sys->dp); |
||||
const int display_height = caca_get_display_height(sys->dp); |
||||
|
@ -0,0 +1,94 @@
@@ -0,0 +1,94 @@
|
||||
From 43332a4fa12ff79f284749177dc0743a495caea6 Mon Sep 17 00:00:00 2001 |
||||
From: Nicolas Chauvet <kwizart@gmail.com> |
||||
Date: Sat, 18 Jul 2020 15:19:31 +0200 |
||||
Subject: [PATCH 1/1] Restore support for thread callbacks for older gcrypt |
||||
|
||||
--- |
||||
include/vlc_gcrypt.h | 64 ++++++++++++++++++++++++++++++++++++++++++++ |
||||
1 file changed, 64 insertions(+) |
||||
|
||||
diff --git a/include/vlc_gcrypt.h b/include/vlc_gcrypt.h |
||||
index a04e1b1d86..4c7f1e86b0 100644 |
||||
--- a/include/vlc_gcrypt.h |
||||
+++ b/include/vlc_gcrypt.h |
||||
@@ -25,6 +25,67 @@ |
||||
|
||||
#include <errno.h> |
||||
|
||||
+#if GCRYPT_VERSION_NUMBER < 0x010600 |
||||
+#ifdef LIBVLC_USE_PTHREAD |
||||
+/** |
||||
+ * If possible, use gcrypt-provided thread implementation. This is so that |
||||
+ * other non-VLC components (inside the process) can also use gcrypt safely. |
||||
+ */ |
||||
+GCRY_THREAD_OPTION_PTHREAD_IMPL; |
||||
+# define gcry_threads_vlc gcry_threads_pthread |
||||
+#else |
||||
+ |
||||
+/** |
||||
+ * gcrypt thread option VLC implementation |
||||
+ */ |
||||
+ |
||||
+static int gcry_vlc_mutex_init( void **p_sys ) |
||||
+{ |
||||
+ vlc_mutex_t *p_lock = (vlc_mutex_t *)malloc( sizeof( vlc_mutex_t ) ); |
||||
+ if( p_lock == NULL) |
||||
+ return ENOMEM; |
||||
+ |
||||
+ vlc_mutex_init( p_lock ); |
||||
+ *p_sys = p_lock; |
||||
+ return VLC_SUCCESS; |
||||
+} |
||||
+ |
||||
+static int gcry_vlc_mutex_destroy( void **p_sys ) |
||||
+{ |
||||
+ vlc_mutex_t *p_lock = (vlc_mutex_t *)*p_sys; |
||||
+ vlc_mutex_destroy( p_lock ); |
||||
+ free( p_lock ); |
||||
+ return VLC_SUCCESS; |
||||
+} |
||||
+ |
||||
+static int gcry_vlc_mutex_lock( void **p_sys ) |
||||
+{ |
||||
+ vlc_mutex_lock( (vlc_mutex_t *)*p_sys ); |
||||
+ return VLC_SUCCESS; |
||||
+} |
||||
+ |
||||
+static int gcry_vlc_mutex_unlock( void **lock ) |
||||
+{ |
||||
+ vlc_mutex_unlock( (vlc_mutex_t *)*lock ); |
||||
+ return VLC_SUCCESS; |
||||
+} |
||||
+ |
||||
+static const struct gcry_thread_cbs gcry_threads_vlc = |
||||
+{ |
||||
+ GCRY_THREAD_OPTION_USER, |
||||
+ NULL, |
||||
+ gcry_vlc_mutex_init, |
||||
+ gcry_vlc_mutex_destroy, |
||||
+ gcry_vlc_mutex_lock, |
||||
+ gcry_vlc_mutex_unlock, |
||||
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL |
||||
+}; |
||||
+#endif |
||||
+#endif |
||||
+ |
||||
+/** |
||||
+ * Initializes gcrypt with proper locking. |
||||
+ */ |
||||
static inline void vlc_gcrypt_init (void) |
||||
{ |
||||
/* This would need a process-wide static mutex with all libraries linking |
||||
@@ -37,6 +98,9 @@ static inline void vlc_gcrypt_init (void) |
||||
vlc_global_lock (VLC_GCRYPT_MUTEX); |
||||
if (!done) |
||||
{ |
||||
+#if GCRYPT_VERSION_NUMBER < 0x010600 |
||||
+ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_vlc); |
||||
+#endif |
||||
/* The suggested way for an application to make sure that global_init |
||||
* has been called is by using gcry_check_version. (see global_init |
||||
* comments in gcrypt sources) */ |
||||
-- |
||||
2.25.4 |
||||
|
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
From 3965d3cf07a62a7ed64c79f44a7cc416b76cb27e Mon Sep 17 00:00:00 2001 |
||||
From: Leigh Scott <leigh123linux@gmail.com> |
||||
Date: Fri, 30 Oct 2020 10:51:52 +0100 |
||||
Subject: [PATCH] Switch to Fedora lua-5.1 |
||||
|
||||
--- |
||||
configure.ac | 6 +++--- |
||||
1 file changed, 3 insertions(+), 3 deletions(-) |
||||
|
||||
diff --git a/configure.ac b/configure.ac |
||||
index 3aa07a8c715d..9bc7ceafb5ff 100644 |
||||
--- a/configure.ac |
||||
+++ b/configure.ac |
||||
@@ -1681,7 +1681,7 @@ then |
||||
[ |
||||
AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead]) |
||||
|
||||
- PKG_CHECK_MODULES(LUA, lua5.1, |
||||
+ PKG_CHECK_MODULES(LUA, lua-5.1, |
||||
[ have_lua=yes ], |
||||
[ |
||||
AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead]) |
||||
@@ -1695,8 +1695,8 @@ then |
||||
[ have_lua=no ] ) |
||||
AC_CHECK_LIB( lua5.2 , luaL_newstate, |
||||
[LUA_LIBS="-llua5.2"], |
||||
- AC_CHECK_LIB( lua5.1 , luaL_newstate, |
||||
- [LUA_LIBS="-llua5.1"], |
||||
+ AC_CHECK_LIB( lua-5.1 , luaL_newstate, |
||||
+ [LUA_LIBS="-llua-5.1"], |
||||
AC_CHECK_LIB( lua51 , luaL_newstate, |
||||
[LUA_LIBS="-llua51"], |
||||
AC_CHECK_LIB( lua , luaL_newstate, |
||||
-- |
||||
2.25.4 |
||||
|
@ -0,0 +1,149 @@
@@ -0,0 +1,149 @@
|
||||
From 55b24abf7219a0c6a6560187496e41fd60638552 Mon Sep 17 00:00:00 2001 |
||||
From: Steve Lhomme <robux4@ycbcr.xyz> |
||||
Date: Fri, 18 Mar 2022 11:42:49 +0100 |
||||
Subject: [PATCH 1/2] dav1d: fix compilation with (upcoming) dav1d 1.0 |
||||
|
||||
(cherry picked from commit dbf45cea2a8abdfbef897b8a71f3eb782bb1b712) (edited) |
||||
edited: |
||||
- 3.0 has the 128 pixels padding elsewhere |
||||
- 3.0 has an extra parameter for add_integer_with_range() |
||||
- 3.0 was setting i_extra_picture_buffers further down in the code |
||||
- 3.0 uses 16 threads max |
||||
|
||||
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz> |
||||
--- |
||||
modules/codec/dav1d.c | 22 +++++++++++++++++++++- |
||||
1 file changed, 21 insertions(+), 1 deletion(-) |
||||
|
||||
diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c |
||||
index 039165f52e..cfabbc27cb 100644 |
||||
--- a/modules/codec/dav1d.c |
||||
+++ b/modules/codec/dav1d.c |
||||
@@ -63,10 +63,16 @@ vlc_module_begin () |
||||
set_category(CAT_INPUT) |
||||
set_subcategory(SUBCAT_INPUT_VCODEC) |
||||
|
||||
+#if DAV1D_API_VERSION_MAJOR >= 6 |
||||
+ add_integer_with_range("dav1d-thread-frames", 0, 0, DAV1D_MAX_THREADS, |
||||
+ THREAD_FRAMES_TEXT, THREAD_FRAMES_LONGTEXT, false) |
||||
+ add_obsolete_string("dav1d-thread-tiles") // unused with dav1d 1.0 |
||||
+#else |
||||
add_integer_with_range("dav1d-thread-frames", 0, 0, DAV1D_MAX_FRAME_THREADS, |
||||
THREAD_FRAMES_TEXT, THREAD_FRAMES_LONGTEXT, false) |
||||
add_integer_with_range("dav1d-thread-tiles", 0, 0, DAV1D_MAX_TILE_THREADS, |
||||
THREAD_TILES_TEXT, THREAD_TILES_LONGTEXT, false) |
||||
+#endif |
||||
vlc_module_end () |
||||
|
||||
/***************************************************************************** |
||||
@@ -294,6 +300,11 @@ static int OpenDecoder(vlc_object_t *p_this) |
||||
return VLC_ENOMEM; |
||||
|
||||
dav1d_default_settings(&p_sys->s); |
||||
+#if DAV1D_API_VERSION_MAJOR >= 6 |
||||
+ p_sys->s.n_threads = var_InheritInteger(p_this, "dav1d-thread-frames"); |
||||
+ if (p_sys->s.n_threads == 0) |
||||
+ p_sys->s.n_threads = (i_core_count < 16) ? i_core_count : 16; |
||||
+#else |
||||
p_sys->s.n_tile_threads = var_InheritInteger(p_this, "dav1d-thread-tiles"); |
||||
if (p_sys->s.n_tile_threads == 0) |
||||
p_sys->s.n_tile_threads = |
||||
@@ -303,6 +314,7 @@ static int OpenDecoder(vlc_object_t *p_this) |
||||
p_sys->s.n_frame_threads = var_InheritInteger(p_this, "dav1d-thread-frames"); |
||||
if (p_sys->s.n_frame_threads == 0) |
||||
p_sys->s.n_frame_threads = (i_core_count < 16) ? i_core_count : 16; |
||||
+#endif |
||||
p_sys->s.allocator.cookie = dec; |
||||
p_sys->s.allocator.alloc_picture_callback = NewPicture; |
||||
p_sys->s.allocator.release_picture_callback = FreePicture; |
||||
@@ -313,12 +325,20 @@ static int OpenDecoder(vlc_object_t *p_this) |
||||
return VLC_EGENERIC; |
||||
} |
||||
|
||||
+#if DAV1D_API_VERSION_MAJOR >= 6 |
||||
+ msg_Dbg(p_this, "Using dav1d version %s with %d threads", |
||||
+ dav1d_version(), p_sys->s.n_threads); |
||||
+ |
||||
+ dec->i_extra_picture_buffers = (p_sys->s.n_threads - 1); |
||||
+#else |
||||
msg_Dbg(p_this, "Using dav1d version %s with %d/%d frame/tile threads", |
||||
dav1d_version(), p_sys->s.n_frame_threads, p_sys->s.n_tile_threads); |
||||
|
||||
+ dec->i_extra_picture_buffers = (p_sys->s.n_frame_threads - 1); |
||||
+#endif |
||||
+ |
||||
dec->pf_decode = Decode; |
||||
dec->pf_flush = FlushDecoder; |
||||
- dec->i_extra_picture_buffers = (p_sys->s.n_frame_threads - 1); |
||||
|
||||
dec->fmt_out.video.i_width = dec->fmt_in.video.i_width; |
||||
dec->fmt_out.video.i_height = dec->fmt_in.video.i_height; |
||||
-- |
||||
2.36.1 |
||||
|
||||
|
||||
From c95e5288ab2d222346b19552a462afe5159d1122 Mon Sep 17 00:00:00 2001 |
||||
From: Steve Lhomme <robux4@ycbcr.xyz> |
||||
Date: Mon, 21 Mar 2022 15:53:52 +0100 |
||||
Subject: [PATCH 2/2] dav1d: limit the number of extra frames needed by the |
||||
decoder |
||||
|
||||
The i_extra_picture_buffers is used to add pictures to the pool that the core |
||||
will allocate. dav1d is actually using n_threads frames. And the core is |
||||
allocating 10 frames per default for AV1. So we need to add the missing ones. |
||||
|
||||
(cherry picked from commit a32031dc0f5f32083fc54a21397bce732742ccbe) (rebased) |
||||
rebased: |
||||
- the code dav1d 1.0.0 in 3.0 uses different max versions |
||||
|
||||
Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz> |
||||
--- |
||||
modules/codec/dav1d.c | 25 +++++++++++++++++++++++-- |
||||
1 file changed, 23 insertions(+), 2 deletions(-) |
||||
|
||||
diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c |
||||
index cfabbc27cb..8a439ce4ff 100644 |
||||
--- a/modules/codec/dav1d.c |
||||
+++ b/modules/codec/dav1d.c |
||||
@@ -304,7 +304,28 @@ static int OpenDecoder(vlc_object_t *p_this) |
||||
p_sys->s.n_threads = var_InheritInteger(p_this, "dav1d-thread-frames"); |
||||
if (p_sys->s.n_threads == 0) |
||||
p_sys->s.n_threads = (i_core_count < 16) ? i_core_count : 16; |
||||
-#else |
||||
+ |
||||
+#if DAV1D_API_VERSION_MAJOR > 6 || DAV1D_API_VERSION_MINOR >= 7 |
||||
+ // after dav1d 1.0.0 |
||||
+ p_sys->s.max_frame_delay = dav1d_get_frame_delay( &p_sys->s ); |
||||
+#else // 1.0.0 |
||||
+ // corresponds to c->n_fc when max_frame_delay is 0 in dav1d 1.0.0 |
||||
+ static const uint8_t fc_lut[49] = { |
||||
+ 1, /* 1 */ |
||||
+ 2, 2, 2, /* 2- 4 */ |
||||
+ 3, 3, 3, 3, 3, /* 5- 9 */ |
||||
+ 4, 4, 4, 4, 4, 4, 4, /* 10-16 */ |
||||
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, /* 17-25 */ |
||||
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, /* 26-36 */ |
||||
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, /* 37-49 */ |
||||
+ }; |
||||
+ if (p_sys->s.n_threads >= 50) |
||||
+ p_sys->s.max_frame_delay = 8; |
||||
+ else |
||||
+ p_sys->s.max_frame_delay = fc_lut[p_sys->s.n_threads - 1]; |
||||
+#endif |
||||
+ |
||||
+#else // before dav1d 1.0.0 |
||||
p_sys->s.n_tile_threads = var_InheritInteger(p_this, "dav1d-thread-tiles"); |
||||
if (p_sys->s.n_tile_threads == 0) |
||||
p_sys->s.n_tile_threads = |
||||
@@ -329,7 +350,7 @@ static int OpenDecoder(vlc_object_t *p_this) |
||||
msg_Dbg(p_this, "Using dav1d version %s with %d threads", |
||||
dav1d_version(), p_sys->s.n_threads); |
||||
|
||||
- dec->i_extra_picture_buffers = (p_sys->s.n_threads - 1); |
||||
+ dec->i_extra_picture_buffers = p_sys->s.max_frame_delay; |
||||
#else |
||||
msg_Dbg(p_this, "Using dav1d version %s with %d/%d frame/tile threads", |
||||
dav1d_version(), p_sys->s.n_frame_threads, p_sys->s.n_tile_threads); |
||||
-- |
||||
2.36.1 |
||||
|
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
--- a/modules/video_chroma/chain.c |
||||
+++ b/modules/video_chroma/chain.c |
||||
@@ -280,8 +280,9 @@ static int BuildTransformChain( filter_t |
||||
return VLC_SUCCESS; |
||||
|
||||
/* Lets try resize+chroma first, then transform */ |
||||
- msg_Dbg( p_filter, "Trying to build chroma+resize" ); |
||||
- EsFormatMergeSize( &fmt_mid, &p_filter->fmt_out, &p_filter->fmt_in ); |
||||
+ msg_Dbg( p_filter, "Trying to build chroma+resize, then transform" ); |
||||
+ es_format_Copy( &fmt_mid, &p_filter->fmt_out ); |
||||
+ video_format_TransformTo(&fmt_mid.video, p_filter->fmt_in.video.orientation); |
||||
i_ret = CreateChain( p_filter, &fmt_mid ); |
||||
es_format_Clean( &fmt_mid ); |
||||
if( i_ret == VLC_SUCCESS ) |
@ -0,0 +1,101 @@
@@ -0,0 +1,101 @@
|
||||
From c25400b146f7a7b3b4a29c0efa4daee9d1c49633 Mon Sep 17 00:00:00 2001 |
||||
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> |
||||
Date: Tue, 5 May 2020 18:48:06 +0300 |
||||
Subject: [PATCH] notify: don't depend on any GTK version |
||||
|
||||
If there's one in the process use it. If there's none fallback to |
||||
default VLC icon with the old code. |
||||
|
||||
This not only avoids VLC builds depending on GTK, but this should |
||||
prevent crashes if GTK 2 is present in the process (e.g. through Qt plugin). |
||||
|
||||
Adapted to vlc-3.x by "Nicolas Chauvet <kwizart@gmail.com>" |
||||
--- |
||||
configure.ac | 2 +- |
||||
modules/notify/notify.c | 38 ++++++++++++++++++++++---------------- |
||||
2 files changed, 23 insertions(+), 17 deletions(-) |
||||
|
||||
diff --git a/configure.ac b/configure.ac |
||||
index 09ac250ff483..a3ef64318561 100644 |
||||
--- a/configure.ac |
||||
+++ b/configure.ac |
||||
@@ -4206,7 +4206,7 @@ AS_IF([test "${enable_osx_notifications}" != "no"], [ |
||||
dnl |
||||
dnl Libnotify notification plugin |
||||
dnl |
||||
-PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify gtk+-3.0], [libnotify notification], [auto]) |
||||
+PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify], [libnotify notification], [auto]) |
||||
|
||||
dnl |
||||
dnl libplacebo support |
||||
diff --git a/modules/notify/notify.c b/modules/notify/notify.c |
||||
index bd6bba6c32c8..20b7c4acb761 100644 |
||||
--- a/modules/notify/notify.c |
||||
+++ b/modules/notify/notify.c |
||||
@@ -36,10 +36,16 @@ |
||||
#include <vlc_playlist.h> |
||||
#include <vlc_url.h> |
||||
|
||||
-#include <gtk/gtk.h> |
||||
#include <gdk-pixbuf/gdk-pixbuf.h> |
||||
#include <libnotify/notify.h> |
||||
|
||||
+typedef struct GtkIconTheme GtkIconTheme; |
||||
+enum GtkIconLookupFlags { dummy = 0x7fffffff }; |
||||
+ |
||||
+__attribute__((weak)) GtkIconTheme *gtk_icon_theme_get_default(void); |
||||
+__attribute__((weak)) GdkPixbuf *gtk_icon_theme_load_icon(GtkIconTheme *, |
||||
+ const char *icon_name, int size, enum GtkIconLookupFlags, GError **); |
||||
+ |
||||
#ifndef NOTIFY_CHECK_VERSION |
||||
# define NOTIFY_CHECK_VERSION(x,y,z) 0 |
||||
#endif |
||||
@@ -222,30 +228,30 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, |
||||
GError *p_error = NULL; |
||||
pix = gdk_pixbuf_new_from_file_at_scale( psz_arturl, |
||||
72, 72, TRUE, &p_error ); |
||||
+ free( psz_arturl ); |
||||
} |
||||
- else /* else we show state-of-the art logo */ |
||||
+ else |
||||
+ /* else we show state-of-the art logo */ |
||||
+ if( gtk_icon_theme_get_default != NULL |
||||
+ && gtk_icon_theme_load_icon != NULL ) |
||||
{ |
||||
/* First try to get an icon from the current theme. */ |
||||
GtkIconTheme* p_theme = gtk_icon_theme_get_default(); |
||||
pix = gtk_icon_theme_load_icon( p_theme, "vlc", 72, 0, NULL); |
||||
- |
||||
- if( !pix ) |
||||
+ } |
||||
+ else |
||||
+ { /* Load icon from share/ */ |
||||
+ GError *p_error = NULL; |
||||
+ char *psz_pixbuf; |
||||
+ char *psz_data = config_GetDataDir(); |
||||
+ if( asprintf( &psz_pixbuf, "%s/icons/48x48/vlc.png", psz_data ) >= 0 ) |
||||
{ |
||||
- /* Load icon from share/ */ |
||||
- GError *p_error = NULL; |
||||
- char *psz_pixbuf; |
||||
- char *psz_data = config_GetDataDir(); |
||||
- if( asprintf( &psz_pixbuf, "%s/icons/48x48/vlc.png", psz_data ) >= 0 ) |
||||
- { |
||||
- pix = gdk_pixbuf_new_from_file( psz_pixbuf, &p_error ); |
||||
- free( psz_pixbuf ); |
||||
- } |
||||
- free( psz_data ); |
||||
+ pix = gdk_pixbuf_new_from_file( psz_pixbuf, &p_error ); |
||||
+ free( psz_pixbuf ); |
||||
} |
||||
+ free( psz_data ); |
||||
} |
||||
|
||||
- free( psz_arturl ); |
||||
- |
||||
/* we need to replace '&' with '&' because '&' is a keyword of |
||||
* notification-daemon parser */ |
||||
const int i_len = strlen( psz_tmp ); |
||||
-- |
||||
2.25.4 |
||||
|
Loading…
Reference in new issue