summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsl1pkn072015-06-08 18:40:44 +0200
committersl1pkn072015-06-08 18:40:44 +0200
commitc93d29b44dd838d76394aa659a44b22305ff0d22 (patch)
tree7efe8ff58535d37897a53b1820382c75a01275e9
downloadaur-c93d29b44dd838d76394aa659a44b22305ff0d22.tar.gz
Initial commit
-rw-r--r--.SRCINFO89
-rw-r--r--.gitignore12
-rw-r--r--0004-use-pkg-config-for-dvdnav.patch62
-rw-r--r--0005-switch_title-switch-to-next-title-if-no-parameter-pa.patch31
-rw-r--r--PKGBUILD113
-rw-r--r--giflib-5.0.patch111
-rw-r--r--giflib-5.1.patch38
-rw-r--r--include-samba-4.0.patch12
-rw-r--r--libquvi-0.9.patch97
-rw-r--r--mplayer2-build-git.install12
-rw-r--r--stream_dvdnav.diff20
11 files changed, 597 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ecf6d49cf9e4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,89 @@
+pkgbase = mplayer2-build-git
+ pkgdesc = A movie player for linux (uses statically linked libav). (GIT version)
+ pkgver = 2.0.728.g2c378c7
+ pkgrel = 6
+ url = http://www.mplayer2.org/
+ install = mplayer2-build-git.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ makedepends = live-media
+ makedepends = mesa
+ makedepends = python
+ makedepends = python-docutils
+ makedepends = vstream-client
+ makedepends = yasm
+ depends = a52dec
+ depends = desktop-file-utils
+ depends = directfb
+ depends = enca
+ depends = faad2
+ depends = fribidi
+ depends = jack
+ depends = lcms2
+ depends = libbluray
+ depends = libbs2b
+ depends = libcaca
+ depends = libcdio-paranoia
+ depends = libdca
+ depends = libgl
+ depends = libmng
+ depends = libdv
+ depends = libdvdnav
+ depends = libdvdcss
+ depends = libmad
+ depends = libpulse
+ depends = libquvi
+ depends = libtheora
+ depends = libvdpau
+ depends = libxv
+ depends = libxinerama
+ depends = libxss
+ depends = libxxf86vm
+ depends = lirc-utils
+ depends = mpg123
+ depends = nut-multimedia-git
+ depends = portaudio
+ depends = rsound
+ depends = smbclient
+ depends = speex
+ depends = ttf-font
+ depends = xvidcore
+ provides = mplayer
+ provides = mplayer2
+ conflicts = mplayer
+ conflicts = mplayer2
+ replaces = mplayer
+ replaces = mplayer2
+ noextract = mplayer2-2.0.tar.xz
+ options = !emptydirs
+ backup = etc/mplayer/codecs.conf
+ backup = etc/mplayer/input.conf
+ source = http://ftp.mplayer2.org/pub/release/mplayer2-2.0.tar.xz
+ source = git://git.mplayer2.org/mplayer2-build.git
+ source = git://git.mplayer2.org/mplayer2.git
+ source = libav::git://repo.or.cz/FFMpeg-mirror/mplayer-patches.git
+ source = git+https://github.com/libass/libass.git
+ source = http://devel.mplayer2.org/raw-attachment/ticket/265/0004-use-pkg-config-for-dvdnav.patch
+ source = http://devel.mplayer2.org/raw-attachment/ticket/265/0005-switch_title-switch-to-next-title-if-no-parameter-pa.patch
+ source = stream_dvdnav.diff
+ source = giflib-5.0.patch
+ source = giflib-5.1.patch
+ source = libquvi-0.9.patch
+ source = include-samba-4.0.patch
+ sha1sums = 0df8d4e5484128b7b28029273b7704ab5d5419bc
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = a073d296dbebfd9caead117eb0edefe317a97fd8
+ sha1sums = 901d3a80e6c69f1f804c102d1c5b7b294e8d30c9
+ sha1sums = 0d06ab2bdde0fdabe750ae528b0351149e9640e5
+ sha1sums = f8b33a47c4aae10fdd6de246667dd0f7900a3142
+ sha1sums = 85d54b02f6f59fa9bd785d403c852031dcb517af
+ sha1sums = 06919a6dc0ae8db9e8ab50b55bb83a26445de51d
+ sha1sums = 8c2fc1526a413cd821b46fd48ea08364abbf5c4c
+
+pkgname = mplayer2-build-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b4279ab87992
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,12 @@
+*
+!.gitignore
+!.SRCINFO
+!PKGBUILD
+!mplayer2-build-git.install
+!0004-use-pkg-config-for-dvdnav.patch
+!0005-switch_title-switch-to-next-title-if-no-parameter-pa.patch
+!giflib-5.0.patch
+!giflib-5.1.patch
+!include-samba-4.0.patch
+!libquvi-0.9.patch
+!stream_dvdnav.diff
diff --git a/0004-use-pkg-config-for-dvdnav.patch b/0004-use-pkg-config-for-dvdnav.patch
new file mode 100644
index 000000000000..aea3a7ba3677
--- /dev/null
+++ b/0004-use-pkg-config-for-dvdnav.patch
@@ -0,0 +1,62 @@
+From aa7445805211b6f616614647159a71ae9df3ab03 Mon Sep 17 00:00:00 2001
+From: Emmanuel Anne <emmanuel.anne@gmail.com>
+Date: Wed, 9 Apr 2014 22:10:55 +0200
+Subject: [PATCH 4/5] use pkg-config for dvdnav
+
+---
+ configure | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/configure b/configure
+index 60fd308..bd09607 100755
+--- a/configure
++++ b/configure
+@@ -543,7 +543,6 @@ _xmms=no
+ _vcd=auto
+ _bluray=auto
+ _dvdnav=auto
+-_dvdnavconfig=dvdnav-config
+ _dvdreadconfig=dvdread-config
+ _dvdread=auto
+ _dvdread_internal=auto
+@@ -654,9 +653,6 @@ for ac_option do
+ --with-sdl-config=*)
+ _sdlconfig=$(echo $ac_option | cut -d '=' -f 2)
+ ;;
+- --with-dvdnav-config=*)
+- _dvdnavconfig=$(echo $ac_option | cut -d '=' -f 2)
+- ;;
+ --with-dvdread-config=*)
+ _dvdreadconfig=$(echo $ac_option | cut -d '=' -f 2)
+ ;;
+@@ -5190,13 +5186,13 @@ if test "$_dvdnav" = auto ; then
+ dvdnav_internal=yes
+ res_comment="internal"
+ else
+- $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
++ pkg-config dvdnavmini --libs >> $TMPLOG 2>&1 || _dvdnav=no
+ fi
+ fi
+ if test "$_dvdnav" = auto ; then
+ _dvdnav=no
+- _dvdnavdir=$($_dvdnavconfig --cflags)
+- _dvdnavlibs=$($_dvdnavconfig --libs)
++ _dvdnavdir=$(pkg-config dvdnav --cflags)
++ _dvdnavlibs=$(pkg-config dvdnav --libs)
+ statement_check_broken stdint.h dvdnav/dvdnav.h 'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes
+ fi
+ if test "$_dvdnav" = yes ; then
+@@ -5205,8 +5201,8 @@ if test "$_dvdnav" = yes ; then
+ cflags_libdvdnav="-Ilibdvdnav"
+ inputmodules="dvdnav(internal) $inputmodules"
+ else
+- extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)"
+- extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)"
++ extra_cflags="$extra_cflags $(pkg-config dvdnav --cflags)"
++ extra_ldflags="$extra_ldflags $(pkg-config dvdnavmini --libs)"
+ inputmodules="dvdnav $inputmodules"
+ fi
+ else
+--
+1.7.10.4
+
diff --git a/0005-switch_title-switch-to-next-title-if-no-parameter-pa.patch b/0005-switch_title-switch-to-next-title-if-no-parameter-pa.patch
new file mode 100644
index 000000000000..18499dd21019
--- /dev/null
+++ b/0005-switch_title-switch-to-next-title-if-no-parameter-pa.patch
@@ -0,0 +1,31 @@
+From ca92ebbd3f11123719463325f20028b9a3520969 Mon Sep 17 00:00:00 2001
+From: Emmanuel Anne <emmanuel.anne@gmail.com>
+Date: Wed, 9 Apr 2014 23:07:41 +0200
+Subject: [PATCH 5/5] switch_title: switch to next title if no parameter
+ passed
+
+---
+ stream/stream_dvdnav.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
+index 6bdc59d..1a94249 100644
+--- a/stream/stream_dvdnav.c
++++ b/stream/stream_dvdnav.c
+@@ -879,6 +879,13 @@ void mp_dvdnav_switch_title (stream_t *stream, int title) {
+ uint32_t titles;
+
+ dvdnav_get_number_of_titles (priv->dvdnav, &titles);
++ if (title <= 0) {
++ /* No parameter -> switch to next title or return to title 1 if the end */
++ int tit, part;
++ dvdnav_current_title_info(priv->dvdnav, &tit, &part);
++ title = tit+1;
++ }
++ if (title > titles) title = 1;
+ if (title > 0 && title <= titles)
+ dvdnav_title_play (priv->dvdnav, title);
+ }
+--
+1.7.10.4
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..85e12379dd8a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,113 @@
+# Maintainer: Gustavo Alvarez <s1lpkn07@gmail.com>
+
+pkgname=mplayer2-build-git
+pkgver=2.0.728.g2c378c7
+pkgrel=6
+pkgdesc="A movie player for linux (uses statically linked libav). (GIT version)"
+arch=('i686' 'x86_64')
+depends=('a52dec' 'desktop-file-utils' 'directfb' 'enca' 'faad2' 'fribidi' 'jack' 'lcms2' 'libbluray' 'libbs2b' 'libcaca' 'libcdio-paranoia' 'libdca' 'libgl' 'libmng'
+ 'libdv' 'libdvdnav' 'libdvdcss' 'libmad' 'libpulse' 'libquvi' 'libtheora' 'libvdpau' 'libxv' 'libxinerama' 'libxss' 'libxxf86vm' 'lirc-utils' 'mpg123'
+ 'nut-multimedia-git' 'portaudio' 'rsound' 'smbclient' 'speex' 'ttf-font' 'xvidcore')
+license=('GPL')
+url="http://www.mplayer2.org/"
+makedepends=('git' 'live-media' 'mesa' 'python' 'python-docutils' 'vstream-client' 'yasm')
+backup=('etc/mplayer/codecs.conf'
+ 'etc/mplayer/input.conf')
+provides=('mplayer' 'mplayer2')
+conflicts=('mplayer' 'mplayer2')
+replaces=('mplayer' 'mplayer2')
+options=('!emptydirs')
+source=('http://ftp.mplayer2.org/pub/release/mplayer2-2.0.tar.xz'
+ 'git://git.mplayer2.org/mplayer2-build.git'
+ 'git://git.mplayer2.org/mplayer2.git'
+ 'libav::git://repo.or.cz/FFMpeg-mirror/mplayer-patches.git'
+ 'git+https://github.com/libass/libass.git'
+ 'http://devel.mplayer2.org/raw-attachment/ticket/265/0004-use-pkg-config-for-dvdnav.patch'
+ 'http://devel.mplayer2.org/raw-attachment/ticket/265/0005-switch_title-switch-to-next-title-if-no-parameter-pa.patch'
+ 'stream_dvdnav.diff'
+ 'giflib-5.0.patch'
+ 'giflib-5.1.patch'
+ 'libquvi-0.9.patch'
+ 'include-samba-4.0.patch')
+noextract=('mplayer2-2.0.tar.xz')
+sha1sums=('0df8d4e5484128b7b28029273b7704ab5d5419bc'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'a073d296dbebfd9caead117eb0edefe317a97fd8'
+ '901d3a80e6c69f1f804c102d1c5b7b294e8d30c9'
+ '0d06ab2bdde0fdabe750ae528b0351149e9640e5'
+ 'f8b33a47c4aae10fdd6de246667dd0f7900a3142'
+ '85d54b02f6f59fa9bd785d403c852031dcb517af'
+ '06919a6dc0ae8db9e8ab50b55bb83a26445de51d'
+ '8c2fc1526a413cd821b46fd48ea08364abbf5c4c')
+
+install=mplayer2-build-git.install
+_gitname="mplayer2-build"
+
+pkgver() {
+ cd "${srcdir}/mplayer2"
+ echo "$(git describe --always | tr - . | tr -d v)"
+}
+
+prepare() {
+ cd "${_gitname}"
+ git submodule init
+ git config submodule.mplayer.url "${srcdir}/mplayer2"
+ git config submodule.libass.url "${srcdir}/libass"
+ git config submodule.libav.url "${srcdir}/libav"
+ ./init
+
+
+ # Install language sources to "i18n"
+ bsdtar -xf "${srcdir}/mplayer2-2.0.tar.xz" mplayer2-2.0/po
+ rm -fr mplayer/po
+ mv mplayer2-2.0/po mplayer/po
+ rm -fr mplayer2-2.0
+
+ cd mplayer
+
+ # Patch to use pkg-config method to get libdvdread/libdvdnav libs/headers info instead dvdnav-config/dvdread-config
+ patch -p1 -i ../../0004-use-pkg-config-for-dvdnav.patch
+ patch -p1 -i ../../0005-switch_title-switch-to-next-title-if-no-parameter-pa.patch
+
+ # Fix build with libdvdnav-git
+ if [ "$(pkg-config --modversion dvdnav)" != "4.2.1" ]; then
+ msg2 "libdvdnav-git is installed: patching sources"
+ patch -p1 -i ../../stream_dvdnav.diff
+ fi
+
+ # Fix build with giflib 5.1.x
+ patch -p1 -i ../../giflib-5.0.patch
+ patch -p1 -i ../../giflib-5.1.patch
+
+ # use libquvi 0.9x series
+ patch -p1 -i ../../libquvi-0.9.patch
+
+ # Fix samba includes
+ patch -p1 -i ../../include-samba-4.0.patch
+
+
+ # Make Mplayer2 build flags
+ echo '--confdir=/etc/mplayer
+--enable-translation
+--language=all
+--prefix=/usr
+--enable-joystick
+--enable-gif' > ../mplayer_options
+}
+
+build() {
+ make -C mplayer2-build
+}
+
+package() {
+ cd mplayer2-build
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 mplayer/etc/{codecs,input,example}.conf "${pkgdir}/etc/mplayer/"
+ install -Dm644 mplayer/etc/mplayer.desktop "${pkgdir}/usr/share/applications/mplayer.desktop"
+ install -Dm644 mplayer/etc/mplayer.xpm "${pkgdir}/usr/share/pixmaps/mplayer.xpm"
+ sed -e 's|gmplayer|mplayer|' -e 's|GTK;||' -i "${pkgdir}/usr/share/applications/mplayer.desktop"
+ echo 'NoDisplay=true' >> "${pkgdir}/usr/share/applications/mplayer.desktop"
+}
diff --git a/giflib-5.0.patch b/giflib-5.0.patch
new file mode 100644
index 000000000000..9eaa6e98e1fc
--- /dev/null
+++ b/giflib-5.0.patch
@@ -0,0 +1,111 @@
+diff --git a/libvo/vo_gif89a.c b/libvo/vo_gif89a.c
+index b808f81..c61d86c 100644
+--- a/libvo/vo_gif89a.c
++++ b/libvo/vo_gif89a.c
+@@ -196,7 +196,11 @@ static int config(uint32_t s_width, uint32_t s_height, uint32_t d_width,
+ mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: Some functionality has been disabled.\n");
+ #endif
+
++#if GIFLIB_MAJOR > 4
++ new_gif = EGifOpenFileName(gif_filename, 0, NULL);
++#else
+ new_gif = EGifOpenFileName(gif_filename, 0);
++#endif
+ if (new_gif == NULL) {
+ mp_msg(MSGT_VO, MSGL_ERR, "GIF89a: error opening file \"%s\" for output.\n", gif_filename);
+ return 1;
+@@ -215,7 +219,11 @@ static int config(uint32_t s_width, uint32_t s_height, uint32_t d_width,
+ return 1;
+ }
+
++#if GIFLIB_MAJOR > 4
++ reduce_cmap = GifMakeMapObject(256, NULL);
++#else
+ reduce_cmap = MakeMapObject(256, NULL);
++#endif
+ if (reduce_cmap == NULL) {
+ free(slice_data); slice_data = NULL;
+ free(reduce_data); reduce_data = NULL;
+@@ -267,7 +275,11 @@ static int gif_reduce(int width, int height, uint8_t *src, uint8_t *dst, GifColo
+ }
+
+ R = Ra; G = Ga; B = Ba;
++#if GIFLIB_MAJOR > 4
++ return GifQuantizeBuffer(width, height, &size, R, G, B, dst, colors);
++#else
+ return QuantizeBuffer(width, height, &size, R, G, B, dst, colors);
++#endif
+ }
+
+ static void flip_page(void)
+@@ -365,8 +377,11 @@ static void uninit(void)
+ free(gif_filename);
+ free(slice_data);
+ free(reduce_data);
++#if GIFLIB_MAJOR > 4
++ if (reduce_cmap != NULL) GifFreeMapObject(reduce_cmap);
++#else
+ if (reduce_cmap != NULL) FreeMapObject(reduce_cmap);
+-
++#endif
+ // set the pointers back to null.
+ new_gif = NULL;
+ gif_filename = NULL;
+
+diff --git a/configure b/configure
+index 95a5ae8..d9c826f 100755
+--- a/configure
++++ b/configure
+@@ -3659,6 +3659,7 @@ if test "$_gif" = auto ; then
+ _gif=no
+ for _ld_gif in "-lungif" "-lgif" ; do
+ statement_check gif_lib.h 'QuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _gif=yes && break
++ statement_check gif_lib.h 'GifQuantizeBuffer(0, 0, 0, 0, 0, 0, 0, 0)' $_ld_gif && _gif=yes && break
+ done
+ fi
+
+diff --git a/libmpdemux/demux_gif.c b/libmpdemux/demux_gif.c
+index eee7a85..a764474 100644
+--- a/libmpdemux/demux_gif.c
++++ b/libmpdemux/demux_gif.c
+@@ -44,6 +44,16 @@ typedef struct {
+
+ #define GIF_SIGNATURE (('G' << 16) | ('I' << 8) | 'F')
+
++static void PrintGifError(errcode)
++{
++ char *Err = GifErrorString(errcode);
++
++ if (Err != NULL)
++ fprintf(stderr, "\nGIF-LIB error: %s.\n", Err);
++ else
++ fprintf(stderr, "\nGIF-LIB undefined error %d.\n", errcode);
++}
++
+ #ifndef CONFIG_GIF_TVT_HACK
+ // not supported by certain versions of the library
+ static int my_read_gif(GifFileType *gif, uint8_t *buf, int len)
+@@ -240,6 +250,7 @@ static demuxer_t* demux_open_gif(demuxer_t* demuxer)
+ gif_priv_t *priv = calloc(1, sizeof(gif_priv_t));
+ sh_video_t *sh_video = NULL;
+ GifFileType *gif = NULL;
++ int GifError;
+
+ priv->current_pts = 0;
+ demuxer->seekable = 0; // FIXME
+@@ -254,12 +265,12 @@ static demuxer_t* demux_open_gif(demuxer_t* demuxer)
+ // not read from the beginning of the file and the command will fail.
+ // with this hack enabled, you will lose the ability to stream a GIF.
+ lseek(demuxer->stream->fd, 0, SEEK_SET);
+- gif = DGifOpenFileHandle(demuxer->stream->fd);
++ gif = DGifOpenFileHandle(demuxer->stream->fd, &GifError);
+ #else
+- gif = DGifOpen(demuxer->stream, my_read_gif);
++ gif = DGifOpen(demuxer->stream, my_read_gif, &GifError);
+ #endif
+ if (!gif) {
+- PrintGifError();
++ PrintGifError(GifError);
+ free(priv);
+ return NULL;
+ }
diff --git a/giflib-5.1.patch b/giflib-5.1.patch
new file mode 100644
index 000000000000..216c0c026b79
--- /dev/null
+++ b/giflib-5.1.patch
@@ -0,0 +1,38 @@
+diff -ur mplayer2/libmpdemux/demux_gif.c mplayer2-patched/libmpdemux/demux_gif.c
+--- mplayer2/libmpdemux/demux_gif.c 2014-06-15 23:14:22.159745049 +0400
++++ mplayer2-patched/libmpdemux/demux_gif.c 2014-06-15 23:18:06.329743015 +0400
+@@ -311,7 +311,15 @@
+ {
+ gif_priv_t *priv = demuxer->priv;
+ if (!priv) return;
++#if GIFLIB_MAJOR == 5
++ #if GIFLIB_MINOR >= 1
++ if (priv->gif && DGifCloseFile(priv->gif, NULL) == GIF_ERROR)
++ #else
++ if (priv->gif && DGifCloseFile(priv->gif) == GIF_ERROR)
++ #endif
++#else
+ if (priv->gif && DGifCloseFile(priv->gif) == GIF_ERROR)
++#endif
+ PrintGifError();
+ free(priv->refimg);
+ free(priv);
+diff -ur mplayer2/libvo/vo_gif89a.c mplayer2-patched/libvo/vo_gif89a.c
+--- mplayer2/libvo/vo_gif89a.c 2014-06-15 23:16:34.426410512 +0400
++++ mplayer2-patched/libvo/vo_gif89a.c 2014-06-15 23:15:41.833077660 +0400
+@@ -370,7 +370,15 @@
+ MPLAYER_VERSION, VO_GIF_REVISION,
+ "joey@nicewarrior.org");
+ EGifPutComment(new_gif, temp);
++#if GIFLIB_MAJOR == 5
++ #if GIFLIB_MINOR >= 1
++ EGifCloseFile(new_gif, NULL); // also frees gif storage space.
++ #else
+ EGifCloseFile(new_gif); // also frees gif storage space.
++ #endif
++#else
++ EGifCloseFile(new_gif); // also frees gif storage space.
++#endif
+ }
+
+ // free our allocated ram
diff --git a/include-samba-4.0.patch b/include-samba-4.0.patch
new file mode 100644
index 000000000000..2ed272b6a5f3
--- /dev/null
+++ b/include-samba-4.0.patch
@@ -0,0 +1,12 @@
+diff -rupN a/stream/stream_smb.c b/stream/stream_smb.c
+--- a/stream/stream_smb.c 2013-03-16 13:38:34.000000000 +0000
++++ b/stream/stream_smb.c 2013-10-31 20:05:32.473947926 +0000
+@@ -18,7 +18,7 @@
+
+ #include "config.h"
+
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include <unistd.h>
+
+ #include "mp_msg.h"
diff --git a/libquvi-0.9.patch b/libquvi-0.9.patch
new file mode 100644
index 000000000000..970022987ed1
--- /dev/null
+++ b/libquvi-0.9.patch
@@ -0,0 +1,97 @@
+diff -rupN a/configure b/configure
+--- a/configure 2014-02-24 19:37:11.154636312 +0100
++++ b/configure 2014-02-24 19:39:33.979771836 +0100
+@@ -3187,7 +3187,7 @@
+ echocheck "libquvi support"
+ if test "$_libquvi" = auto ; then
+ _libquvi=no
+- if pkg_config_add 'libquvi >= 0.4.1' ; then
++ if pkg_config_add 'libquvi-0.9' ; then
+ _libquvi=yes
+ fi
+ fi
+diff -rupN a/stream/quvi.c b/stream/quvi.c
+--- a/stream/quvi.c 2014-02-24 19:37:08.347929591 +0100
++++ b/stream/quvi.c 2014-02-24 19:40:08.693559705 +0100
+@@ -15,7 +15,7 @@
+ * with mplayer2. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+-#include <quvi/quvi.h>
++#include <quvi.h>
+
+ #include "talloc.h"
+ #include "mp_msg.h"
+@@ -24,19 +24,17 @@
+
+ struct mp_resolve_result *mp_resolve_quvi(const char *url, struct MPOpts *opts)
+ {
+- QUVIcode rc;
+-
+- quvi_t q;
+- rc = quvi_init(&q);
+- if (rc != QUVI_OK)
++ quvi_t q = quvi_new();
++ if (quvi_ok(q) == QUVI_FALSE)
+ return NULL;
+
+ // Don't try to use quvi on an URL that's not directly supported, since
+ // quvi will do a network access anyway in order to check for HTTP
+ // redirections etc.
+ // The documentation says this will fail on "shortened" URLs.
+- if (quvi_supported(q, (char *)url) != QUVI_OK) {
+- quvi_close(&q);
++ if (quvi_supports(q, (char *) url, QUVI_SUPPORTS_MODE_OFFLINE,
++ QUVI_SUPPORTS_TYPE_ANY) == QUVI_FALSE) {
++ quvi_free(q);
+ return NULL;
+ }
+
+@@ -48,13 +46,16 @@
+ // That call requires an extra net access. quvi_next_media_url() doesn't
+ // seem to do anything useful. So we can't really do anything useful
+ // except pass through the user's format setting.
+- quvi_setopt(q, QUVIOPT_FORMAT, opts->quvi_format);
+-
+- quvi_media_t m;
+- rc = quvi_parse(q, (char *)url, &m);
+- if (rc != QUVI_OK) {
+- mp_msg(MSGT_OPEN, MSGL_ERR, "[quvi] %s\n", quvi_strerror(q, rc));
+- quvi_close(&q);
++ quvi_media_t m = quvi_media_new(q, (char *) url);
++ if (quvi_ok(q) == QUVI_FALSE) {
++ mp_msg(MSGT_OPEN, MSGL_ERR, "[quvi] %s\n", quvi_errmsg(q));
++ quvi_free(q);
++ return NULL;
++ }
++ quvi_media_stream_select(m, opts->quvi_format);
++ if (quvi_ok(q) == QUVI_FALSE) {
++ mp_msg(MSGT_OPEN, MSGL_ERR, "[quvi] %s\n", quvi_errmsg(q));
++ quvi_free(q);
+ return NULL;
+ }
+
+@@ -62,15 +63,17 @@
+ talloc_zero(NULL, struct mp_resolve_result);
+
+ char *val;
+-
+- if (quvi_getprop(m, QUVIPROP_MEDIAURL, &val) == QUVI_OK)
++
++ quvi_media_get(m, QUVI_MEDIA_STREAM_PROPERTY_URL, &val);
++ if (quvi_ok(q) == QUVI_TRUE)
+ result->url = talloc_strdup(result, val);
+
+- if (quvi_getprop(m, QUVIPROP_PAGETITLE, &val) == QUVI_OK)
++ quvi_media_get(m, QUVI_MEDIA_PROPERTY_TITLE, &val);
++ if (quvi_ok(q) == QUVI_TRUE)
+ result->title = talloc_strdup(result, val);
+
+- quvi_parse_close(&m);
+- quvi_close(&q);
++ quvi_media_free(m);
++ quvi_free(q);
+
+ if (!result->url) {
+ talloc_free(result);
+
diff --git a/mplayer2-build-git.install b/mplayer2-build-git.install
new file mode 100644
index 000000000000..d3289ab64233
--- /dev/null
+++ b/mplayer2-build-git.install
@@ -0,0 +1,12 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
+
diff --git a/stream_dvdnav.diff b/stream_dvdnav.diff
new file mode 100644
index 000000000000..9b158c8f2c4b
--- /dev/null
+++ b/stream_dvdnav.diff
@@ -0,0 +1,20 @@
+--- a/stream/stream_dvdnav.c 2014-06-16 22:09:17.518315836 +0200
++++ b/stream/stream_dvdnav.c 2014-06-16 22:10:26.558605286 +0200
+@@ -715,13 +715,13 @@
+
+ format = dvdnav_audio_stream_format(priv->dvdnav, lg);
+ switch(format) {
+- case DVDNAV_FORMAT_AC3:
++ case DVD_AUDIO_FORMAT_AC3:
+ return index + 128;
+- case DVDNAV_FORMAT_DTS:
++ case DVD_AUDIO_FORMAT_DTS:
+ return index + 136;
+- case DVDNAV_FORMAT_LPCM:
++ case DVD_AUDIO_FORMAT_LPCM:
+ return index + 160;
+- case DVDNAV_FORMAT_MPEGAUDIO:
++ case DVD_AUDIO_FORMAT_MPEG2_EXT:
+ return index;
+ default:
+ return -1;