vlc:add patch
This commit is contained in:
@@ -27,6 +27,7 @@ def setup():
|
||||
--with-x \
|
||||
LUAC=luac LUA_LIBS='`pkg-config --libs lua`' \
|
||||
RCC=/usr/bin/rcc-qt5 \
|
||||
--disable-qt4 \
|
||||
--disable-asdcp \
|
||||
--disable-coverage \
|
||||
--disable-cprof \
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
--- vlc-2.2.2/configure.ac
|
||||
+++ vlc-2.2.2/configure.ac
|
||||
@@ -3754,10 +3754,6 @@
|
||||
AC_MSG_WARN([Not building Qt Interface with X11 helpers.])
|
||||
])
|
||||
|
||||
- PKG_CHECK_EXISTS([Qt5Core >= 5.5.0 Qt5Core < 5.6.0], [
|
||||
- AC_MSG_ERROR(["You cannot build VLC with Qt-5.5.0. You need to backport I78ef29975181ee22429c9bd4b11d96d9e68b7a9c"])
|
||||
- ])
|
||||
-
|
||||
QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
|
||||
QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
|
||||
AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
|
||||
@@ -0,0 +1,47 @@
|
||||
X-Git-Url: https://git.videolan.org/?p=vlc.git;a=blobdiff_plain;f=modules%2Faudio_output%2Falsa.c;h=4e9fd53592d048baa8b57f30df15ab5806139d07;hp=2d1f99e9cb743bca12c6bdf32cc84a92d07fda8b;hb=47f74a83c161173b0d15e95dab8ceb7c97de51b4;hpb=6ae2905ef7fbc7de3a3a4a1bdf8ad6df46ce570a
|
||||
|
||||
diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
|
||||
index 2d1f99e..4e9fd53 100644
|
||||
--- a/modules/audio_output/alsa.c
|
||||
+++ b/modules/audio_output/alsa.c
|
||||
@@ -495,6 +495,15 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
|
||||
}
|
||||
sys->rate = fmt->i_rate;
|
||||
|
||||
+#if 1 /* work-around for period-long latency outputs (e.g. PulseAudio): */
|
||||
+ param = AOUT_MIN_PREPARE_TIME;
|
||||
+ val = snd_pcm_hw_params_set_period_time_near (pcm, hw, ¶m, NULL);
|
||||
+ if (val)
|
||||
+ {
|
||||
+ msg_Err (aout, "cannot set period: %s", snd_strerror (val));
|
||||
+ goto error;
|
||||
+ }
|
||||
+#endif
|
||||
/* Set buffer size */
|
||||
param = AOUT_MAX_ADVANCE_TIME;
|
||||
val = snd_pcm_hw_params_set_buffer_time_near (pcm, hw, ¶m, NULL);
|
||||
@@ -503,14 +512,22 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
|
||||
msg_Err (aout, "cannot set buffer duration: %s", snd_strerror (val));
|
||||
goto error;
|
||||
}
|
||||
-
|
||||
- param = AOUT_MIN_PREPARE_TIME;
|
||||
+#if 0
|
||||
+ val = snd_pcm_hw_params_get_buffer_time (hw, ¶m, NULL);
|
||||
+ if (val)
|
||||
+ {
|
||||
+ msg_Warn (aout, "cannot get buffer time: %s", snd_strerror(val));
|
||||
+ param = AOUT_MIN_PREPARE_TIME;
|
||||
+ }
|
||||
+ else
|
||||
+ param /= 2;
|
||||
val = snd_pcm_hw_params_set_period_time_near (pcm, hw, ¶m, NULL);
|
||||
if (val)
|
||||
{
|
||||
msg_Err (aout, "cannot set period: %s", snd_strerror (val));
|
||||
goto error;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Commit hardware parameters */
|
||||
val = snd_pcm_hw_params (pcm, hw);
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/configure.ac 2016-09-21 07:10:58.885508665 +0200
|
||||
+++ b/configure.ac 2016-09-21 07:19:17.835725004 +0200
|
||||
@@ -3746,7 +3746,7 @@
|
||||
PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [
|
||||
PKG_CHECK_MODULES([QTX11], [Qt5X11Extras], [
|
||||
VLC_ADD_LIBS([qt4],[${QTX11_LIBS}])
|
||||
- VLC_ADD_CXXFLAGS([qt4],[${QTX11_CFLAGS} -DQT5_HAS_X11])
|
||||
+ VLC_ADD_CXXFLAGS([qt4],[${QTX11_CFLAGS} -DQT5_HAS_X11 -std=c++0x])
|
||||
PKG_CHECK_MODULES([XI], [xi], [
|
||||
VLC_ADD_LIBS([qt4], [${XI_LIBS}])
|
||||
VLC_ADD_CXXFLAGS([qt4], [${XI_CFLAGS} -DHAVE_XI])
|
||||
@@ -0,0 +1,47 @@
|
||||
X-Git-Url: https://git.videolan.org/?p=vlc.git;a=blobdiff_plain;f=src%2Finput%2Fdecoder.c;h=fe3cd428c65c18bfbdadb55baf11521afdc2bfc7;hp=83aa5bf54e2c29ad93fae803117558e4fcd0f658;hb=6ae2905ef7fbc7de3a3a4a1bdf8ad6df46ce570a;hpb=5b2de76965ee8b1ab5e3257f8b6d71bbb4e9e3f9
|
||||
|
||||
--- a/src/input/decoder.c
|
||||
+++ b/src/input/decoder.c
|
||||
@@ -1162,7 +1162,10 @@
|
||||
b_paused = p_owner->b_paused;
|
||||
|
||||
if (!p_audio)
|
||||
+ {
|
||||
+ vlc_mutex_unlock( &p_owner->lock );
|
||||
break;
|
||||
+ }
|
||||
|
||||
/* */
|
||||
int i_rate = INPUT_RATE_DEFAULT;
|
||||
@@ -1180,6 +1183,9 @@
|
||||
|
||||
if( unlikely(p_owner->b_paused != b_paused) )
|
||||
continue; /* race with input thread? retry... */
|
||||
+
|
||||
+ vlc_mutex_unlock( &p_owner->lock );
|
||||
+
|
||||
if( p_aout == NULL )
|
||||
b_reject = true;
|
||||
|
||||
@@ -1199,7 +1205,6 @@
|
||||
|
||||
break;
|
||||
}
|
||||
- vlc_mutex_unlock( &p_owner->lock );
|
||||
}
|
||||
|
||||
static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
|
||||
@@ -1961,11 +1966,10 @@
|
||||
|
||||
/* Parameters changed, restart the aout */
|
||||
vlc_mutex_lock( &p_owner->lock );
|
||||
-
|
||||
- aout_DecDelete( p_owner->p_aout );
|
||||
p_owner->p_aout = NULL;
|
||||
-
|
||||
vlc_mutex_unlock( &p_owner->lock );
|
||||
+ aout_DecDelete( p_owner->p_aout );
|
||||
+
|
||||
input_resource_PutAout( p_owner->p_resource, p_aout );
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
--- a/modules/codec/avcodec/audio.c 2016-09-10 13:46:51.066453337 -0700
|
||||
+++ a/modules/codec/avcodec/audio.c 2016-09-10 13:42:26.061451090 -0700
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavutil/mem.h>
|
||||
+#include <libavutil/channel_layout.h>
|
||||
|
||||
#include "avcodec.h"
|
||||
@@ -0,0 +1,284 @@
|
||||
As the 2.2 headers are still using vlc_atomics (picture)
|
||||
we cannot have a way to avoid collisions with early
|
||||
or late <atomic> inclusion when using GCC >= 4.7
|
||||
|
||||
Conditionals in vlc_atomic won't work.
|
||||
|
||||
Happens in ProjectM and Qt5.
|
||||
---
|
||||
modules/gui/qt4/actions_manager.cpp | 2 ++
|
||||
modules/gui/qt4/adapters/seekpoints.cpp | 4 +--
|
||||
modules/gui/qt4/adapters/seekpoints.hpp | 4 +--
|
||||
modules/gui/qt4/components/controller.cpp | 2 ++
|
||||
.../gui/qt4/components/playlist/playlist_model.hpp | 4 +--
|
||||
modules/gui/qt4/components/playlist/views.cpp | 6 ++++
|
||||
modules/gui/qt4/dialogs/messages.cpp | 2 ++
|
||||
modules/gui/qt4/dialogs/vlm.cpp | 4 ---
|
||||
modules/gui/qt4/dialogs/vlm.hpp | 4 ++-
|
||||
modules/gui/qt4/input_manager.cpp | 2 ++
|
||||
modules/gui/qt4/input_manager.hpp | 3 +-
|
||||
modules/gui/qt4/menus.cpp | 2 ++
|
||||
modules/gui/qt4/qt4.hpp | 32 ++++++++++++++++++----
|
||||
modules/gui/qt4/util/pictureflow.cpp | 2 ++
|
||||
modules/visualization/projectm.cpp | 4 +++
|
||||
15 files changed, 56 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/modules/gui/qt4/actions_manager.cpp b/modules/gui/qt4/actions_manager.cpp
|
||||
index eff40d9..b7ca967 100644
|
||||
--- a/modules/gui/qt4/actions_manager.cpp
|
||||
+++ b/modules/gui/qt4/actions_manager.cpp
|
||||
@@ -25,6 +25,8 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
+#include "qt4.hpp"
|
||||
+
|
||||
#include <vlc_vout.h>
|
||||
#include <vlc_keys.h>
|
||||
|
||||
diff --git a/modules/gui/qt4/adapters/seekpoints.cpp b/modules/gui/qt4/adapters/seekpoints.cpp
|
||||
index fbf2957..a3564bb 100644
|
||||
--- a/modules/gui/qt4/adapters/seekpoints.cpp
|
||||
+++ b/modules/gui/qt4/adapters/seekpoints.cpp
|
||||
@@ -19,14 +19,12 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
+#include "seekpoints.hpp"
|
||||
|
||||
#include "recents.hpp"
|
||||
#include "dialogs_provider.hpp"
|
||||
#include "menus.hpp"
|
||||
|
||||
-#include "seekpoints.hpp"
|
||||
-
|
||||
-#include "qt4.hpp"
|
||||
#include "input_manager.hpp"
|
||||
|
||||
SeekPoints::SeekPoints( QObject *parent, intf_thread_t *p_intf_ ) :
|
||||
diff --git a/modules/gui/qt4/adapters/seekpoints.hpp b/modules/gui/qt4/adapters/seekpoints.hpp
|
||||
index 0083989..bbb9214 100644
|
||||
--- a/modules/gui/qt4/adapters/seekpoints.hpp
|
||||
+++ b/modules/gui/qt4/adapters/seekpoints.hpp
|
||||
@@ -22,9 +22,7 @@
|
||||
#ifndef SEEKPOINTS_HPP
|
||||
#define SEEKPOINTS_HPP
|
||||
|
||||
-#ifdef HAVE_CONFIG_H
|
||||
-#include "config.h"
|
||||
-#endif
|
||||
+#include "qt4.hpp"
|
||||
|
||||
#include <vlc_common.h>
|
||||
#include <vlc_interface.h>
|
||||
diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
|
||||
index d93e0db..c43d929 100644
|
||||
--- a/modules/gui/qt4/components/controller.cpp
|
||||
+++ b/modules/gui/qt4/components/controller.cpp
|
||||
@@ -26,6 +26,8 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
+#include "qt4.hpp"
|
||||
+
|
||||
#include <vlc_vout.h> /* vout_thread_t for FSC */
|
||||
|
||||
/* Widgets */
|
||||
diff --git a/modules/gui/qt4/components/playlist/playlist_model.hpp b/modules/gui/qt4/components/playlist/playlist_model.hpp
|
||||
index f9d1d0c..1f71ac9 100644
|
||||
--- a/modules/gui/qt4/components/playlist/playlist_model.hpp
|
||||
+++ b/modules/gui/qt4/components/playlist/playlist_model.hpp
|
||||
@@ -25,9 +25,7 @@
|
||||
#ifndef _PLAYLIST_MODEL_H_
|
||||
#define _PLAYLIST_MODEL_H_
|
||||
|
||||
-#ifdef HAVE_CONFIG_H
|
||||
-# include "config.h"
|
||||
-#endif
|
||||
+#include "qt4.hpp"
|
||||
|
||||
#include <vlc_input.h>
|
||||
#include <vlc_playlist.h>
|
||||
diff --git a/modules/gui/qt4/components/playlist/views.cpp b/modules/gui/qt4/components/playlist/views.cpp
|
||||
index 59f6535..0066205 100644
|
||||
--- a/modules/gui/qt4/components/playlist/views.cpp
|
||||
+++ b/modules/gui/qt4/components/playlist/views.cpp
|
||||
@@ -21,6 +21,12 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
+#ifdef HAVE_CONFIG_H
|
||||
+#include "config.h"
|
||||
+#endif
|
||||
+
|
||||
+#include "qt4.hpp"
|
||||
+
|
||||
#include "components/playlist/views.hpp"
|
||||
#include "components/playlist/vlc_model.hpp" /* VLCModel */
|
||||
#include "components/playlist/sorting.h" /* Columns List */
|
||||
diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp
|
||||
index 30793a2..9c79c99 100644
|
||||
--- a/modules/gui/qt4/dialogs/messages.cpp
|
||||
+++ b/modules/gui/qt4/dialogs/messages.cpp
|
||||
@@ -24,6 +24,8 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
+#include "qt4.hpp"
|
||||
+
|
||||
#include "dialogs/messages.hpp"
|
||||
|
||||
#include <QPlainTextEdit>
|
||||
diff --git a/modules/gui/qt4/dialogs/vlm.cpp b/modules/gui/qt4/dialogs/vlm.cpp
|
||||
index 0da88cc..595f015 100644
|
||||
--- a/modules/gui/qt4/dialogs/vlm.cpp
|
||||
+++ b/modules/gui/qt4/dialogs/vlm.cpp
|
||||
@@ -23,10 +23,6 @@
|
||||
* Foundation, Inc., 51 Franklin street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
-#ifdef HAVE_CONFIG_H
|
||||
-# include "config.h"
|
||||
-#endif
|
||||
-
|
||||
#include "dialogs/vlm.hpp"
|
||||
|
||||
#ifdef ENABLE_VLM
|
||||
diff --git a/modules/gui/qt4/dialogs/vlm.hpp b/modules/gui/qt4/dialogs/vlm.hpp
|
||||
index a3c6e5d..dcf7110 100644
|
||||
--- a/modules/gui/qt4/dialogs/vlm.hpp
|
||||
+++ b/modules/gui/qt4/dialogs/vlm.hpp
|
||||
@@ -25,8 +25,10 @@
|
||||
#ifndef QVLC_VLM_DIALOG_H_
|
||||
#define QVLC_VLM_DIALOG_H_ 1
|
||||
|
||||
+#include "qt4.hpp"
|
||||
+
|
||||
#ifdef HAVE_CONFIG_H
|
||||
-# include "config.h"
|
||||
+#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_VLM
|
||||
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
|
||||
index fd45f4a..c50cb6c 100644
|
||||
--- a/modules/gui/qt4/input_manager.cpp
|
||||
+++ b/modules/gui/qt4/input_manager.cpp
|
||||
@@ -30,6 +30,8 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
+#include "qt4.hpp"
|
||||
+
|
||||
#include "input_manager.hpp"
|
||||
#include "recents.hpp"
|
||||
|
||||
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
|
||||
index 7d3b76a..4fbecbb 100644
|
||||
--- a/modules/gui/qt4/input_manager.hpp
|
||||
+++ b/modules/gui/qt4/input_manager.hpp
|
||||
@@ -29,9 +29,10 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
+#include "qt4.hpp"
|
||||
+
|
||||
#include <vlc_input.h>
|
||||
|
||||
-#include "qt4.hpp"
|
||||
#include "util/singleton.hpp"
|
||||
#include "adapters/variables.hpp"
|
||||
|
||||
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
|
||||
index 116e98c..46240b0 100644
|
||||
--- a/modules/gui/qt4/menus.cpp
|
||||
+++ b/modules/gui/qt4/menus.cpp
|
||||
@@ -34,6 +34,8 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
+#include "qt4.hpp"
|
||||
+
|
||||
#include <vlc_common.h>
|
||||
#include <vlc_intf_strings.h>
|
||||
#include <vlc_vout.h> /* vout_thread_t */
|
||||
diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp
|
||||
index 44d7db6..5aec957 100644
|
||||
--- a/modules/gui/qt4/qt4.hpp
|
||||
+++ b/modules/gui/qt4/qt4.hpp
|
||||
@@ -29,12 +29,7 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
-#include <vlc_common.h> /* VLC_COMMON_MEMBERS for vlc_interface.h */
|
||||
-#include <vlc_interface.h> /* intf_thread_t */
|
||||
-#include <vlc_playlist.h> /* playlist_t */
|
||||
-
|
||||
-#define QT_NO_CAST_TO_ASCII
|
||||
-#include <QString>
|
||||
+#include <QtGlobal>
|
||||
|
||||
#if ( QT_VERSION < 0x040600 )
|
||||
# error Update your Qt version to at least 4.6.0
|
||||
@@ -43,6 +38,31 @@
|
||||
#define HAS_QT47 ( QT_VERSION >= 0x040700 )
|
||||
#define HAS_QT5 ( QT_VERSION >= 0x050000 )
|
||||
|
||||
+#if HAS_QT5
|
||||
+ #include <QtCore/qcompilerdetection.h>
|
||||
+ #if defined(Q_COMPILER_ATOMICS) && \
|
||||
+ ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7 ) )
|
||||
+ #define VLC_ATOMIC_H
|
||||
+ #include <atomic>
|
||||
+ using namespace std;
|
||||
+ # define atomic_store(object,desired) \
|
||||
+ do { \
|
||||
+ *(object) = (desired); \
|
||||
+ __sync_synchronize(); \
|
||||
+ } while (0)
|
||||
+
|
||||
+ # define atomic_load(object) \
|
||||
+ (__sync_synchronize(), *(object))
|
||||
+ #endif
|
||||
+#endif
|
||||
+
|
||||
+#include <vlc_common.h> /* VLC_COMMON_MEMBERS for vlc_interface.h */
|
||||
+#include <vlc_interface.h> /* intf_thread_t */
|
||||
+#include <vlc_playlist.h> /* playlist_t */
|
||||
+
|
||||
+#define QT_NO_CAST_TO_ASCII
|
||||
+#include <QString>
|
||||
+
|
||||
enum {
|
||||
DialogEventTypeOffset = 0,
|
||||
IMEventTypeOffset = 100,
|
||||
diff --git a/modules/gui/qt4/util/pictureflow.cpp b/modules/gui/qt4/util/pictureflow.cpp
|
||||
index 9318953..a7e6a01 100644
|
||||
--- a/modules/gui/qt4/util/pictureflow.cpp
|
||||
+++ b/modules/gui/qt4/util/pictureflow.cpp
|
||||
@@ -29,6 +29,8 @@
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
+#include "qt4.hpp"
|
||||
+
|
||||
#include "pictureflow.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
diff --git a/modules/visualization/projectm.cpp b/modules/visualization/projectm.cpp
|
||||
index e80fbf4..96d532d 100644
|
||||
--- a/modules/visualization/projectm.cpp
|
||||
+++ b/modules/visualization/projectm.cpp
|
||||
@@ -30,6 +30,10 @@
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
+#if defined(__GNUC__) && \
|
||||
+ ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7 ) )
|
||||
+ #define VLC_ATOMIC_H /* Ensure C atomics wont collide with old intrinsics */
|
||||
+#endif
|
||||
|
||||
#include <vlc_common.h>
|
||||
#include <vlc_plugin.h>
|
||||
--
|
||||
2.7.4
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/modules/codec/avcodec/vaapi.c
|
||||
+++ b/modules/codec/avcodec/vaapi.c
|
||||
@@ -34,6 +34,9 @@
|
||||
#ifdef VLC_VA_BACKEND_XLIB
|
||||
# include <vlc_xlib.h>
|
||||
# include <va/va_x11.h>
|
||||
+#if VA_MINOR_VERSION >= 34
|
||||
+# include <va/va_compat.h>
|
||||
+#endif
|
||||
#endif
|
||||
#ifdef VLC_VA_BACKEND_DRM
|
||||
# include <sys/types.h>
|
||||
@@ -0,0 +1,388 @@
|
||||
From 66842e08e177e3c458fa0e4db970deae84feb625 Mon Sep 17 00:00:00 2001
|
||||
From: Jean-Baptiste Kempf <jb@videolan.org>
|
||||
Date: Tue, 26 May 2015 13:39:00 +0200
|
||||
Subject: [PATCH 01/13] Fix C++11 compilation of atomic
|
||||
|
||||
Close #14569
|
||||
---
|
||||
include/vlc_atomic.h | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 72 insertions(+)
|
||||
|
||||
Index: vlc-2.2.3/include/vlc_atomic.h
|
||||
===================================================================
|
||||
--- 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) )
|
||||
@@ -123,6 +123,14 @@
|
||||
<Patch level="1">ffmpeg3.patch</Patch>
|
||||
<Patch level="1">lua53_compat.patch</Patch>
|
||||
<Patch>qt4-select.patch</Patch>
|
||||
<!-- <Patch level="1">vlc-gcc6-buildfixes.patch</Patch> -->
|
||||
<Patch level="1">vlc-9999-libva-1.2.1-compat.patch</Patch>
|
||||
<Patch level="1">vlc-2.2.4-libav-11.7.patch</Patch>
|
||||
<Patch level="1">vlc-2.2.4-decoder-lock-scope.patch</Patch>
|
||||
<Patch level="1">vlc-2.2.2-qt5widgets.patch</Patch>
|
||||
<Patch level="1">vlc-2.2.4-alsa-large-buffers.patch</Patch>
|
||||
<Patch level="1">vlc-2.2.4-cxx0x.patch</Patch>
|
||||
<Patch level="1">vlc-2.2.4-qt57.patch</Patch>
|
||||
<!-- <Patch>lc-2.2.0-fix-xcb.patch</Patch> -->
|
||||
<!-- <Patch>vlc-2.2.0-rdp-1.2.0.patch</Patch> -->
|
||||
<Patch level="0">vlc-2.1.1-desktop.patch</Patch>
|
||||
@@ -291,7 +299,7 @@
|
||||
<Update release="4">
|
||||
<Date>2017-03-05</Date>
|
||||
<Version>2.2.4</Version>
|
||||
<Comment>Rebuild.</Comment>
|
||||
<Comment>Rebuild</Comment>
|
||||
<Name>Ertuğrul Erata</Name>
|
||||
<Email>ertugrulerata@gmail.com</Email>
|
||||
</Update>
|
||||
|
||||
Reference in New Issue
Block a user