From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- media-video/vlc/files/qt4-select.patch | 51 ++++ ...2.1.0-TomWij-bisected-PA-broken-underflow.patch | 23 ++ .../vlc/files/vlc-2.1.0-fix-libtremor-libs.patch | 11 + media-video/vlc/files/vlc-2.2.2-qt5widgets.patch | 13 + .../vlc/files/vlc-2.2.4-alsa-large-buffers.patch | 47 ++++ media-video/vlc/files/vlc-2.2.4-cxx0x.patch | 11 + .../vlc/files/vlc-2.2.4-decoder-lock-scope.patch | 47 ++++ media-video/vlc/files/vlc-2.2.4-ffmpeg3.patch | 160 ++++++++++++ media-video/vlc/files/vlc-2.2.4-libav-11.7.patch | 10 + media-video/vlc/files/vlc-2.2.4-qt57.patch | 284 +++++++++++++++++++++ media-video/vlc/files/vlc-2.2.4-relax_ffmpeg.patch | 45 ++++ .../vlc/files/vlc-2.2.6-decoder-lock-scope.patch | 34 +++ .../vlc/files/vlc-9999-libva-1.2.1-compat.patch | 12 + 13 files changed, 748 insertions(+) create mode 100644 media-video/vlc/files/qt4-select.patch create mode 100644 media-video/vlc/files/vlc-2.1.0-TomWij-bisected-PA-broken-underflow.patch create mode 100644 media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch create mode 100644 media-video/vlc/files/vlc-2.2.2-qt5widgets.patch create mode 100644 media-video/vlc/files/vlc-2.2.4-alsa-large-buffers.patch create mode 100644 media-video/vlc/files/vlc-2.2.4-cxx0x.patch create mode 100644 media-video/vlc/files/vlc-2.2.4-decoder-lock-scope.patch create mode 100644 media-video/vlc/files/vlc-2.2.4-ffmpeg3.patch create mode 100644 media-video/vlc/files/vlc-2.2.4-libav-11.7.patch create mode 100644 media-video/vlc/files/vlc-2.2.4-qt57.patch create mode 100644 media-video/vlc/files/vlc-2.2.4-relax_ffmpeg.patch create mode 100644 media-video/vlc/files/vlc-2.2.6-decoder-lock-scope.patch create mode 100644 media-video/vlc/files/vlc-9999-libva-1.2.1-compat.patch (limited to 'media-video/vlc/files') diff --git a/media-video/vlc/files/qt4-select.patch b/media-video/vlc/files/qt4-select.patch new file mode 100644 index 000000000000..fb1526a30a7a --- /dev/null +++ b/media-video/vlc/files/qt4-select.patch @@ -0,0 +1,51 @@ +https://gist.github.com/karolherbst/fb9e3d8f6ba05f1f5d54 +For use until upstream ever accepts this patch or fixes it themsleves +--- a/configure.ac ++++ b/configure.ac +@@ -3709,7 +3709,8 @@ + ]) + ]) + AS_IF([test "${enable_qt}" != "no"], [ +- PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [ ++ AS_IF([test "${enable_qt}" != "4"], [ ++ 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]) +@@ -3721,20 +3722,23 @@ + AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) + AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) + AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) ++ enable_qt="5" +- ], [ +- PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [ +- AS_IF([test -n "${enable_qt}"],[ +- AC_MSG_ERROR([${QT_PKG_ERRORS}.]) +- ],[ +- AC_MSG_WARN([${QT_PKG_ERRORS}.]) +- ]) +- enable_qt="no" ++ ]) ++ ]) ++ AS_IF([test "${enable_qt}" != "5"], [ ++ PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [ ++ AS_IF([test -n "${enable_qt}"],[ ++ AC_MSG_ERROR([${QT_PKG_ERRORS}.]) ++ ],[ ++ AC_MSG_WARN([${QT_PKG_ERRORS}.]) + ]) +- QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)" +- AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) +- AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin]) +- AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) ++ enable_qt="no" + ]) ++ QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)" ++ AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) ++ AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin]) ++ AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"]) ++ ]) + ]) + AS_IF([test "${enable_qt}" != "no"], [ + VLC_ADD_PLUGIN([qt4]) + diff --git a/media-video/vlc/files/vlc-2.1.0-TomWij-bisected-PA-broken-underflow.patch b/media-video/vlc/files/vlc-2.1.0-TomWij-bisected-PA-broken-underflow.patch new file mode 100644 index 000000000000..3163410353a2 --- /dev/null +++ b/media-video/vlc/files/vlc-2.1.0-TomWij-bisected-PA-broken-underflow.patch @@ -0,0 +1,23 @@ +index 2debbcd..72e7fcf 100644 +--- a/modules/audio_output/pulse.c ++++ b/modules/audio_output/pulse.c +@@ -472,8 +472,17 @@ static void stream_underflow_cb(pa_stream *s, void *userdata) + { ++ uint32_t rate = pa_stream_get_sample_spec(s)->rate; + audio_output_t *aout = userdata; + +- msg_Dbg(aout, "underflow"); +- (void) s; ++ msg_Warn(aout, "underflow"); ++ stream_stop(s, aout); ++ ++ aout_sys_t *sys = aout->sys; ++ sys->first_pts = VLC_TS_INVALID; ++ ++ pa_operation *op = pa_stream_update_sample_rate(s, rate, NULL, NULL); ++ if (unlikely(op == NULL)) ++ return; ++ pa_operation_unref(op); + } + + static int stream_wait(pa_stream *stream, pa_threaded_mainloop *mainloop) diff --git a/media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch b/media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch new file mode 100644 index 000000000000..8a58969d0d8e --- /dev/null +++ b/media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch @@ -0,0 +1,11 @@ +--- a/modules/codec/Makefile.am ++++ b/modules/codec/Makefile.am +@@ -215,7 +215,7 @@ + libtremor_plugin_la_SOURCES = codec/vorbis.c + libtremor_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DMODULE_NAME_IS_tremor + libtremor_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)' +-libtremor_plugin_la_LIBADD = -lvorbisdec -logg ++libtremor_plugin_la_LIBADD = $(VORBIS_LIBS) $(OGG_LIBS) + EXTRA_LTLIBRARIES += libtremor_plugin.la + codec_LTLIBRARIES += $(LTLIBtremor) + diff --git a/media-video/vlc/files/vlc-2.2.2-qt5widgets.patch b/media-video/vlc/files/vlc-2.2.2-qt5widgets.patch new file mode 100644 index 000000000000..a024d0032b6d --- /dev/null +++ b/media-video/vlc/files/vlc-2.2.2-qt5widgets.patch @@ -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"]) diff --git a/media-video/vlc/files/vlc-2.2.4-alsa-large-buffers.patch b/media-video/vlc/files/vlc-2.2.4-alsa-large-buffers.patch new file mode 100644 index 000000000000..b5a9ff7267fb --- /dev/null +++ b/media-video/vlc/files/vlc-2.2.4-alsa-large-buffers.patch @@ -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); diff --git a/media-video/vlc/files/vlc-2.2.4-cxx0x.patch b/media-video/vlc/files/vlc-2.2.4-cxx0x.patch new file mode 100644 index 000000000000..cb3d63522de3 --- /dev/null +++ b/media-video/vlc/files/vlc-2.2.4-cxx0x.patch @@ -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]) diff --git a/media-video/vlc/files/vlc-2.2.4-decoder-lock-scope.patch b/media-video/vlc/files/vlc-2.2.4-decoder-lock-scope.patch new file mode 100644 index 000000000000..51a2cdcb16da --- /dev/null +++ b/media-video/vlc/files/vlc-2.2.4-decoder-lock-scope.patch @@ -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 ); + } + diff --git a/media-video/vlc/files/vlc-2.2.4-ffmpeg3.patch b/media-video/vlc/files/vlc-2.2.4-ffmpeg3.patch new file mode 100644 index 000000000000..3bc5954920d0 --- /dev/null +++ b/media-video/vlc/files/vlc-2.2.4-ffmpeg3.patch @@ -0,0 +1,160 @@ +Index: vlc-2.2.4/configure.ac +=================================================================== +--- vlc-2.2.4.orig/configure.ac ++++ vlc-2.2.4/configure.ac +@@ -2323,8 +2323,8 @@ AC_ARG_ENABLE(avcodec, + [ --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 < 56],, [ ++ AC_MSG_ERROR([libavutil versions 56 and later are not supported.]) + ]) + VLC_SAVE_FLAGS + CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}" +Index: vlc-2.2.4/modules/codec/avcodec/audio.c +=================================================================== +--- vlc-2.2.4.orig/modules/codec/avcodec/audio.c ++++ vlc-2.2.4/modules/codec/avcodec/audio.c +@@ -39,8 +39,6 @@ + #include + #include + +-#include +- + #include "avcodec.h" + + /***************************************************************************** +Index: vlc-2.2.4/modules/codec/avcodec/encoder.c +=================================================================== +--- vlc-2.2.4.orig/modules/codec/avcodec/encoder.c ++++ vlc-2.2.4/modules/codec/avcodec/encoder.c +@@ -41,7 +41,6 @@ + #include + + #include +-#include + + #include "avcodec.h" + #include "avcommon.h" +@@ -311,7 +310,7 @@ int OpenEncoder( vlc_object_t *p_this ) + 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; +@@ -555,7 +554,7 @@ int OpenEncoder( vlc_object_t *p_this ) + + if( p_codec->pix_fmts ) + { +- const enum PixelFormat *p = p_codec->pix_fmts; ++ const enum AVPixelFormat *p = p_codec->pix_fmts; + for( ; *p != -1; p++ ) + { + if( *p == p_context->pix_fmt ) break; +@@ -1017,7 +1016,7 @@ errmsg: + } + } + +- p_sys->frame = avcodec_alloc_frame(); ++ p_sys->frame = av_frame_alloc(); + if( !p_sys->frame ) + { + goto error; +@@ -1088,7 +1087,7 @@ static block_t *EncodeVideo( encoder_t * + 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 +1328,7 @@ static block_t *handle_delay_buffer( enc + //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 +1450,7 @@ static block_t *EncodeAudio( encoder_t * + 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 +Index: vlc-2.2.4/modules/codec/avcodec/vaapi.c +=================================================================== +--- vlc-2.2.4.orig/modules/codec/avcodec/vaapi.c ++++ vlc-2.2.4/modules/codec/avcodec/vaapi.c +@@ -598,7 +598,7 @@ static int Create( vlc_va_t *p_va, AVCod + 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; +Index: vlc-2.2.4/modules/codec/avcodec/video.c +=================================================================== +--- vlc-2.2.4.orig/modules/codec/avcodec/video.c ++++ vlc-2.2.4/modules/codec/avcodec/video.c +@@ -108,8 +108,8 @@ static int lavc_GetFrame(struct AVCodecC + static int ffmpeg_GetFrameBuf ( struct AVCodecContext *, AVFrame * ); + static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *, AVFrame * ); + #endif +-static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *, +- const enum PixelFormat * ); ++static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *, ++ const enum AVPixelFormat * ); + + static uint32_t ffmpeg_CodecTag( vlc_fourcc_t fcc ) + { +@@ -234,7 +234,7 @@ int InitVideoDec( decoder_t *p_dec, AVCo + 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 @@ int InitVideoDec( decoder_t *p_dec, AVCo + 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 @@ void EndVideoDec( decoder_t *p_dec ) + 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 ); +@@ -1313,8 +1313,8 @@ static void ffmpeg_ReleaseFrameBuf( stru + } + #endif + +-static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, +- const enum PixelFormat *pi_fmt ) ++static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *p_context, ++ const enum AVPixelFormat *pi_fmt ) + { + decoder_t *p_dec = p_context->opaque; + decoder_sys_t *p_sys = p_dec->p_sys; diff --git a/media-video/vlc/files/vlc-2.2.4-libav-11.7.patch b/media-video/vlc/files/vlc-2.2.4-libav-11.7.patch new file mode 100644 index 000000000000..932223632d73 --- /dev/null +++ b/media-video/vlc/files/vlc-2.2.4-libav-11.7.patch @@ -0,0 +1,10 @@ +--- 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 + #include ++#include + + #include "avcodec.h" + diff --git a/media-video/vlc/files/vlc-2.2.4-qt57.patch b/media-video/vlc/files/vlc-2.2.4-qt57.patch new file mode 100644 index 000000000000..97472a64c398 --- /dev/null +++ b/media-video/vlc/files/vlc-2.2.4-qt57.patch @@ -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 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 + #include + +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 + #include +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 /* 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 + #include +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 +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 + +-#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 + #include + #include /* 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_MEMBERS for vlc_interface.h */ +-#include /* intf_thread_t */ +-#include /* playlist_t */ +- +-#define QT_NO_CAST_TO_ASCII +-#include ++#include + + #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 ++ #if defined(Q_COMPILER_ATOMICS) && \ ++ ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7 ) ) ++ #define VLC_ATOMIC_H ++ #include ++ 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_MEMBERS for vlc_interface.h */ ++#include /* intf_thread_t */ ++#include /* playlist_t */ ++ ++#define QT_NO_CAST_TO_ASCII ++#include ++ + 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 +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 ++#if defined(__GNUC__) && \ ++ ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7 ) ) ++ #define VLC_ATOMIC_H /* Ensure C atomics wont collide with old intrinsics */ ++#endif + + #include + #include +-- +2.7.4 diff --git a/media-video/vlc/files/vlc-2.2.4-relax_ffmpeg.patch b/media-video/vlc/files/vlc-2.2.4-relax_ffmpeg.patch new file mode 100644 index 000000000000..218af58281fa --- /dev/null +++ b/media-video/vlc/files/vlc-2.2.4-relax_ffmpeg.patch @@ -0,0 +1,45 @@ +commit b8869f97ea66ac7ec9912a74c2e8b5e15daf7752 +Author: Rafaël Carré +Date: Fri Feb 26 00:36:26 2016 +0000 + + Relax requirements for FFmpeg hwaccel + + It doesn't error out anymore since 5edd1f62ca1 + +Index: vlc-2.2.4/configure.ac +=================================================================== +--- vlc-2.2.4.orig/configure.ac ++++ vlc-2.2.4/configure.ac +@@ -2383,7 +2383,9 @@ AS_IF([test "${have_vaapi}" = "yes" -a " + 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.12.100], [ ++ AC_MSG_ERROR([VA API requires FFmpeg libavcodec < 57.10 or > 57.12 or libav.]) ++ ]) + ]) + ;; + esac +@@ -2417,7 +2419,9 @@ AS_IF([test "${enable_dxva2}" != "no"], + 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.12.100], [ ++ AC_MSG_ERROR([DXVA2 requires FFmpeg libavcodec < 57.10 or > 57.12 or libav.]) ++ ]) + ]) + ;; + esac +@@ -3181,7 +3185,9 @@ AS_IF([test "${have_vdpau}" = "yes" -a " + libav) av_vdpau_ver="55.26.0" ;; + ffmpeg) av_vdpau_ver="55.42.100" + PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [ +- AC_MSG_ERROR([VDPAU requires FFmpeg libavcodec < 57.10 or libav.]) ++ PKG_CHECK_EXISTS([libavcodec <= 57.12.100], [ ++ AC_MSG_ERROR([VDPAU requires FFmpeg libavcodec < 57.10 or > 57.12 or libav.]) ++ ]) + ]) + ;; + esac diff --git a/media-video/vlc/files/vlc-2.2.6-decoder-lock-scope.patch b/media-video/vlc/files/vlc-2.2.6-decoder-lock-scope.patch new file mode 100644 index 000000000000..2e8064446d05 --- /dev/null +++ b/media-video/vlc/files/vlc-2.2.6-decoder-lock-scope.patch @@ -0,0 +1,34 @@ +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 ) + diff --git a/media-video/vlc/files/vlc-9999-libva-1.2.1-compat.patch b/media-video/vlc/files/vlc-9999-libva-1.2.1-compat.patch new file mode 100644 index 000000000000..adfdefec56af --- /dev/null +++ b/media-video/vlc/files/vlc-9999-libva-1.2.1-compat.patch @@ -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 + # include ++#if VA_MINOR_VERSION >= 34 ++# include ++#endif + #endif + #ifdef VLC_VA_BACKEND_DRM + # include -- cgit v1.2.3