diff options
author | Andreas Sturmlechner <andreas.sturmlechner@gmail.com> | 2016-11-26 16:34:39 +0100 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2016-11-27 05:00:09 +1100 |
commit | 6ffd3e6806dc84eabb4ca910038a4628304b8db2 (patch) | |
tree | a8b66e3496e5fe033d0e5d73278d2331b7439e9b /media-video | |
parent | media-video/vlc: Fix build with Qt 5.7.0 (diff) | |
download | gentoo-6ffd3e6806dc84eabb4ca910038a4628304b8db2.tar.gz gentoo-6ffd3e6806dc84eabb4ca910038a4628304b8db2.tar.bz2 gentoo-6ffd3e6806dc84eabb4ca910038a4628304b8db2.zip |
media-video/vlc: Drop USE=media-library, fix some ALSA issues
Upstream seems unwilling to fix it in 2.2 branch.
Gentoo-bug: 594126, 592784
Package-Manager: portage-2.3.0
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/vlc/files/vlc-2.2.4-alsa-large-buffers.patch | 47 | ||||
-rw-r--r-- | media-video/vlc/files/vlc-2.2.4-decoder-lock-scope.patch | 47 | ||||
-rw-r--r-- | media-video/vlc/metadata.xml | 1 | ||||
-rw-r--r-- | media-video/vlc/vlc-2.2.1-r1.ebuild | 2 | ||||
-rw-r--r-- | media-video/vlc/vlc-2.2.4.ebuild | 2 | ||||
-rw-r--r-- | media-video/vlc/vlc-2.2.9999.ebuild | 6 |
6 files changed, 101 insertions, 4 deletions
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-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/metadata.xml b/media-video/vlc/metadata.xml index ec1f07dca68d..a1e47068a43d 100644 --- a/media-video/vlc/metadata.xml +++ b/media-video/vlc/metadata.xml @@ -47,7 +47,6 @@ <flag name="macosx-quartztext">Enables Mac OS X quartz text module.</flag> <flag name="macosx-qtkit">Enables Mac OS X qtkit module: qtcapture (video) and qtsound (audio) module.</flag> <flag name="matroska">Enables matroska support using reference libraries (fallback on other existing matroska support if disabled, i.e., matroska enabled FFmpeg)</flag> - <flag name="media-library">Build the (sqlite based) media library.</flag> <flag name="mpeg">Add libmpeg2 support for mpeg-1 and mpeg-2 video streams</flag> <flag name="omxil">Enables OpenMAX Integration Layer codec module.</flag> <flag name="optimisememory">Enable optimisation for memory rather than performance.</flag> diff --git a/media-video/vlc/vlc-2.2.1-r1.ebuild b/media-video/vlc/vlc-2.2.1-r1.ebuild index 59b277c7cb4b..1d3bc722caa2 100644 --- a/media-video/vlc/vlc-2.2.1-r1.ebuild +++ b/media-video/vlc/vlc-2.2.1-r1.ebuild @@ -45,7 +45,7 @@ IUSE="a52 aalib alsa altivec atmo +audioqueue +avcodec growl httpd ieee1394 jack jpeg kate kde libass libav libcaca libnotify +libsamplerate libtiger linsys libtar lirc live lua macosx-dialog-provider macosx-eyetv macosx-quartztext macosx-qtkit - matroska media-library cpu_flags_x86_mmx modplug mp3 mpeg + matroska cpu_flags_x86_mmx modplug mp3 mpeg mtp musepack ncurses neon ogg omxil opencv opengl optimisememory opus png postproc projectm pulseaudio +qt4 qt5 rdp rtsp run-as-root samba schroedinger sdl sdl-image sftp shout sid skins speex cpu_flags_x86_sse svg +swscale diff --git a/media-video/vlc/vlc-2.2.4.ebuild b/media-video/vlc/vlc-2.2.4.ebuild index a165e1ddd098..f5ab6f902bfe 100644 --- a/media-video/vlc/vlc-2.2.4.ebuild +++ b/media-video/vlc/vlc-2.2.4.ebuild @@ -45,7 +45,7 @@ IUSE="a52 aalib alsa altivec atmo +audioqueue +avcodec growl httpd ieee1394 jack jpeg kate kde libass libav libcaca libnotify +libsamplerate libtiger linsys libtar lirc live lua macosx-dialog-provider macosx-eyetv macosx-quartztext macosx-qtkit - matroska media-library cpu_flags_x86_mmx modplug mp3 mpeg + matroska cpu_flags_x86_mmx modplug mp3 mpeg mtp musepack ncurses neon ogg omxil opencv opengl optimisememory opus png postproc projectm pulseaudio +qt4 qt5 rdp rtsp run-as-root samba schroedinger sdl sdl-image sftp shout sid skins speex cpu_flags_x86_sse svg +swscale diff --git a/media-video/vlc/vlc-2.2.9999.ebuild b/media-video/vlc/vlc-2.2.9999.ebuild index 70477211516c..8c5988fb3b3f 100644 --- a/media-video/vlc/vlc-2.2.9999.ebuild +++ b/media-video/vlc/vlc-2.2.9999.ebuild @@ -45,7 +45,7 @@ IUSE="a52 aalib alsa altivec atmo +audioqueue +avcodec growl gstreamer httpd ieee1394 jack jpeg kate kde libass libav libcaca libnotify +libsamplerate libtiger linsys libtar lirc live lua macosx-dialog-provider macosx-eyetv macosx-quartztext macosx-qtkit - matroska media-library cpu_flags_x86_mmx modplug mp3 mpeg + matroska cpu_flags_x86_mmx modplug mp3 mpeg mtp musepack ncurses neon ogg omxil opencv opengl optimisememory opus png +postproc projectm pulseaudio +qt4 qt5 rdp rtsp run-as-root samba schroedinger sdl sdl-image sftp shout sid skins speex cpu_flags_x86_sse svg +swscale @@ -224,6 +224,10 @@ PATCHES=( # Bug #589396 "${FILESDIR}"/${PN}-2.2.4-cxx0x.patch + + # Bug #594126 + "${FILESDIR}"/${PN}-2.2.4-decoder-lock-scope.patch + "${FILESDIR}"/${PN}-2.2.4-alsa-large-buffers.patch ) DOCS=( AUTHORS THANKS NEWS README doc/fortunes.txt doc/intf-vcd.txt ) |