aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
Diffstat (limited to 'community')
-rw-r--r--community/vlc/0001-configure-test-for-getaddrinfo_a-and-libanl.patch63
-rw-r--r--community/vlc/APKBUILD44
-rw-r--r--community/vlc/fix-waitpid-usage.patch61
-rw-r--r--community/vlc/vlc-2.2.4-ffmpeg3-1.patch193
-rw-r--r--community/vlc/vlc-2.2.4-gcc6_fixes-1.patch395
5 files changed, 82 insertions, 674 deletions
diff --git a/community/vlc/0001-configure-test-for-getaddrinfo_a-and-libanl.patch b/community/vlc/0001-configure-test-for-getaddrinfo_a-and-libanl.patch
new file mode 100644
index 0000000000..0a4c267a8a
--- /dev/null
+++ b/community/vlc/0001-configure-test-for-getaddrinfo_a-and-libanl.patch
@@ -0,0 +1,63 @@
+From 1165e150d5867c3bbcae559c0d09076000b8cf9d Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 20 Dec 2017 12:00:57 +0000
+Subject: [PATCH] configure: test for getaddrinfo_a and libanl
+
+Test for the existence of the GNU extension getaddrinf_a and libanl
+instead of assuming that every Linux has it. Fall back to posix variant
+if they are missing.
+
+This fixes build with musl libc which does not implement this GNU
+extension.
+
+Fixes #19320
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ configure.ac | 5 +++++
+ src/Makefile.am | 5 ++++-
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index acbee6c0b1..d3d9e20105 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -330,6 +330,7 @@ AM_CONDITIONAL(HAVE_OSX, test "${HAVE_OSX}" = "1")
+ AM_CONDITIONAL(HAVE_TVOS, test "${HAVE_TVOS}" = "1")
+
+ AM_CONDITIONAL(HAVE_NACL, test "${SYS}" = "nacl")
++AM_CONDITIONAL(HAVE_LIBANL, test "${HAVE_LIBANL}" = "1")
+
+ AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
+ AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1") dnl Only used for the packaging
+@@ -759,6 +760,10 @@ dnl __STDC_NO_THREADS__ can't be trusted on some platforms.
+ dnl check for its availability explicitely
+ AC_CHECK_HEADERS([threads.h])
+
++AC_CHECK_LIB([anl],[getaddrinfo_a],[
++ AC_DEFINE(HAVE_LIBANL, 1, [Define to 1 if you have the anl library])
++])
++
+ dnl Check for dynamic plugins
+ LIBDL=""
+ have_dynamic_objects="no"
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 096dfc2a24..b77ddf4132 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -429,8 +429,11 @@ if HAVE_LINUX
+ libvlccore_la_SOURCES += \
+ linux/cpu.c \
+ linux/dirs.c \
+- linux/getaddrinfo.c \
+ linux/thread.c
++endif
++if HAVE_LIBANL
++libvlccore_la_SOURCES += \
++ linux/getaddrinfo.c
+ libvlccore_la_LIBADD += -lanl
+ else
+ libvlccore_la_SOURCES += \
+--
+2.15.0
+
diff --git a/community/vlc/APKBUILD b/community/vlc/APKBUILD
index afa50ab082..ced7e70a73 100644
--- a/community/vlc/APKBUILD
+++ b/community/vlc/APKBUILD
@@ -2,7 +2,7 @@
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vlc
-pkgver=2.2.8
+pkgver=3.0.0_rc2
_pkgver=${pkgver/_/-}
_ver=${_pkgver%[a-z]}
pkgrel=0
@@ -10,7 +10,7 @@ pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
triggers="vlc-libs.trigger=/usr/lib/vlc/plugins"
pkgusers="vlc"
pkggroups="vlc"
-url="http://www.videolan.org/vlc/"
+url="https://www.videolan.org/vlc/"
arch="all"
license="GPL2+"
options="!checkroot"
@@ -52,14 +52,16 @@ makedepends="
automake
autoconf
avahi-dev
+ bison
libtool
dbus-dev
faad2-dev
ffmpeg-dev
flac-dev
+ flex
freetype-dev
fribidi-dev
- gtk+-dev
+ gtk+3.0-dev
libbluray-dev>=0.2.1 libbluray-dev<20100000
libavc1394-dev
libcddb-dev
@@ -75,12 +77,14 @@ makedepends="
libnotify-dev
libogg-dev
libraw1394-dev>=2.0.1
+ librsvg-dev
libshout-dev
libsm-dev
libtheora-dev
libva-dev
libvdpau-dev
libvorbis-dev
+ libvpx-dev
libx11-dev
libxext-dev
libxinerama-dev
@@ -89,26 +93,29 @@ makedepends="
libxv-dev
live-media-dev>=2012.01.26
lua5.2-dev
- ncurses-dev
mesa-dev
+ ncurses-dev
+ opus-dev
pkgconfig
qt5-qtbase-dev
+ qt5-qtsvg-dev
sdl2-dev
speex-dev
+ speexdsp-dev
sysfsutils-dev
taglib-dev
eudev-dev
v4l-utils-dev
+ wayland-protocols
x264-dev
+ x265-dev
xcb-util-renderutil-dev
xcb-util-keysyms-dev
xdg-utils
samba-dev
"
-source="http://download.videolan.org/pub/videolan/$pkgname/${_ver}/$pkgname-$_pkgver.tar.xz
- vlc-2.2.4-gcc6_fixes-1.patch
- vlc-2.2.4-ffmpeg3-1.patch
- fix-waitpid-usage.patch
+source="http://download.videolan.org/pub/videolan/testing/vlc-$_ver/vlc-$_ver.tar.xz
+ 0001-configure-test-for-getaddrinfo_a-and-libanl.patch
omxil-rpi-codecs.patch
check-headless.patch
vlc-libs.trigger"
@@ -116,24 +123,14 @@ source="http://download.videolan.org/pub/videolan/$pkgname/${_ver}/$pkgname-$_pk
builddir="$srcdir"/$pkgname-$_ver
prepare() {
- cd "$builddir"
default_prepare
- sed -i -e "/^libxscreensaver_plugin_la_SOURCES/s/^/#/" \
- modules/misc/Modules.am || return 1
- NOCONFIGURE=1 ./bootstrap || return 1
+ NOCONFIGURE=1 ./bootstrap
}
build() {
local _arch_opts=
- export CXXFLAGS="$CXXFLAGS -std=gnu++11"
cd "$builddir"
- sed -e 's:/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf:/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf:' \
- -i modules/text_renderer/freetype.c
-
- # -fpermissive is needed due to zlib 1.2.6 changing
- # void* to gzFile on gz*() functions
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
- export CXXFLAGS="$CXXFLAGS -fpermissive"
case "$CARCH" in
arm*) _arch_opts="--enable-omxil --enable-omxil-vout --enable-rpi-omxil" ;;
@@ -141,6 +138,7 @@ build() {
LUA=lua5.2 \
LUAC=luac5.2 \
+ BUILDCC="${CC:-gcc} -std=c99" \
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -161,14 +159,12 @@ build() {
--enable-dvdnav \
--enable-faad \
--enable-flac \
- --enable-httpd \
--enable-libcddb \
--enable-libva \
--enable-live555 \
--enable-merge-ffmpeg \
--enable-ncurses \
--enable-realrtsp \
- --enable-sdl \
--enable-shout \
--enable-skins2 \
--enable-speex \
@@ -333,10 +329,8 @@ plugins_video_filter() { _mv_plugins video_filter; }
plugins_video_output() { _mv_plugins video_output; }
plugins_visualization() { _mv_plugins visualization; }
-sha512sums="adde16f4b4bd2d94f104bb3b99995df6bf4603bc67333c7615cb8d1d31ca63440b6b0aa93de9ccf0dba717cf905577c7d0bca7baba63caf401790b82eac3e04a vlc-2.2.8.tar.xz
-0dffb15a320899060d2239d4bbefd7e88bedcd017348227092ed943b1104e971a5da934f0c1569773230186d4727be83f530cc0d253559a04d1f2cdef80e6043 vlc-2.2.4-gcc6_fixes-1.patch
-3ac37f5d552b3f4a536ead974756ea39142bb1aebbb5fa4fd41917e3dabb5af333dea5ae028bdae8589ff3016f2d1d87ea328e63d8b795ac90c3eb11945ea87b vlc-2.2.4-ffmpeg3-1.patch
-680cfa3eed5501ba6f06c51eae508204f4c77d2bdd07eead1a3da3939b433abfe84025d133e7a1c7a869e4ffac374bd5eba2bd3dd242ec4645e1d1c6122d0ffb fix-waitpid-usage.patch
+sha512sums="20b28f73938fbb1c946d72c56b1b5a53a747a866057f0b0085749e21e6b6be86f24a6d8681051e4bba5e40728595fd766816f0c22fc56fe444bcd3d25b972003 vlc-3.0.0-rc2.tar.xz
+64a46f6f0256d499492742a7662453a8491b2676c9a09fd6f898ce57e6cdeb7f8932d739ede1fc938ed7be4f5f8a3295a3be71f49c412a50f9a5c2d388cad81b 0001-configure-test-for-getaddrinfo_a-and-libanl.patch
e13e398b7bfd977f6e099bcb6cf8dc5cd5bad6dea3eff715881826246dc4329468846084aff2576de2b7fd28d3f06e7c327a6e4511a28d22e5cd198a81146c89 omxil-rpi-codecs.patch
22d80df599b8b65a5439cefbb7140af8e9530f326d54945da3769af65f37518b99ec2cc8647aafd2763324a0698280915afe043cc87e5720c4694881ed35bffa check-headless.patch
b67b6e21e9d4027aef1006e6057f9ba8e65ce3895b08f7b911b1675cff9bc423f64ee2c187c584860e9e5d4635a30408a7781add9694d9bba753eac37f357406 vlc-libs.trigger"
diff --git a/community/vlc/fix-waitpid-usage.patch b/community/vlc/fix-waitpid-usage.patch
deleted file mode 100644
index dc64a4f3e1..0000000000
--- a/community/vlc/fix-waitpid-usage.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-diff -ru vlc-2.2.0.orig/modules/misc/inhibit/xdg.c vlc-2.2.0/modules/misc/inhibit/xdg.c
---- vlc-2.2.0.orig/modules/misc/inhibit/xdg.c 2015-02-28 08:48:24.264968381 -0200
-+++ vlc-2.2.0/modules/misc/inhibit/xdg.c 2015-02-28 08:48:43.081636013 -0200
-@@ -26,6 +26,7 @@
- #include <vlc_plugin.h>
- #include <vlc_inhibit.h>
- #include <assert.h>
-+#include <errno.h>
- #include <signal.h>
- #include <spawn.h>
- #include <sys/wait.h>
-@@ -65,7 +66,7 @@
- {
- int status;
-
-- while (waitpid (pid, &status, 0) == -1);
-+ while (waitpid (pid, &status, 0) == -1 && errno != ECHILD);
- }
- else
- msg_Warn (ih, "error starting xdg-screensaver: %s",
-diff -ru vlc-2.2.0.orig/modules/stream_filter/decomp.c vlc-2.2.0/modules/stream_filter/decomp.c
---- vlc-2.2.0.orig/modules/stream_filter/decomp.c 2015-02-28 08:48:24.264968381 -0200
-+++ vlc-2.2.0/modules/stream_filter/decomp.c 2015-02-28 08:40:58.824945520 -0200
-@@ -404,7 +404,7 @@
- return VLC_SUCCESS;
-
- if (p_sys->pid != -1)
-- while (waitpid (p_sys->pid, &(int){ 0 }, 0) == -1);
-+ while (waitpid (p_sys->pid, &(int){ 0 }, 0) == -1 && errno != ECHILD);
- vlc_mutex_destroy (&p_sys->lock);
- vlc_cond_destroy (&p_sys->wait);
- free (p_sys);
-@@ -429,7 +429,7 @@
- close (p_sys->write_fd);
-
- msg_Dbg (obj, "waiting for PID %u", (unsigned)p_sys->pid);
-- while (waitpid (p_sys->pid, &status, 0) == -1);
-+ while (waitpid (p_sys->pid, &status, 0) == -1 && errno != ECHILD);
- msg_Dbg (obj, "exit status %d", status);
-
- if (p_sys->peeked)
-diff -ru vlc-2.2.0.orig/src/posix/netconf.c vlc-2.2.0/src/posix/netconf.c
---- vlc-2.2.0.orig/src/posix/netconf.c 2015-02-28 08:48:24.264968381 -0200
-+++ vlc-2.2.0/src/posix/netconf.c 2015-02-28 08:40:58.824945520 -0200
-@@ -28,6 +28,7 @@
-
- #include <sys/types.h>
- #include <sys/wait.h>
-+#include <errno.h>
- #include <fcntl.h>
- #include <spawn.h>
- #include <unistd.h>
-@@ -94,7 +95,7 @@
- while (len < sizeof (buf));
-
- close(fd[0]);
-- while (waitpid(pid, &(int){ 0 }, 0) == -1);
-+ while (waitpid(pid, &(int){ 0 }, 0) == -1 && errno != ECHILD);
-
- if (len >= 9 && !strncasecmp(buf, "direct://", 9))
- return NULL;
diff --git a/community/vlc/vlc-2.2.4-ffmpeg3-1.patch b/community/vlc/vlc-2.2.4-ffmpeg3-1.patch
deleted file mode 100644
index 62e93676b4..0000000000
--- a/community/vlc/vlc-2.2.4-ffmpeg3-1.patch
+++ /dev/null
@@ -1,193 +0,0 @@
-Fixed by @Vaelatern to modify configure.am instead of configure,
- and to use -p0 instead of -p1
-http://www.linuxfromscratch.org/patches/blfs/svn/vlc-2.2.4-ffmpeg3-1.patch
-Submitted By: Armin K <krejzi au email do com>
-Date: 2016-05-06
-Initial Package Version: 2.2.3
-Upstream Status: Committed
-Origin: Upstream
-Description: Fixes building against ffmpeg3
- Rediffed for version 2.2.3 by Bruce Dubbs
-
-diff -Naur configure configure
---- a/configure.ac 2016-09-21 17:28:06.168721882 -0400
-+++ b/configure.ac 2016-09-21 17:30:16.529223098 -0400
-@@ -2323,8 +2323,8 @@
- [ --enable-avcodec libavcodec codec (default enabled)])
- AS_IF([test "${enable_avcodec}" != "no"], [
- PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0], [
-- PKG_CHECK_EXISTS([libavutil < 55],, [
-- AC_MSG_ERROR([libavutil versions 55 and later are not supported.])
-+ PKG_CHECK_EXISTS([libavutil > 55],, [
-+ AC_MSG_ERROR([libavutil versions 55 and before are not supported.])
- ])
- VLC_SAVE_FLAGS
- CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
-@@ -2382,8 +2382,8 @@
- AS_IF([test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"], [
- case "${avfork}" in
- ffmpeg)
-- PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
-- AC_MSG_ERROR([VA API requires FFmpeg libavcodec < 57.10 or libav.])
-+ PKG_CHECK_EXISTS([libavcodec <= 57.10.100], [
-+ AC_MSG_ERROR([VA API requires FFmpeg libavcodec > 57.10 or libav.])
- ])
- ;;
- esac
-@@ -2416,8 +2416,8 @@
- AS_IF([test "x${have_avcodec}" = "xyes"], [
- case "${avfork}" in
- ffmpeg)
-- PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
-- AC_MSG_ERROR([DXVA2 requires FFmpeg libavcodec < 57.10 or libav.])
-+ PKG_CHECK_EXISTS([libavcodec <= 57.10.100], [
-+ AC_MSG_ERROR([DXVA2 requires FFmpeg libavcodec > 57.10 or libav.])
- ])
- ;;
- esac
-@@ -3180,7 +3180,7 @@
- case "${avfork}" in
- libav) av_vdpau_ver="55.26.0" ;;
- ffmpeg) av_vdpau_ver="55.42.100"
-- PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
-+ PKG_CHECK_EXISTS([libavcodec <= 57.10.100], [
- AC_MSG_ERROR([VDPAU requires FFmpeg libavcodec < 57.10 or libav.])
- ])
- ;;
-
---- a/modules/codec/avcodec/audio.c 2015-12-08 10:18:56.000000000 -0600
-+++ b/modules/codec/avcodec/audio.c 2016-05-06 22:39:24.859030920 -0500
-@@ -36,12 +36,11 @@
- #include <vlc_codec.h>
- #include <vlc_avcodec.h>
-
-+#include "avcodec.h"
-+
- #include <libavcodec/avcodec.h>
- #include <libavutil/mem.h>
-
--#include <libavutil/audioconvert.h>
--
--#include "avcodec.h"
-
- /*****************************************************************************
- * decoder_sys_t : decoder descriptor
-diff -Naur modules/codec/avcodec/avcommon_compat.h modules/codec/avcodec/avcommon_compat.h
---- a/modules/codec/avcodec/avcommon_compat.h 2015-03-01 08:07:35.000000000 -0600
-+++ b/modules/codec/avcodec/avcommon_compat.h 2016-05-06 22:39:24.859030920 -0500
-@@ -506,6 +506,15 @@
-
- #endif /* HAVE_LIBAVUTIL_AVUTIL_H */
-
-+#if LIBAVUTIL_VERSION_MAJOR >= 55
-+# define FF_API_AUDIOCONVERT 1
-+#endif
-+
-+/* libavutil/pixfmt.h */
-+#ifndef PixelFormat
-+# define PixelFormat AVPixelFormat
-+#endif
-+
- #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
- # include <libavformat/avformat.h>
-
-diff -Naur modules/codec/avcodec/encoder.c modules/codec/avcodec/encoder.c
---- a/modules/codec/avcodec/encoder.c 2015-10-21 11:36:45.000000000 -0500
-+++ b/modules/codec/avcodec/encoder.c 2016-05-06 22:39:24.860030887 -0500
-@@ -41,7 +41,6 @@
- #include <vlc_cpu.h>
-
- #include <libavcodec/avcodec.h>
--#include <libavutil/audioconvert.h>
-
- #include "avcodec.h"
- #include "avcommon.h"
-@@ -311,7 +310,7 @@
- else if( !GetFfmpegCodec( p_enc->fmt_out.i_codec, &i_cat, &i_codec_id,
- &psz_namecodec ) )
- {
-- if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == PIX_FMT_NONE )
-+ if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == AV_PIX_FMT_NONE )
- return VLC_EGENERIC; /* handed chroma output */
-
- i_cat = VIDEO_ES;
-@@ -1017,7 +1016,7 @@
- }
- }
-
-- p_sys->frame = avcodec_alloc_frame();
-+ p_sys->frame = av_frame_alloc();
- if( !p_sys->frame )
- {
- goto error;
-@@ -1088,7 +1087,8 @@
- AVFrame *frame = NULL;
- if( likely(p_pict) ) {
- frame = p_sys->frame;
-- avcodec_get_frame_defaults( frame );
-+ av_frame_unref( frame );
-+
- for( i_plane = 0; i_plane < p_pict->i_planes; i_plane++ )
- {
- p_sys->frame->data[i_plane] = p_pict->p[i_plane].p_pixels;
-@@ -1329,7 +1329,7 @@
- //How much we need to copy from new packet
- const int leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes;
-
-- avcodec_get_frame_defaults( p_sys->frame );
-+ av_frame_unref( p_sys->frame );
- p_sys->frame->format = p_sys->p_context->sample_fmt;
- p_sys->frame->nb_samples = leftover_samples + p_sys->i_samples_delay;
-
-@@ -1451,7 +1451,8 @@
- while( ( p_aout_buf->i_nb_samples >= p_sys->i_frame_size ) ||
- ( p_sys->b_variable && p_aout_buf->i_nb_samples ) )
- {
-- avcodec_get_frame_defaults( p_sys->frame );
-+ av_frame_unref( p_sys->frame );
-+
- if( p_sys->b_variable )
- p_sys->frame->nb_samples = p_aout_buf->i_nb_samples;
- else
-diff -Naur modules/codec/avcodec/vaapi.c modules/codec/avcodec/vaapi.c
---- a/modules/codec/avcodec/vaapi.c 2014-11-16 12:57:58.000000000 -0600
-+++ b/modules/codec/avcodec/vaapi.c 2016-05-06 22:39:24.860030887 -0500
-@@ -595,7 +595,7 @@
- return err;
-
- /* Only VLD supported */
-- p_va->pix_fmt = PIX_FMT_VAAPI_VLD;
-+ p_va->pix_fmt = AV_PIX_FMT_VAAPI_VLD;
- p_va->setup = Setup;
- p_va->get = Get;
- p_va->release = Release;
-diff -Naur modules/codec/avcodec/video.c modules/codec/avcodec/video.c
---- a/modules/codec/avcodec/video.c 2016-04-04 19:45:24.000000000 -0500
-+++ b/modules/codec/avcodec/video.c 2016-05-06 22:39:24.860030887 -0500
-@@ -234,7 +234,7 @@
- p_sys->p_codec = p_codec;
- p_sys->i_codec_id = i_codec_id;
- p_sys->psz_namecodec = psz_namecodec;
-- p_sys->p_ff_pic = avcodec_alloc_frame();
-+ p_sys->p_ff_pic = av_frame_alloc();
- p_sys->b_delayed_open = true;
- p_sys->p_va = NULL;
- vlc_sem_init( &p_sys->sem_mt, 0 );
-@@ -446,7 +446,7 @@
- if( ffmpeg_OpenCodec( p_dec ) < 0 )
- {
- msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec );
-- avcodec_free_frame( &p_sys->p_ff_pic );
-+ av_frame_free( &p_sys->p_ff_pic );
- vlc_sem_destroy( &p_sys->sem_mt );
- free( p_sys );
- return VLC_EGENERIC;
-@@ -826,7 +826,7 @@
- wait_mt( p_sys );
-
- if( p_sys->p_ff_pic )
-- avcodec_free_frame( &p_sys->p_ff_pic );
-+ av_frame_free( &p_sys->p_ff_pic );
-
- if( p_sys->p_va )
- vlc_va_Delete( p_sys->p_va );
diff --git a/community/vlc/vlc-2.2.4-gcc6_fixes-1.patch b/community/vlc/vlc-2.2.4-gcc6_fixes-1.patch
deleted file mode 100644
index 68229a0963..0000000000
--- a/community/vlc/vlc-2.2.4-gcc6_fixes-1.patch
+++ /dev/null
@@ -1,395 +0,0 @@
-Submitted By: Bruce dubbs <bdubbs at gmail dot com>
-Date: 2016-07-27
-Initial Package Version: 2.2.7
-Upstream Status: Unknown
-Origin: https://build.opensuse.org/package/view_file/openSUSE:Factory/vlc/vlc-gcc6-buildfixes.patch
-Description: Fixes building against gcc6
-
---- vlc-2.2.3.orig/include/vlc_atomic.h
-+++ vlc-2.2.3/include/vlc_atomic.h
-@@ -26,13 +26,20 @@
- * Atomic operations do not require locking, but they are not very powerful.
- */
-
--# if !defined (__cplusplus) && (__STDC_VERSION__ >= 201112L) \
-- && !defined (__STDC_NO_ATOMICS__)
-+/* Clang older versions support atomics but lacks the stdatomic.h header */
-+#if defined(__clang__)
-+# if !defined(__has_include) || !__has_include(<stdatomic.h>)
-+# define __STDC_NO_ATOMICS__ 1
-+# endif
-+#endif
-
-+# ifndef __cplusplus
-+# if (__STDC_VERSION__ >= 201112L) && !defined (__STDC_NO_ATOMICS__)
- /*** Native C11 atomics ***/
--# include <stdatomic.h>
-+# include <stdatomic.h>
-
--# else
-+# else
-+/*** Intel/GCC atomics ***/
-
- # define ATOMIC_FLAG_INIT false
-
-@@ -53,22 +60,6 @@
- # define atomic_is_lock_free(obj) \
- false
-
--/* In principles, __sync_*() only supports int, long and long long and their
-- * unsigned equivalents, i.e. 4-bytes and 8-bytes types, although GCC also
-- * supports 1 and 2-bytes types. Some non-x86 architectures do not support
-- * 8-byte atomic types (or not efficiently). */
--# if defined (_MSC_VER)
--/* Some atomic operations of the Interlocked API are only
-- available for desktop apps. Thus we define the atomic types to
-- be at least 32 bits wide. */
--typedef int_least32_t atomic_flag;
--typedef int_least32_t atomic_bool;
--typedef int_least32_t atomic_char;
--typedef int_least32_t atomic_schar;
--typedef uint_least32_t atomic_uchar;
--typedef int_least32_t atomic_short;
--typedef uint_least32_t atomic_ushort;
--# else
- typedef bool atomic_flag;
- typedef bool atomic_bool;
- typedef char atomic_char;
-@@ -76,7 +67,6 @@ typedef signed char atomic_schar;
- typedef unsigned char atomic_uchar;
- typedef short atomic_short;
- typedef unsigned short atomic_ushort;
--# endif
- typedef int atomic_int;
- typedef unsigned int atomic_uint;
- typedef long atomic_long;
-@@ -109,10 +99,6 @@ typedef ptrdiff_t atomic_ptrdiff
- typedef intmax_t atomic_intmax_t;
- typedef uintmax_t atomic_uintmax_t;
-
--# if defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) || (defined (__clang__) && (defined (__x86_64__) || defined (__i386__)))
--
--/*** Intel/GCC atomics ***/
--
- # define atomic_store(object,desired) \
- do { \
- *(object) = (desired); \
-@@ -203,204 +189,7 @@ typedef uintmax_t atomic_uintmax
- # define atomic_flag_clear_explicit(object,order) \
- atomic_flag_clear(object)
-
--# elif defined (__GNUC__)
--
--/*** No atomics ***/
--
--# define atomic_store(object,desired) \
-- do { \
-- typeof (object) _obj = (object); \
-- typeof (*object) _des = (desired); \
-- vlc_global_lock(VLC_ATOMIC_MUTEX); \
-- *_obj = _des; \
-- vlc_global_unlock(VLC_ATOMIC_MUTEX); \
-- } while (0)
--# define atomic_store_explicit(object,desired,order) \
-- atomic_store(object,desired)
--
--# define atomic_load(object) \
--({ \
-- typeof (object) _obj = (object); \
-- typeof (*object) _old; \
-- vlc_global_lock(VLC_ATOMIC_MUTEX); \
-- _old = *_obj; \
-- vlc_global_unlock(VLC_ATOMIC_MUTEX); \
-- _old; \
--})
--# define atomic_load_explicit(object,order) \
-- atomic_load(object)
--
--# define atomic_exchange(object,desired) \
--({ \
-- typeof (object) _obj = (object); \
-- typeof (*object) _des = (desired); \
-- typeof (*object) _old; \
-- vlc_global_lock(VLC_ATOMIC_MUTEX); \
-- _old = *_obj; \
-- *_obj = _des; \
-- vlc_global_unlock(VLC_ATOMIC_MUTEX); \
-- _old; \
--})
--# define atomic_exchange_explicit(object,desired,order) \
-- atomic_exchange(object,desired)
--
--# define atomic_compare_exchange_strong(object,expected,desired) \
--({ \
-- typeof (object) _obj = (object); \
-- typeof (object) _exp = (expected); \
-- typeof (*object) _des = (desired); \
-- bool ret; \
-- vlc_global_lock(VLC_ATOMIC_MUTEX); \
-- ret = *_obj == *_exp; \
-- if (ret) \
-- *_obj = _des; \
-- else \
-- *_exp = *_obj; \
-- vlc_global_unlock(VLC_ATOMIC_MUTEX); \
-- ret; \
--})
--# define atomic_compare_exchange_strong_explicit(object,expected,desired,order) \
-- atomic_compare_exchange_strong(object, expected, desired)
--# define atomic_compare_exchange_weak(object,expected,desired) \
-- atomic_compare_exchange_strong(object, expected, desired)
--# define atomic_compare_exchange_weak_explicit(object,expected,desired,order) \
-- atomic_compare_exchange_weak(object, expected, desired)
--
--# define atomic_fetch_OP(object,desired,op) \
--({ \
-- typeof (object) _obj = (object); \
-- typeof (*object) _des = (desired); \
-- typeof (*object) _old; \
-- vlc_global_lock(VLC_ATOMIC_MUTEX); \
-- _old = *_obj; \
-- *_obj = (*_obj) op (_des); \
-- vlc_global_unlock(VLC_ATOMIC_MUTEX); \
-- _old; \
--})
--
--# define atomic_fetch_add(object,operand) \
-- atomic_fetch_OP(object,operand,+)
--# define atomic_fetch_add_explicit(object,operand,order) \
-- atomic_fetch_add(object,operand)
--
--# define atomic_fetch_sub(object,operand) \
-- atomic_fetch_OP(object,operand,-)
--# define atomic_fetch_sub_explicit(object,operand,order) \
-- atomic_fetch_sub(object,operand)
--
--# define atomic_fetch_or(object,operand) \
-- atomic_fetch_OP(object,operand,|)
--# define atomic_fetch_or_explicit(object,operand,order) \
-- atomic_fetch_or(object,operand)
--
--# define atomic_fetch_xor(object,operand) \
-- atomic_fetch_OP(object,operand,^)
--# define atomic_fetch_xor_explicit(object,operand,order) \
-- atomic_fetch_sub(object,operand)
--
--# define atomic_fetch_and(object,operand) \
-- atomic_fetch_OP(object,operand,&)
--# define atomic_fetch_and_explicit(object,operand,order) \
-- atomic_fetch_and(object,operand)
--
--# define atomic_flag_test_and_set(object) \
-- atomic_exchange(object, true)
--
--# define atomic_flag_test_and_set_explicit(object,order) \
-- atomic_flag_test_and_set(object)
--
--# define atomic_flag_clear(object) \
-- atomic_store(object, false)
--
--# define atomic_flag_clear_explicit(object,order) \
-- atomic_flag_clear(object)
--
--# elif defined (_MSC_VER)
--
--# include <windows.h>
--
--/*** Use the Interlocked API. ***/
--
--/* Define macros in order to dispatch to the correct function depending on the type.
-- Several ranges are need because some operations are not implemented for all types. */
--# define atomic_type_dispatch_32_64(operation, object, ...) \
-- (sizeof(*object) == 4 ? operation((LONG *)object, __VA_ARGS__) : \
-- sizeof(*object) == 8 ? operation##64((LONGLONG *)object, __VA_ARGS__) : \
-- (abort(), 0))
--
--# define atomic_type_dispatch_16_64(operation, object, ...) \
-- (sizeof(*object) == 2 ? operation##16((short *)object, __VA_ARGS__) : \
-- atomic_type_dispatch_32_64(operation, object, __VA_ARGS__))
--
--# define atomic_type_dispatch_8_64(operation, object, ...) \
-- (sizeof(*object) == 1 ? operation##8((char *)object, __VA_ARGS__) : \
-- atomic_type_dispatch_16_64(operation, object, __VA_ARGS__))
--
--# define atomic_store(object,desired) \
-- atomic_type_dispatch_16_64(InterlockedExchange, object, desired)
--# define atomic_store_explicit(object,desired,order) \
-- atomic_store(object, desired)
--
--# define atomic_load(object) \
-- atomic_type_dispatch_16_64(InterlockedCompareExchange, object, 0, 0)
--# define atomic_load_explicit(object,order) \
-- atomic_load(object)
--
--# define atomic_exchange(object,desired) \
-- atomic_type_dispatch_16_64(InterlockedExchange, object, desired)
--# define atomic_exchange_explicit(object,desired,order) \
-- atomic_exchange(object, desired)
--
--# define atomic_compare_exchange_strong(object,expected,desired) \
-- atomic_type_dispatch_16_64(InterlockedCompareExchange, object, *expected, desired) == *expected
--# define atomic_compare_exchange_strong_explicit(object,expected,desired,order) \
-- atomic_compare_exchange_strong(object, expected, desired)
--# define atomic_compare_exchange_weak(object,expected,desired) \
-- atomic_compare_exchange_strong(object, expected, desired)
--# define atomic_compare_exchange_weak_explicit(object,expected,desired,order) \
-- atomic_compare_exchange_weak(object, expected, desired)
--
--# define atomic_fetch_add(object,operand) \
-- atomic_type_dispatch_32_64(InterlockedExchangeAdd, object, operand)
--# define atomic_fetch_add_explicit(object,operand,order) \
-- atomic_fetch_add(object, operand)
--
--# define atomic_fetch_sub(object,operand) \
-- atomic_type_dispatch_32_64(InterlockedExchangeAdd, object, -(LONGLONG)operand)
--# define atomic_fetch_sub_explicit(object,operand,order) \
-- atomic_fetch_sub(object, operand)
--
--# define atomic_fetch_or(object,operand) \
-- atomic_type_dispatch_8_64(InterlockedOr, object, operand)
--# define atomic_fetch_or_explicit(object,operand,order) \
-- atomic_fetch_or(object, operand)
--
--# define atomic_fetch_xor(object,operand) \
-- atomic_type_dispatch_8_64(InterlockedXor, object, operand)
--# define atomic_fetch_xor_explicit(object,operand,order) \
-- atomic_fetch_sub(object, operand)
--
--# define atomic_fetch_and(object,operand) \
-- atomic_type_dispatch_8_64(InterlockedAnd, object, operand)
--# define atomic_fetch_and_explicit(object,operand,order) \
-- atomic_fetch_and(object, operand)
--
--# define atomic_flag_test_and_set(object) \
-- atomic_exchange(object, true)
--
--# define atomic_flag_test_and_set_explicit(object,order) \
-- atomic_flag_test_and_set(object)
--
--# define atomic_flag_clear(object) \
-- atomic_store(object, false)
--
--# define atomic_flag_clear_explicit(object,order) \
-- atomic_flag_clear(object)
--
--# else
--# error FIXME: implement atomic operations for this compiler.
--# endif
--# endif
-+# endif /* !C11 */
-
- typedef atomic_uint_least32_t vlc_atomic_float;
-
-@@ -427,4 +216,9 @@ static inline void vlc_atomic_store_floa
- atomic_store(atom, u.i);
- }
-
-+# else /* C++ */
-+/*** Native C++11 atomics ***/
-+# include <atomic>
-+# endif /* C++ */
-+
- #endif
-Index: vlc-2.2.3/include/vlc_spu.h
-===================================================================
---- vlc-2.2.3.orig/include/vlc_spu.h
-+++ vlc-2.2.3/include/vlc_spu.h
-@@ -45,9 +45,6 @@ extern "C" {
-
- typedef struct spu_private_t spu_private_t;
-
--/* Default subpicture channel ID */
--#define SPU_DEFAULT_CHANNEL (1)
--
- /**
- * Subpicture unit descriptor
- */
-Index: vlc-2.2.3/include/vlc_vout_osd.h
-===================================================================
---- vlc-2.2.3.orig/include/vlc_vout_osd.h
-+++ vlc-2.2.3/include/vlc_vout_osd.h
-@@ -26,12 +26,13 @@
- #ifndef VLC_VOUT_OSD_H
- #define VLC_VOUT_OSD_H 1
-
--#include <vlc_spu.h>
--
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-+//* Default subpicture channel ID */
-+#define SPU_DEFAULT_CHANNEL (1)
-+
- /**
- * OSD menu position and picture type defines
- */
-Index: vlc-2.2.3/src/video_output/video_output.c
-===================================================================
---- vlc-2.2.3.orig/src/video_output/video_output.c
-+++ vlc-2.2.3/src/video_output/video_output.c
-@@ -43,6 +43,7 @@
- #include <vlc_vout.h>
-
- #include <vlc_filter.h>
-+#include <vlc_spu.h>
- #include <vlc_vout_osd.h>
- #include <vlc_image.h>
-
-Index: vlc-2.2.3/modules/gui/qt4/dialogs/messages.hpp
-===================================================================
---- vlc-2.2.3.orig/modules/gui/qt4/dialogs/messages.hpp
-+++ vlc-2.2.3/modules/gui/qt4/dialogs/messages.hpp
-@@ -28,8 +28,8 @@
- #include "util/singleton.hpp"
- #include "ui/messages_panel.h"
- #include <stdarg.h>
--#include <vlc_atomic.h>
- #include <QMutex>
-+#include <QAtomicInt>
-
- class QTabWidget;
- class QPushButton;
-@@ -55,7 +55,7 @@ private:
- void sinkMessage( const MsgEvent * );
- bool matchFilter( const QString& );
-
-- atomic_uint verbosity;
-+ QAtomicInt verbosity;
- static void MsgCallback( void *, int, const vlc_log_t *, const char *,
- va_list );
-
-Index: vlc-2.2.3/modules/gui/qt4/dialogs/messages.cpp
-===================================================================
---- vlc-2.2.3.orig/modules/gui/qt4/dialogs/messages.cpp
-+++ vlc-2.2.3/modules/gui/qt4/dialogs/messages.cpp
-@@ -143,7 +143,7 @@ MessagesDialog::~MessagesDialog()
-
- void MessagesDialog::changeVerbosity( int i_verbosity )
- {
-- atomic_store( &this->verbosity, i_verbosity );
-+ verbosity = i_verbosity;
- }
-
- void MessagesDialog::updateConfig()
-@@ -337,7 +337,7 @@ void MessagesDialog::MsgCallback( void *
- {
- MessagesDialog *dialog = (MessagesDialog *)self;
- char *str;
-- int verbosity = atomic_load( &dialog->verbosity );
-+ int verbosity = dialog->verbosity;
-
- if( verbosity < 0 || verbosity < (type - VLC_MSG_ERR)
- || unlikely(vasprintf( &str, format, ap ) == -1) )
-
---- vlc-2.2.4.orig/modules/video_filter/atmo/atmo.cpp 2016-05-31 18:11:08.000000000 +0200
-+++ vlc-2.2.4/modules/video_filter/atmo/atmo.cpp 2016-09-13 21:15:07.930984954 +0200
-@@ -696,7 +696,7 @@
- {
- filter_t *p_filter;
- vlc_thread_t thread;
-- atomic_bool abort;
-+ std::atomic_bool abort;
-
- /* tell the thread which color should be the target of fading */
- uint8_t ui_red;