Commit 65488ebc authored by Felix Paul Kühne's avatar Felix Paul Kühne

libvlc: add patches from the 3.0 branch and synchronize the used hash

parent 21a5389a
From f01a21b2a6ddeceabeb1b4e54ac74fad42b70215 Mon Sep 17 00:00:00 2001
From f722ec6e0a507d9d6ac8d07b64d397e0005f7d36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Thu, 18 Dec 2014 22:14:55 +0100
Subject: [PATCH 03/15] arm_neon: work-around libtool issue
Subject: [PATCH 01/21] arm_neon: work-around libtool issue
---
modules/arm_neon/Makefile.am | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/arm_neon/Makefile.am b/modules/arm_neon/Makefile.am
index db81ec0b84..e67e07e61c 100644
index 10f5c15d7c..0406ded7eb 100644
--- a/modules/arm_neon/Makefile.am
+++ b/modules/arm_neon/Makefile.am
@@ -1,3 +1,5 @@
......@@ -18,5 +18,5 @@ index db81ec0b84..e67e07e61c 100644
libchroma_yuv_neon_plugin_la_SOURCES = \
--
2.15.1
2.19.1
From 578973507783bb5fc030559e932e41361b241802 Mon Sep 17 00:00:00 2001
From ec0833dc5c0de67ccb70aaad13b5cca1b53b2b63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Wed, 10 Dec 2014 22:14:55 +0100
Subject: [PATCH 05/15] disable neon volume plugin
Subject: [PATCH 02/21] disable neon volume plugin
---
modules/arm_neon/Makefile.am | 1 -
1 file changed, 1 deletion(-)
diff --git a/modules/arm_neon/Makefile.am b/modules/arm_neon/Makefile.am
index e67e07e61c..690975235f 100644
index 0406ded7eb..48aa33332b 100644
--- a/modules/arm_neon/Makefile.am
+++ b/modules/arm_neon/Makefile.am
@@ -27,6 +27,5 @@ libyuv_rgb_neon_plugin_LIBTOOLFLAGS = --tag=CC
@@ -27,7 +27,6 @@ libyuv_rgb_neon_plugin_LIBTOOLFLAGS = --tag=CC
if HAVE_NEON
neon_LTLIBRARIES = \
libchroma_yuv_neon_plugin.la \
- libvolume_neon_plugin.la \
libyuv_rgb_neon_plugin.la
endif
--
2.15.1
2.19.1
From 537532411de986ae47410c2670d37b6044241f80 Mon Sep 17 00:00:00 2001
From e212978e2104a3b1b63c26a7844039d04ee2a3d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Fri, 22 Jul 2016 11:11:44 +0200
Subject: [PATCH 06/15] Enable System DL
Subject: [PATCH 03/21] Enable System DL
---
contrib/src/ffmpeg/patch-as-patch-can.patch | 20 ++++++++++++++++++++
......@@ -36,10 +36,10 @@ index 0000000000..2d60cf7140
+ in_format.mSampleRate = avctx->sample_rate ? avctx->sample_rate : 44100;
+ in_format.mChannelsPerFrame = avctx->channels ? avctx->channels : 1;
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index e99d9dfb7c..16217f1285 100644
index fc68f815a0..4d2d716146 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -25,6 +25,9 @@ FFMPEGCONF = \
@@ -27,6 +27,9 @@ FFMPEGCONF = \
--disable-encoder=vorbis \
--disable-decoder=opus \
--enable-libgsm \
......@@ -49,7 +49,7 @@ index e99d9dfb7c..16217f1285 100644
--disable-debug \
--disable-avdevice \
--disable-devices \
@@ -235,6 +238,7 @@ endif
@@ -241,6 +244,7 @@ endif
ifdef USE_LIBAV
$(APPLY) $(SRC)/ffmpeg/libav_gsm.patch
endif
......@@ -58,5 +58,5 @@ index e99d9dfb7c..16217f1285 100644
.ffmpeg: ffmpeg
--
2.15.1
2.19.1
From 4b8743bcf22bd35d4c1fb3ecf6c2ad2a3f4fbb42 Mon Sep 17 00:00:00 2001
From a6aab77007bd9037311dd318e7d0f6731a2d072c Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Fri, 16 Sep 2016 15:51:10 +0200
Subject: [PATCH 08/15] http: add vlc_http_cookies_clear
Subject: [PATCH 04/21] http: add vlc_http_cookies_clear
Clear all cookies without deleting the jar.
---
......@@ -61,5 +61,5 @@ index 77ab852b15..f229b85dea 100644
}
--
2.15.1
2.19.1
From 2ed0f231c6665b39e914bee1130f0efabb0ed9e2 Mon Sep 17 00:00:00 2001
From 7ea0717450762464b257e5ee36624871a96b1d74 Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Fri, 16 Sep 2016 15:51:11 +0200
Subject: [PATCH 09/15] libvlc_media: add cookie_jar API
Subject: [PATCH 05/21] libvlc_media: add cookie_jar API
---
include/vlc/libvlc_media.h | 35 +++++++++++++++++++++++++++++++++++
......@@ -58,10 +58,10 @@ index 383f366b69..2a5666688d 100644
# ifdef __cplusplus
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index 7c7fea02e6..9dbf0efa4e 100644
index 482d95f6f1..8ae5da8d0f 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -218,6 +218,8 @@ libvlc_media_set_user_data
@@ -217,6 +217,8 @@ libvlc_media_set_user_data
libvlc_media_subitems
libvlc_media_tracks_get
libvlc_media_tracks_release
......@@ -138,10 +138,10 @@ index 5a67e9ff60..0f0341e260 100644
/* Media Descriptor */
diff --git a/lib/media_player.c b/lib/media_player.c
index daef2faedd..4a6cf0cb0e 100644
index a9a22fee15..fde008aaeb 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -620,6 +620,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
@@ -621,6 +621,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "rate", VLC_VAR_FLOAT|VLC_VAR_DOINHERIT);
var_Create (mp, "sout", VLC_VAR_STRING);
var_Create (mp, "demux-filter", VLC_VAR_STRING);
......@@ -149,7 +149,7 @@ index daef2faedd..4a6cf0cb0e 100644
/* Video */
var_Create (mp, "vout", VLC_VAR_STRING|VLC_VAR_DOINHERIT);
@@ -964,6 +965,12 @@ int libvlc_media_player_play( libvlc_media_player_t *p_mi )
@@ -985,6 +986,12 @@ int libvlc_media_player_play( libvlc_media_player_t *p_mi )
for( size_t i = 0; i < ARRAY_SIZE( p_mi->selected_es ); ++i )
p_mi->selected_es[i] = ES_INIT;
......@@ -163,5 +163,5 @@ index daef2faedd..4a6cf0cb0e 100644
p_input_thread = input_Create( p_mi, p_mi->p_md->p_input_item, NULL,
--
2.15.1
2.19.1
From 43681d842ba377f6a4eff434d5bd5d81775fce7f Mon Sep 17 00:00:00 2001
From 20fc6522b5fdc3b2e9cd43c20365e0449bf7370e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Sun, 7 Dec 2014 20:02:18 +0100
Subject: [PATCH 10/15] contrib/gcrypt: work-around a libtool limitation
Subject: [PATCH 06/21] contrib/gcrypt: work-around a libtool limitation
---
contrib/src/gcrypt/rules.mak | 1 +
.../gcrypt/work-around-libtool-limitation.patch | 25 ++++++++++++++++++++++
contrib/src/gcrypt/rules.mak | 1 +
.../work-around-libtool-limitation.patch | 25 +++++++++++++++++++
2 files changed, 26 insertions(+)
create mode 100644 contrib/src/gcrypt/work-around-libtool-limitation.patch
diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
index eff80415a1..c2d4b934f4 100644
index eb1debac1b..bc938e585f 100644
--- a/contrib/src/gcrypt/rules.mak
+++ b/contrib/src/gcrypt/rules.mak
@@ -12,6 +12,7 @@ $(TARBALLS)/libgcrypt-$(GCRYPT_VERSION).tar.bz2:
......@@ -53,5 +53,5 @@ index 0000000000..df97ffb488
+ AM_CFLAGS = $(GPG_ERROR_CFLAGS)
+
--
2.15.1
2.19.1
From b15a3081c13c1f7487695292905e80fec4708ec6 Mon Sep 17 00:00:00 2001
From 56de0725dec3e6bbb1e7c50bbdd27e6f71c9c1fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Sat, 3 Oct 2015 22:45:14 +0200
Subject: [PATCH 11/15] contrib/gcrypt: fix tvOS compilation
Subject: [PATCH 07/21] contrib/gcrypt: fix tvOS compilation
---
contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch | 16 ++++++++++++++++
contrib/src/gcrypt/rules.mak | 6 ++++++
.../src/gcrypt/fix-sha1-ssse3-for-clang.patch | 16 ++++++++++++++++
contrib/src/gcrypt/rules.mak | 6 ++++++
2 files changed, 22 insertions(+)
create mode 100644 contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch
......@@ -32,7 +32,7 @@ index 0000000000..f1d3ccc71f
+ * %rdi: ctx, CTX
+ * %rsi: data (64 bytes)
diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
index c2d4b934f4..dbd556be61 100644
index bc938e585f..3564fde87b 100644
--- a/contrib/src/gcrypt/rules.mak
+++ b/contrib/src/gcrypt/rules.mak
@@ -13,6 +13,7 @@ gcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
......@@ -43,7 +43,7 @@ index c2d4b934f4..dbd556be61 100644
$(APPLY) $(SRC)/gcrypt/fix-pthread-detection.patch
ifdef HAVE_WINSTORE
$(APPLY) $(SRC)/gcrypt/winrt.patch
@@ -43,6 +44,11 @@ GCRYPT_EXTRA_CFLAGS = -fheinous-gnu-extensions
@@ -45,6 +46,11 @@ GCRYPT_EXTRA_CFLAGS = -fheinous-gnu-extensions
else
GCRYPT_EXTRA_CFLAGS =
endif
......@@ -56,5 +56,5 @@ index c2d4b934f4..dbd556be61 100644
GCRYPT_CONF += --disable-aesni-support
else
--
2.15.1
2.19.1
From be3c74bb2d7ab28e21f4c8270392f553579ff867 Mon Sep 17 00:00:00 2001
From 7eb426d0b581e6ca258c61185b9b58b75b59069a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
Date: Mon, 12 Sep 2016 17:03:37 +0200
Subject: [PATCH 12/15] contrib/gcrypt: update patches
Subject: [PATCH 08/21] contrib/gcrypt: update patches
---
contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch | 308 ++++++++++++++++++++-
.../gcrypt/work-around-libtool-limitation.patch | 16 +-
.../src/gcrypt/fix-sha1-ssse3-for-clang.patch | 308 +++++++++++++++++-
.../work-around-libtool-limitation.patch | 16 +-
2 files changed, 310 insertions(+), 14 deletions(-)
diff --git a/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch b/contrib/src/gcrypt/fix-sha1-ssse3-for-clang.patch
......@@ -363,5 +363,5 @@ index df97ffb488..957f268ad2 100644
# Need to include ../src in addition to top_srcdir because gcrypt.h is
--
2.15.1
2.19.1
From 823adc6b13806e57deb4f6fc5c3e3a2d1869a8e9 Mon Sep 17 00:00:00 2001
From 3cd38bd0a11400577995f94b10a94ac0d601ddd0 Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Mon, 17 Jul 2017 17:03:24 +0200
Subject: [PATCH 13/15] Replace thread local with pthread TSD
Subject: [PATCH 09/21] Replace thread local with pthread TSD
---
src/misc/interrupt.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++
src/misc/variables.c | 19 +++++++++++++++++
src/misc/interrupt.c | 59 ++++++++++++++++++++++++++++++++++++++++++++
src/misc/variables.c | 19 ++++++++++++++
2 files changed, 78 insertions(+)
diff --git a/src/misc/interrupt.c b/src/misc/interrupt.c
......@@ -222,5 +222,5 @@ index 810c8ffc81..3d2d2f1dc8 100644
twalk(priv->var_root, TwalkGetNames);
vlc_mutex_unlock(&priv->var_lock);
--
2.15.1
2.19.1
From 029a086e198a74d3494ff6e37feb514aaeb70c41 Mon Sep 17 00:00:00 2001
From a69b13b0a86f1f74be3b765484e75e6080547fea Mon Sep 17 00:00:00 2001
From: Carola Nitz <nitz.carola@googlemail.com>
Date: Fri, 29 Sep 2017 14:49:02 +0200
Subject: [PATCH 14/15] contrib: use live555 version that is compatible with
Subject: [PATCH 10/21] contrib: use live555 version that is compatible with
LGPL2
---
......@@ -18,7 +18,7 @@ index f459fb9d16..02b2a69734 100644
+10846fd6d5482bbea131ae805137077997e9dec242665e3c01d699d5584154c65049e8c520ea855599e554154a148e61fea77b592d97c814a4a98c773658d8f5 live.2016.10.21.tar.gz
\ No newline at end of file
diff --git a/contrib/src/live555/rules.mak b/contrib/src/live555/rules.mak
index a2ef4f842c..5b0cbeb1d9 100644
index 9b275ec33b..30ee48eece 100644
--- a/contrib/src/live555/rules.mak
+++ b/contrib/src/live555/rules.mak
@@ -1,14 +1,12 @@
......@@ -37,7 +37,7 @@ index a2ef4f842c..5b0cbeb1d9 100644
ifeq ($(call need_pkg,"live555"),)
PKGS_FOUND += live555
@@ -82,7 +80,6 @@ endif
@@ -90,7 +88,6 @@ endif
SUBDIRS=groupsock liveMedia UsageEnvironment BasicUsageEnvironment
.live555: live555
......@@ -46,5 +46,5 @@ index a2ef4f842c..5b0cbeb1d9 100644
echo "PREFIX = $(PREFIX)" >> $$subdir/Makefile.head && \
echo "LIBDIR = $(PREFIX)/lib" >> $$subdir/Makefile.head ; done
--
2.11.0
2.19.1
From de4d690e85b426fac18bf22acb498e96493b5852 Mon Sep 17 00:00:00 2001
From fa00abf30e86d629dec8c39049267671ffa93494 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <felix@feepk.net>
Date: Sun, 17 Dec 2017 18:05:40 +0100
Subject: [PATCH 15/15] libvlc: add a basic API to change freetype's color,
Subject: [PATCH 11/21] libvlc: add a basic API to change freetype's color,
bold, font and size variables on-the-fly
---
include/vlc/libvlc_media_player.h | 26 ++++++++++++
lib/libvlc.sym | 6 +++
lib/media_player.c | 6 +++
lib/video.c | 69 ++++++++++++++++++++++++++++++-
modules/text_renderer/freetype/freetype.c | 22 ++++++++--
5 files changed, 124 insertions(+), 5 deletions(-)
include/vlc/libvlc_media_player.h | 26 +++++++++
lib/libvlc.sym | 6 ++
lib/media_player.c | 6 ++
lib/video.c | 69 ++++++++++++++++++++++-
modules/text_renderer/freetype/freetype.c | 32 +++++++++--
5 files changed, 134 insertions(+), 5 deletions(-)
diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index 4336df9442..20b220448b 100644
......@@ -50,10 +50,10 @@ index 4336df9442..20b220448b 100644
/** \defgroup libvlc_audio LibVLC audio controls
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index 9dbf0efa4e..a08c67ae46 100644
index 8ae5da8d0f..55f6400f69 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -261,6 +261,9 @@ libvlc_video_get_spu_count
@@ -262,6 +262,9 @@ libvlc_video_get_spu_count
libvlc_video_get_spu_delay
libvlc_video_get_spu_description
libvlc_video_get_teletext
......@@ -63,7 +63,7 @@ index 9dbf0efa4e..a08c67ae46 100644
libvlc_video_get_title_description
libvlc_video_get_track
libvlc_video_get_track_count
@@ -285,6 +288,9 @@ libvlc_video_set_spu
@@ -286,6 +289,9 @@ libvlc_video_set_spu
libvlc_video_set_spu_delay
libvlc_video_set_subtitle_file
libvlc_video_set_teletext
......@@ -74,10 +74,10 @@ index 9dbf0efa4e..a08c67ae46 100644
libvlc_video_take_snapshot
libvlc_video_new_viewpoint
diff --git a/lib/media_player.c b/lib/media_player.c
index ae72bb2b95..5f167bb4ad 100644
index fde008aaeb..7b4050164f 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -694,6 +694,12 @@ libvlc_media_player_new( libvlc_instance_t *instance )
@@ -695,6 +695,12 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "saturation", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
var_Create (mp, "gamma", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
......@@ -182,10 +182,10 @@ index acbba3a30f..035cc0ebf1 100644
+ return get_string( p_mi, "freetype", textrenderer_option_bynumber(option) );
+}
diff --git a/modules/text_renderer/freetype/freetype.c b/modules/text_renderer/freetype/freetype.c
index b7e4823e38..720870e9e3 100644
index b92c66ceac..fb1469a6ea 100644
--- a/modules/text_renderer/freetype/freetype.c
+++ b/modules/text_renderer/freetype/freetype.c
@@ -943,12 +943,27 @@ static inline int RenderAXYZ( filter_t *p_filter,
@@ -952,12 +952,36 @@ static inline int RenderAXYZ( filter_t *p_filter,
static void UpdateDefaultLiveStyles( filter_t *p_filter )
{
......@@ -199,7 +199,7 @@ index b7e4823e38..720870e9e3 100644
+ p_sys->p_default_style->psz_fontname = strdup( var_InheritString( p_filter, "freetype-font" ) );
- p_style->i_font_color = var_InheritInteger( p_filter, "freetype-color" );
+ int size = 1.0 / var_InheritInteger( p_filter, "freetype-rel-fontsize" );
+ int size = (1.0 / var_InheritInteger( p_filter, "freetype-rel-fontsize" )) * 100;
+ p_sys->p_forced_style->f_font_relsize = size < 0 ? 10 : size;
- p_style->i_background_alpha = var_InheritInteger( p_filter, "freetype-background-opacity" );
......@@ -214,9 +214,18 @@ index b7e4823e38..720870e9e3 100644
+ p_sys->p_forced_style->i_features &= ~STYLE_HAS_FLAGS;
+ }
+ text_style_Merge( p_sys->p_default_style, p_sys->p_forced_style, true );
+
+#ifndef NDEBUG
+ msg_Dbg(p_filter, "%s: def rel font size: %f, rel font size %f, %lli; color %i, font: %s", __func__,
+ p_filter->p_sys->p_default_style->f_font_relsize,
+ p_filter->p_sys->p_forced_style->f_font_relsize,
+ var_InheritInteger( p_filter, "freetype-rel-fontsize" ),
+ p_filter->p_sys->p_default_style->i_font_color,
+ p_filter->p_sys->p_default_style->psz_fontname);
+#endif
}
static void FillDefaultStyles( filter_t *p_filter )
--
2.15.1
2.19.1
From 4579acfee3d2479e1c849c5124f539bbb831262b Mon Sep 17 00:00:00 2001
From f48e06d158c35e5546e76e0bfde719f40b540553 Mon Sep 17 00:00:00 2001
From: Carola Nitz <nitz.carola@googlemail.com>
Date: Fri, 23 Feb 2018 13:16:41 +0100
Subject: [PATCH] Work around lack of __thread storage qualifier on old macOS
Subject: [PATCH 12/21] Work around lack of __thread storage qualifier on old
macOS
---
configure.ac | 4 +--
include/vlc_fixups.h | 7 ++--
configure.ac | 4 +-
include/vlc_fixups.h | 7 +++-
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
{compat => src/extras}/tdestroy.c | 67 +++++++++++++++++++++++----------------
{compat => src/extras}/tdestroy.c | 67 ++++++++++++++++++-------------
5 files changed, 48 insertions(+), 32 deletions(-)
rename {compat => src/extras}/tdestroy.c (59%)
diff --git a/configure.ac b/configure.ac
index 225bcae987..c5d7a41063 100644
index cfdae650b3..603b260a73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -590,8 +590,8 @@ dnl Check for system libs needed
......@@ -21,20 +22,20 @@ index 225bcae987..c5d7a41063 100644
dnl Check for usual libc functions
-AC_CHECK_FUNCS([accept4 daemon fcntl flock fstatvfs fork getenv getpwuid_r isatty lstat memalign mkostemp mmap newlocale open_memstream openat pipe2 pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp strptime uselocale])
-AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd fdopendir ffsll flockfile fsync getdelim getpid lldiv memrchr nrand48 poll recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tdestroy tfind timegm timespec_get strverscmp pathconf])
-AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd fdopendir ffsll flockfile fsync getdelim getpid lfind lldiv memrchr nrand48 poll recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tdestroy tfind timegm timespec_get strverscmp pathconf])
+AC_CHECK_FUNCS([accept4 daemon fcntl flock fstatvfs fork getenv getpwuid_r isatty lstat memalign mkostemp mmap open_memstream openat pipe2 pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp strptime tdestroy uselocale])
+AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd fdopendir ffsll flockfile fsync getdelim getpid lldiv memrchr nrand48 poll recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tfind timegm timespec_get strverscmp pathconf])
+AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd fdopendir ffsll flockfile fsync getdelim getpid lfind lldiv memrchr nrand48 poll recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tfind timegm timespec_get strverscmp pathconf])
AC_REPLACE_FUNCS([gettimeofday])
AC_CHECK_FUNC(fdatasync,,
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 3003a154f6..ba4f6447be 100644
index 6c0de2854b..8e8e406028 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -486,9 +486,12 @@ void *tsearch( const void *key, void **rootp, int(*cmp)(const void *, const void
void *tfind( const void *key, const void **rootp, int(*cmp)(const void *, const void *) );
void *tdelete( const void *key, void **rootp, int(*cmp)(const void *, const void *) );
@@ -490,9 +490,12 @@ void *tdelete( const void *key, void **rootp, int(*cmp)(const void *, const void
void twalk( const void *root, void(*action)(const void *nodep, VISIT which, int depth) );
void *lfind( const void *key, const void *base, size_t *nmemb,
size_t size, int(*cmp)(const void *, const void *) );
-#endif /* HAVE_SEARCH_H */
-#ifndef HAVE_TDESTROY
void tdestroy( void *root, void (*free_node)(void *nodep) );
......@@ -47,7 +48,7 @@ index 3003a154f6..ba4f6447be 100644
/* Random numbers */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index fd35c8935c..cde9849d0c 100644
index 2b4319f140..cb7f3948e9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -68,6 +68,7 @@ src/config/help.c
......@@ -203,5 +204,5 @@ index 6bb3480957..5c54881553 100644
+
+#endif
--
2.14.3 (Apple Git-98)
2.19.1
From ca68f8644cfe31ffa697de49d1406fe6b645b978 Mon Sep 17 00:00:00 2001
From 800d701b0339f6f10f58f0f71fb828c93fe1d4a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Mon, 26 Mar 2018 16:44:44 +0200
Subject: [PATCH] modules:common: Use the full module name as MODULE_NAME
Subject: [PATCH 13/21] modules:common: Use the full module name as MODULE_NAME
This avoid conflicts when linking modules staticly on platforms that don't
have objdump
......@@ -29,5 +29,5 @@ index 1b9117c98d..fc67a39bca 100644
AM_CFLAGS =
AM_CXXFLAGS =
--
2.15.1 (Apple Git-101)
2.19.1
From bde8deaef81276f53e6c0680747ed1f25b564139 Mon Sep 17 00:00:00 2001
From: Luis Fernandes <zipleen@gmail.com>
Date: Mon, 30 Apr 2018 14:33:08 +0100
Subject: [PATCH 14/21] add auto deinterlacer-mode which is also valid
---
lib/video.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/video.c b/lib/video.c
index 035cc0ebf1..a3e5b248e9 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -675,7 +675,8 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,
&& strcmp (psz_mode, "discard") && strcmp (psz_mode, "linear")
&& strcmp (psz_mode, "mean") && strcmp (psz_mode, "x")
&& strcmp (psz_mode, "yadif") && strcmp (psz_mode, "yadif2x")
- && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc"))
+ && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc")
+ && strcmp (psz_mode, "auto"))
return;
if (*psz_mode)
--
2.19.1
From 4ae5821be54655e3a029ef1b5bc0e3bc03085ee6 Mon Sep 17 00:00:00 2001
From: Luis Fernandes <zipleen@gmail.com>
Date: Mon, 30 Apr 2018 14:33:08 +0100
Subject: [PATCH 1/2] add auto deinterlacer-mode which is also valid
---
lib/video.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/video.c b/lib/video.c
index 035cc0ebf1..a3e5b248e9 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -675,7 +675,8 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,
&& strcmp (psz_mode, "discard") && strcmp (psz_mode, "linear")
&& strcmp (psz_mode, "mean") && strcmp (psz_mode, "x")
&& strcmp (psz_mode, "yadif") && strcmp (psz_mode, "yadif2x")
- && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc"))
+ && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc")
+ && strcmp (psz_mode, "auto"))
return;
if (*psz_mode)
--
2.15.1 (Apple Git-101)
From bc236ea6a0c7c057883f2251d331cecdd40d6ec7 Mon Sep 17 00:00:00 2001
From d787329479948bbb4e08ccb6ea9fb1363ead5808 Mon Sep 17 00:00:00 2001
From: Luis Fernandes <zipleen@gmail.com>
Date: Wed, 9 May 2018 10:44:43 +0100
Subject: [PATCH 2/2] Users will be able to change the deinterlace mode without
forcing it.
Subject: [PATCH 15/21] Users will be able to change the deinterlace mode
without forcing it.
---
include/vlc/libvlc_media_player.h | 5 ++++-
......@@ -52,7 +25,7 @@ index 20b220448b..cbb5ec251a 100644
LIBVLC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,
+ int deinterlace,
const char *psz_mode );
/**
diff --git a/lib/video.c b/lib/video.c
index a3e5b248e9..9bc0f634f5 100644
......@@ -60,7 +33,7 @@ index a3e5b248e9..9bc0f634f5 100644
+++ b/lib/video.c
@@ -663,14 +663,15 @@ end:
}
/******************************************************************************
- * libvlc_video_set_deinterlace : enable deinterlace
+ * libvlc_video_set_deinterlace : enable/disable/auto deinterlace and filter
......@@ -82,7 +55,7 @@ index a3e5b248e9..9bc0f634f5 100644
@@ -679,13 +680,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,
&& strcmp (psz_mode, "auto"))
return;
- if (*psz_mode)
- {
+ if (psz_mode && deinterlace != 0)
......@@ -93,13 +66,13 @@ index a3e5b248e9..9bc0f634f5 100644
- var_SetInteger (p_mi, "deinterlace", 0);
+
+ var_SetInteger (p_mi, "deinterlace", deinterlace);
size_t n;
vout_thread_t **pp_vouts = GetVouts (p_mi, &n);
@@ -693,13 +691,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,
{
vout_thread_t *p_vout = pp_vouts[i];
- if (*psz_mode)
- {
+ if (psz_mode && deinterlace != 0)
......@@ -113,6 +86,6 @@ index a3e5b248e9..9bc0f634f5 100644
vlc_object_release (p_vout);
}
free (pp_vouts);
--
2.15.1 (Apple Git-101)
--
2.19.1
From 939e1151740e3abb060a0afeac620a22a0cd70ef Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Tue, 27 Mar 2018 16:49:34 +0200
Subject: [PATCH 16/21] contrib: ffmpeg: enable videotoolbox encoder
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
No problem for decoders since it won't be used.
(cherry picked from commit 1003d6aa220d18088d2d6d2949dc117b622f85e3)
Signed-off-by: Felix Paul Kühne <felix@feepk.net>
---
contrib/src/ffmpeg/rules.mak | 1 -
1 file changed, 1 deletion(-)
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index 4d2d716146..7a3b678370 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -50,7 +50,6 @@ FFMPEGCONF += \
--disable-linux-perf
ifdef HAVE_DARWIN_OS
FFMPEGCONF += \
- --disable-videotoolbox \
--disable-securetransport
endif
endif
--
2.19.1
From a42d5d27f29f6239ee6a874b9a07e675e98fbfa8 Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Tue, 27 Mar 2018 16:52:35 +0200
Subject: [PATCH 17/21] chromecast: use vt encoder from avcodec
---
modules/stream_out/chromecast/cast.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 53227c258b..60edf28e82 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -954,12 +954,25 @@ static std::string GetVencX264Option( sout_stream_t * /* p_stream */,
return ssout.str();
}
+#ifdef __APPLE__
+static std::string GetVencAvcodecVTOption( sout_stream_t * /* p_stream */,
+ const video_format_t * p_vid,
+ int i_quality )
+{
+ std::stringstream ssout;
+ ssout << "venc=avcodec{codec=h264_videotoolbox,options{realtime=1}}";
+ return ssout.str();
+}
+#endif
static struct
{
vlc_fourcc_t fcc;
std::string (*get_opt)( sout_stream_t *, const video_format_t *, int);
} venc_opt_list[] = {
+#ifdef __APPLE__
+ { .fcc = VLC_CODEC_H264, .get_opt = GetVencAvcodecVTOption },
+#endif
{ .fcc = VLC_CODEC_H264, .get_opt = GetVencX264Option },
{ .fcc = VLC_CODEC_VP8, .get_opt = GetVencVPXOption },
{ .fcc = VLC_CODEC_H264, .get_opt = NULL },
--
2.19.1
From b7ac55bfbc294676bd6ae343a80269f104b4b8d0 Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Mon, 18 Jun 2018 12:31:13 +0200
Subject: [PATCH 18/21] ffmpeg: backport vtenc patches
---
...lboxenc-fix-mutex-cond-leak-in-error.patch | 35 ++++++
...videotoolboxenc-split-initialization.patch | 112 ++++++++++++++++++
...oolboxenc-fix-invalid-session-on-iOS.patch | 48 ++++++++
...lboxenc-fix-undefined-behavior-with-.patch | 105 ++++++++++++++++
contrib/src/ffmpeg/rules.mak | 4 +
5 files changed, 304 insertions(+)
create mode 100644 contrib/src/ffmpeg/0001-avcodec-videotoolboxenc-fix-mutex-cond-leak-in-error.patch
create mode 100644 contrib/src/ffmpeg/0002-avcodec-videotoolboxenc-split-initialization.patch
create mode 100644 contrib/src/ffmpeg/0003-avcodec-videotoolboxenc-fix-invalid-session-on-iOS.patch
create mode 100644 contrib/src/ffmpeg/0004-avcodec-videotoolboxenc-fix-undefined-behavior-with-.patch
diff --git a/contrib/src/ffmpeg/0001-avcodec-videotoolboxenc-fix-mutex-cond-leak-in-error.patch b/contrib/src/ffmpeg/0001-avcodec-videotoolboxenc-fix-mutex-cond-leak-in-error.patch
new file mode 100644
index 0000000000..679bd70da3
--- /dev/null
+++ b/contrib/src/ffmpeg/0001-avcodec-videotoolboxenc-fix-mutex-cond-leak-in-error.patch
@@ -0,0 +1,35 @@
+From dea72b148a1250808c625dda0077e43d11689845 Mon Sep 17 00:00:00 2001
+From: Thomas Guillem <thomas@gllm.fr>
+Date: Tue, 29 May 2018 18:04:38 +0200
+Subject: [PATCH 1/4] avcodec/videotoolboxenc: fix mutex/cond leak in error
+ path
+
+The leak could happen when the vtenc_create_encoder() function failed.
+---
+ libavcodec/videotoolboxenc.c | 5 +++--