diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2004-08-29 21:38:24 +0000 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2004-08-29 21:38:24 +0000 |
commit | 6cdaa4bd151ee51aa1c82322b895a9c48ede8627 (patch) | |
tree | a827fa9c255665b6699b6cde76de31883f4f1fd1 /media-video/mplayer | |
parent | Added 'usr hotplug' to init script for bug #62091. (Manifest recommit) (diff) | |
download | gentoo-2-6cdaa4bd151ee51aa1c82322b895a9c48ede8627.tar.gz gentoo-2-6cdaa4bd151ee51aa1c82322b895a9c48ede8627.tar.bz2 gentoo-2-6cdaa4bd151ee51aa1c82322b895a9c48ede8627.zip |
jack related bugfix
Diffstat (limited to 'media-video/mplayer')
-rw-r--r-- | media-video/mplayer/ChangeLog | 6 | ||||
-rw-r--r-- | media-video/mplayer/files/mplayer-1.0_pre5-bio2jack.patch | 70 | ||||
-rw-r--r-- | media-video/mplayer/mplayer-1.0_pre5-r4.ebuild | 8 |
3 files changed, 81 insertions, 3 deletions
diff --git a/media-video/mplayer/ChangeLog b/media-video/mplayer/ChangeLog index d9c7cdb610bc..c8a6d2e7ef00 100644 --- a/media-video/mplayer/ChangeLog +++ b/media-video/mplayer/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-video/mplayer # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.201 2004/08/25 06:46:12 hardave Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/ChangeLog,v 1.202 2004/08/29 21:38:24 lu_zero Exp $ + + 29 Aug 2004; Luca Barbato <lu_zero@gentoo.org> + +files/mplayer-1.0_pre5-bio2jack.patch, mplayer-1.0_pre5-r4.ebuild: + Jack support 25 Aug 2004; Hardave Riar <hardave@gentoo.org> mplayer-1.0_pre5-r3.ebuild: Added ~mips keyword. diff --git a/media-video/mplayer/files/mplayer-1.0_pre5-bio2jack.patch b/media-video/mplayer/files/mplayer-1.0_pre5-bio2jack.patch new file mode 100644 index 000000000000..78a5f0e4b652 --- /dev/null +++ b/media-video/mplayer/files/mplayer-1.0_pre5-bio2jack.patch @@ -0,0 +1,70 @@ +Index: main/libao2/ao_jack.c +=================================================================== +RCS file: /cvsroot/mplayer/main/libao2/ao_jack.c,v +retrieving revision 1.2 +diff -u -r1.2 ao_jack.c +--- main/libao2/ao_jack.c 27 Jun 2004 13:18:06 -0000 1.2 ++++ main/libao2/ao_jack.c 10 Aug 2004 17:48:48 -0000 +@@ -34,8 +34,8 @@ + long JACK_Write(int deviceID, char *data, unsigned long bytes); /* returns the number of bytes written */ + long JACK_GetJackLatency(int deviceID); /* return the latency in milliseconds of jack */ + int JACK_SetState(int deviceID, enum status_enum state); /* playing, paused, stopped */ +-int JACK_SetVolume(int deviceID, int left, int right); /* returns 0 on success */ +-void JACK_GetVolume(int deviceID, int *left, int *right); ++int JACK_SetVolumeForChannel(int deviceID, unsigned int channel, unsigned int volume); /* return 0 on success */ ++void JACK_GetVolumeForChannel(int deviceID, unsigned int channel, unsigned int *volume); + // + + +@@ -57,9 +57,10 @@ + case AOCONTROL_GET_VOLUME: + { + ao_control_vol_t *vol = (ao_control_vol_t *)arg; +- int l, r; ++ unsigned int l, r; + +- JACK_GetVolume(driver, &l, &r); ++ JACK_GetVolumeForChannel(driver, 0, &l); ++ JACK_GetVolumeForChannel(driver, 1, &r); + vol->left = (float )l; + vol->right = (float )r; + +@@ -68,16 +69,21 @@ + case AOCONTROL_SET_VOLUME: + { + ao_control_vol_t *vol = (ao_control_vol_t *)arg; +- int l = (int )vol->left, ++ unsigned int l = (int )vol->left, + r = (int )vol->right, + err = 0; + +- if((err = JACK_SetVolume(driver, l, r))) { ++ if((err = JACK_SetVolumeForChannel(driver, 0, l))) { + mp_msg(MSGT_AO, MSGL_ERR, +- "AO: [Jack] Setting volume failed, error %d\n",err); ++ "AO: [Jack] Setting left volume failed, error %d\n",err); + return CONTROL_ERROR; + } +- ++ if((err = JACK_SetVolumeForChannel(driver, 1, r))) { ++ mp_msg(MSGT_AO, MSGL_ERR, ++ "AO: [Jack] Setting right volume failed, error %d\n",err); ++ return CONTROL_ERROR; ++ } ++ + return CONTROL_OK; + } + } +--- main/configure.~1.893.~ 2004-08-09 15:51:44.000000000 +0300 ++++ main/configure 2004-08-10 20:41:00.000000000 +0300 +@@ -4187,7 +4187,9 @@ + #include <jack/jack.h> + int main(void) { JACK_Init(); return 0; } + EOF +- if test -z "$_bio2jackdir" ; then ++ if ( ( test ! `bio2jack-config --version|cut -d"." -f2` -ge "2" ) ) ; then ++ _jack=no; ++ elif test -z "$_bio2jackdir" ; then + cc_check -lbio2jack `pkg-config --libs --cflags jack` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _jack=yes + else + cc_check -L "$_bio2jackdir" -lbio2jack `pkg-config --libs --cflags jack` && ( "$TMPO" >> "$TMPLOG" 2>&1 ) && _jack=yes diff --git a/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild b/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild index 2c79a7324d44..b32ee6758419 100644 --- a/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild +++ b/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild,v 1.1 2004/08/22 07:34:59 chriswhite Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0_pre5-r4.ebuild,v 1.2 2004/08/29 21:38:24 lu_zero Exp $ inherit eutils flag-o-matic kmod -IUSE="3dfx 3dnow 3dnowex aalib alsa altivec arts bidi debug divx4linux doc dvb cdparanoia directfb dvd dvdread edl encode esd fbcon gif ggi gtk i8x0 ipv6 joystick jpeg libcaca lirc live lzo mad matroska matrox mpeg mmx mmx2 mythtv nas network nls nvidia oggvorbis opengl oss png rtc samba sdl sse sse2 svga tga theora truetype v4l v4l2 X xinerama xmms xv xvid xvmc" +IUSE="3dfx 3dnow 3dnowex aalib alsa altivec arts bidi debug divx4linux doc dvb cdparanoia directfb dvd dvdread edl encode esd fbcon gif ggi gtk i8x0 ipv6 jack joystick jpeg libcaca lirc live lzo mad matroska matrox mpeg mmx mmx2 mythtv nas network nls nvidia oggvorbis opengl oss png rtc samba sdl sse sse2 svga tga theora truetype v4l v4l2 X xinerama xmms xv xvid xvmc" BLUV=1.4 SVGV=1.9.17 @@ -71,6 +71,7 @@ RDEPEND="xvid? ( >=media-libs/xvid-0.9.0 ) ) truetype? ( >=media-libs/freetype-2.1 ) xinerama? ( virtual/x11 ) + jack? ( >=dev-libs/bio2jack-0.2 ) xmms? ( media-sound/xmms ) >=sys-apps/portage-2.0.36" @@ -160,6 +161,8 @@ src_unpack() { # Remove kernel-2.6 workaround as the problem it works around is # fixed, and the workaround breaks sparc use sparc && sed -i 's:#define __KERNEL__::' osdep/kerneltwosix.h + # Doesn't break if bio2jack is in + epatch ${FILESDIR}/${P}-bio2jack.patch } src_compile() { @@ -208,6 +211,7 @@ src_compile() { myconf="${myconf} $(use_enable truetype freetype)" myconf="${myconf} $(use_enable v4l tv-v4l)" myconf="${myconf} $(use_enable v4l2 tv-v4l2)" + myconf="${myconf} $(use_enable jack)" ######### # Codecs # |