diff options
-rw-r--r-- | main/vlc/APKBUILD | 6 | ||||
-rw-r--r-- | main/vlc/sout-transcode-monosrc.patch | 120 |
2 files changed, 125 insertions, 1 deletions
diff --git a/main/vlc/APKBUILD b/main/vlc/APKBUILD index 6716970918..bdbcf2df4d 100644 --- a/main/vlc/APKBUILD +++ b/main/vlc/APKBUILD @@ -4,7 +4,7 @@ pkgname=vlc pkgver=2.1.5 _pkgver=${pkgver/_/-} _ver=${_pkgver%[a-z]} -pkgrel=1 +pkgrel=2 pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player" triggers="vlc-libs.trigger=/usr/lib/vlc/plugins" pkgusers="vlc" @@ -105,6 +105,7 @@ makedepends=" " source="http://download.videolan.org/pub/videolan/$pkgname/${_ver}/$pkgname-$_pkgver.tar.xz fix-waitpid-usage.patch + sout-transcode-monosrc.patch 0001-omxil-Release-picture-in-direct-rendering-mode.patch 0002-omxil-vout-Handle-dynamic-aspect-changes.patch @@ -342,6 +343,7 @@ plugins_visualization() { _mv_plugins visualization; } md5sums="3941b561f590cc95ca5e795213cba2f2 vlc-2.1.5.tar.xz 7b1a482e521b9d6dcdb6710aff51894f fix-waitpid-usage.patch +4ba0ed24327f342e1f52dff14ca38faf sout-transcode-monosrc.patch 76ab721e5d303158201293c4ae5b5ba9 0001-omxil-Release-picture-in-direct-rendering-mode.patch 3d39249940b63e20ac6c84c68ee67677 0002-omxil-vout-Handle-dynamic-aspect-changes.patch 4209dd3c03001a921ece0f8647ecb1c5 0003-omxil-rpi-Fetch-pixel-aspect-ratio-from-decoder.patch @@ -350,6 +352,7 @@ d43b448ee0ba6980ecfc5fdfa655f473 0010-omxil-rpi-codecs.patch dd899a9926ad84db9446d92890a5aa3e vlc-libs.trigger" sha256sums="6f6566ab6cd90d381395b7f0e401060b044cd3843e50ceb252b558a88e5d1f72 vlc-2.1.5.tar.xz 0c802698c215dd2d2ad9a4889b1d46dfd5d6c304d4cd1b34bacb2bacc35dd3c9 fix-waitpid-usage.patch +7e04144f61444e455ba1b6c8d6529506a122983764d55e0f6d4ba9884d7654a3 sout-transcode-monosrc.patch 3ff97e9c1b4055ac9a0981fa90b6f55abe72e44d5606a963f9b66f6274672822 0001-omxil-Release-picture-in-direct-rendering-mode.patch f9e5d27aa46cc4ebb929afaa30f53343eb40347915ec827cf461a42745fa525a 0002-omxil-vout-Handle-dynamic-aspect-changes.patch 7709d3fa0090e4aa8fb21eff55320fa11b681e6b7a8faab24b4473645cda3112 0003-omxil-rpi-Fetch-pixel-aspect-ratio-from-decoder.patch @@ -358,6 +361,7 @@ fe0b937e0b0a05b7d2cccd27dab49df77e84928e49fb148bae3d0effeb261d2f 0004-omxil-bcm 1c93af2feb217a06f6adc3cd51def8f00eea431f9d26ace7b90c377f7e85fc7a vlc-libs.trigger" sha512sums="37c6b82b4e89f4a14ed391cc677d9325a032e04bcc51a3e0d7d2ccf9e17a7a0deb90d9129e9dc3baf05a1ea9dae9c05e3177ab17a31098aafa6a2cb23388fa32 vlc-2.1.5.tar.xz 3c6ff4f25b7e1f0041bc47872a2b59b6c4f8bc1747d6830e9f2d9c35ee75cd2581558a12225070dede37d6a2287b0fc5c089c8f4f8ae26784aa6aded7177bed0 fix-waitpid-usage.patch +2ee570e9a3ccd6deef7d0a2084a4e50e844fb102a7a5865266b1774f9c80668f6a5a5cc57c319c42feb1f2eda581213b486367b4a92b35c18adb974cf6219b97 sout-transcode-monosrc.patch 0dc1c827af73f29fe715e3d75812ca916d0feac355d7c5f7ac1696bfbf3aca31dabbdd0ec05174a1c15713c530748f9dcb1b4b87819f3a6570c86c71ac503954 0001-omxil-Release-picture-in-direct-rendering-mode.patch c276962f33c38ad64caa6c4f8ca673c4367635b8998ee8a1003047f89e652c535027c68a836822d9b762d1b76ad04bd04dc0d19bbfabc5c3b7d14a7ee1cdd744 0002-omxil-vout-Handle-dynamic-aspect-changes.patch db15b7488768b429f26e4e7fdf82259ffc834fa2bdf1461b297b36111aad87603f7b015b0855afb8bc797fb351311dee555bbef0dc0a5d029748b057a3c23f92 0003-omxil-rpi-Fetch-pixel-aspect-ratio-from-decoder.patch diff --git a/main/vlc/sout-transcode-monosrc.patch b/main/vlc/sout-transcode-monosrc.patch new file mode 100644 index 0000000000..9509b535e3 --- /dev/null +++ b/main/vlc/sout-transcode-monosrc.patch @@ -0,0 +1,120 @@ +From: Timo Teräs + +Posted upstream, see: +https://trac.videolan.org/vlc/ticket/12122 + +diff -ru vlc-2.1.5.orig/modules/audio_filter/channel_mixer/trivial.c vlc-2.1.5/modules/audio_filter/channel_mixer/trivial.c +--- vlc-2.1.5.orig/modules/audio_filter/channel_mixer/trivial.c 2013-06-24 21:00:38.000000000 -0300 ++++ vlc-2.1.5/modules/audio_filter/channel_mixer/trivial.c 2014-09-12 16:16:49.288413334 -0300 +@@ -133,7 +133,9 @@ + { + p_src++; + } +- if ( p_filter->fmt_out.audio.i_physical_channels == AOUT_CHAN_CENTER ) ++ if ( p_filter->fmt_out.audio.i_physical_channels == AOUT_CHAN_CENTER || ++ p_filter->fmt_out.audio.i_physical_channels == AOUT_CHAN_LEFT || ++ p_filter->fmt_out.audio.i_physical_channels == AOUT_CHAN_RIGHT ) + { + /* Mono mode */ + for ( i = p_in_buf->i_nb_samples; i--; ) +diff -ru vlc-2.1.5.orig/modules/stream_out/transcode/audio.c vlc-2.1.5/modules/stream_out/transcode/audio.c +--- vlc-2.1.5.orig/modules/stream_out/transcode/audio.c 2014-04-22 11:03:57.000000000 -0300 ++++ vlc-2.1.5/modules/stream_out/transcode/audio.c 2014-09-12 16:28:50.805087137 -0300 +@@ -35,6 +35,11 @@ + #include <vlc_meta.h> + #include <vlc_modules.h> + ++static const int pi_mono_channel_maps[3] = ++{ ++ AOUT_CHAN_CENTER, AOUT_CHAN_LEFT, AOUT_CHAN_RIGHT, ++}; ++ + static const int pi_channels_maps[6] = + { + 0, +@@ -167,7 +172,11 @@ + if( !id->p_encoder->fmt_in.audio.i_physical_channels + || !id->p_encoder->fmt_in.audio.i_original_channels ) + { +- if( id->p_encoder->fmt_in.audio.i_channels < 6 ) ++ if (id->p_encoder->fmt_in.audio.i_channels == 1) ++ id->p_encoder->fmt_in.audio.i_physical_channels = ++ id->p_encoder->fmt_in.audio.i_original_channels = ++ pi_mono_channel_maps[p_sys->i_mono_source]; ++ else if( id->p_encoder->fmt_in.audio.i_channels < 6 ) + id->p_encoder->fmt_in.audio.i_physical_channels = + id->p_encoder->fmt_in.audio.i_original_channels = + pi_channels_maps[id->p_encoder->fmt_in.audio.i_channels]; +diff -ru vlc-2.1.5.orig/modules/stream_out/transcode/transcode.c vlc-2.1.5/modules/stream_out/transcode/transcode.c +--- vlc-2.1.5.orig/modules/stream_out/transcode/transcode.c 2013-06-24 21:00:38.000000000 -0300 ++++ vlc-2.1.5/modules/stream_out/transcode/transcode.c 2014-09-12 11:58:28.988259972 -0300 +@@ -99,6 +99,9 @@ + #define ACHANS_TEXT N_("Audio channels") + #define ACHANS_LONGTEXT N_( \ + "Number of audio channels in the transcoded streams." ) ++#define AMONOSRC_TEXT N_("Audio source for mono") ++#define AMONOSRC_LONGTEXT N_( \ ++ "Audio source channel for mono output (0=center, 1=left, 2=right)." ) + #define AFILTER_TEXT N_("Audio filter") + #define AFILTER_LONGTEXT N_( \ + "Audio filters will be applied to the audio streams (after conversion " \ +@@ -199,6 +202,8 @@ + ALANG_LONGTEXT, true ) + add_integer( SOUT_CFG_PREFIX "channels", 0, ACHANS_TEXT, + ACHANS_LONGTEXT, false ) ++ add_integer( SOUT_CFG_PREFIX "monosrc", 0, AMONOSRC_TEXT, ++ AMONOSRC_LONGTEXT, false ) + add_integer( SOUT_CFG_PREFIX "samplerate", 0, ARATE_TEXT, + ARATE_LONGTEXT, true ) + add_bool( SOUT_CFG_PREFIX "audio-sync", false, ASYNC_TEXT, +@@ -232,7 +237,7 @@ + "venc", "vcodec", "vb", + "scale", "fps", "width", "height", "vfilter", "deinterlace", + "deinterlace-module", "threads", "hurry-up", "aenc", "acodec", "ab", "alang", +- "afilter", "samplerate", "channels", "senc", "scodec", "soverlay", ++ "afilter", "samplerate", "channels", "monosrc", "senc", "scodec", "soverlay", + "sfilter", "osd", "audio-sync", "high-priority", "maxwidth", "maxheight", + NULL + }; +@@ -296,6 +301,8 @@ + + p_sys->i_channels = var_GetInteger( p_stream, SOUT_CFG_PREFIX "channels" ); + ++ p_sys->i_mono_source = var_GetInteger( p_stream, SOUT_CFG_PREFIX "monosrc" ); ++ + if( p_sys->i_acodec ) + { + if( ( p_sys->i_acodec == VLC_CODEC_MP3 || +diff -ru vlc-2.1.5.orig/modules/stream_out/transcode/transcode.h vlc-2.1.5/modules/stream_out/transcode/transcode.h +--- vlc-2.1.5.orig/modules/stream_out/transcode/transcode.h 2014-04-22 11:03:57.000000000 -0300 ++++ vlc-2.1.5/modules/stream_out/transcode/transcode.h 2014-09-12 11:50:13.548255065 -0300 +@@ -31,6 +31,7 @@ + config_chain_t *p_audio_cfg; + uint32_t i_sample_rate; + uint32_t i_channels; ++ uint32_t i_mono_source; + int i_abitrate; + + char *psz_af; +diff -ru vlc-2.1.5.orig/src/audio_output/common.c vlc-2.1.5/src/audio_output/common.c +--- vlc-2.1.5.orig/src/audio_output/common.c 2013-12-03 11:12:35.000000000 -0200 ++++ vlc-2.1.5/src/audio_output/common.c 2014-09-12 16:26:54.821752658 -0300 +@@ -107,13 +107,12 @@ + case AOUT_CHAN_LEFT: + case AOUT_CHAN_RIGHT: + case AOUT_CHAN_CENTER: +- if ( (p_format->i_original_channels & AOUT_CHAN_CENTER) +- || (p_format->i_original_channels +- & (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT)) ) +- return "Mono"; +- else if ( p_format->i_original_channels & AOUT_CHAN_LEFT ) ++ if ( p_format->i_original_channels & AOUT_CHAN_LEFT ) + return "Left"; +- return "Right"; ++ else if ( p_format->i_original_channels & AOUT_CHAN_RIGHT ) ++ return "Right"; ++ return "Mono"; ++ + case AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT: + if ( p_format->i_original_channels & AOUT_CHAN_REVERSESTEREO ) + { |