diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2011-10-24 13:06:05 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2011-10-24 13:06:05 +0000 |
commit | 3152368bbdfc32c29d1e0f877d74636e65059b75 (patch) | |
tree | c82e23ac2f8100a0c25f24ba68c1dca75e4b123f /multimedia | |
parent | 4d4bae6cbbb9bd16e4a4ec4e1c94b6c787fa8c2a (diff) | |
download | pkgsrc-3152368bbdfc32c29d1e0f877d74636e65059b75.tar.gz |
If AUDIO_GETBUFINFO is available, use it whenever possible in preference
to AUDIO_GETINFO. This should reduce playback CPU usage.
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/gmplayer/Makefile | 4 | ||||
-rw-r--r-- | multimedia/mplayer-share/distinfo | 3 | ||||
-rw-r--r-- | multimedia/mplayer-share/patches/patch-libao2_ao_sun.c | 51 | ||||
-rw-r--r-- | multimedia/mplayer/Makefile | 4 |
4 files changed, 57 insertions, 5 deletions
diff --git a/multimedia/gmplayer/Makefile b/multimedia/gmplayer/Makefile index 8aff7478b94..abbe9f86243 100644 --- a/multimedia/gmplayer/Makefile +++ b/multimedia/gmplayer/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.92 2011/10/20 04:00:07 obache Exp $ +# $NetBSD: Makefile,v 1.93 2011/10/24 13:06:05 jmcneill Exp $ # # NOTE: if you are updating both mplayer and gmplayer, you must ensure @@ -9,7 +9,7 @@ # PKGNAME= gmplayer-${MPLAYER_VERSION} -PKGREVISION= 8 +PKGREVISION= 9 SKIN_SITES= http://www1.mplayerhq.hu/MPlayer/skins/ \ http://www2.mplayerhq.hu/MPlayer/skins/ \ diff --git a/multimedia/mplayer-share/distinfo b/multimedia/mplayer-share/distinfo index 3a52d31901b..333611248d8 100644 --- a/multimedia/mplayer-share/distinfo +++ b/multimedia/mplayer-share/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.72 2011/10/18 16:04:36 drochner Exp $ +$NetBSD: distinfo,v 1.73 2011/10/24 13:06:05 jmcneill Exp $ SHA1 (mplayer/mplayer-20100913.tar.bz2) = 6fd3acb29fa8455636bcd86f9f333da4763daa6d RMD160 (mplayer/mplayer-20100913.tar.bz2) = 79085d4ebdb824fc34f7bc128070ef11e874897d @@ -12,6 +12,7 @@ SHA1 (patch-ag) = bef25568c913dcb8535afa51976ce7c94a6af5a2 SHA1 (patch-ah) = dcfc26ec1422581a03ab200cb95926f6fd896d5b SHA1 (patch-an) = 3e72fb86abe7ab572f12a4fef002edb623ab6fae SHA1 (patch-ar) = df7e7cdc6fb8187bbcf0b285afc14d275a51e17a +SHA1 (patch-libao2_ao_sun.c) = 14eedc06f70dd949da1fb84078877e7cf259eff1 SHA1 (patch-stream_dvb_tune.c) = b663830ff64ab31488684b1a324da50ab52d68cc SHA1 (patch-stream_dvbin.h) = 56f6e71fcdf6bf3afccbdbc8682834c806114677 SHA1 (patch-vb) = ce584c31e0e32865e87aa1f537a1f9e4817c7442 diff --git a/multimedia/mplayer-share/patches/patch-libao2_ao_sun.c b/multimedia/mplayer-share/patches/patch-libao2_ao_sun.c new file mode 100644 index 00000000000..b0a55e6a56c --- /dev/null +++ b/multimedia/mplayer-share/patches/patch-libao2_ao_sun.c @@ -0,0 +1,51 @@ +$NetBSD: patch-libao2_ao_sun.c,v 1.1 2011/10/24 13:06:05 jmcneill Exp $ + +--- libao2/ao_sun.c.orig 2010-02-20 21:02:49.000000000 +0000 ++++ libao2/ao_sun.c +@@ -40,6 +40,10 @@ + #include <stropts.h> + #endif + ++#ifndef AUDIO_GETBUFINFO ++#define AUDIO_GETBUFINFO AUDIO_GETINFO ++#endif ++ + #include "config.h" + #include "mixer.h" + +@@ -164,7 +168,7 @@ static int realtime_samplecounter_availa + goto error; + } + +- if (ioctl(fd, AUDIO_GETINFO, &info)) { ++ if (ioctl(fd, AUDIO_GETBUFINFO, &info)) { + if ( mp_msg_test(MSGT_AO,MSGL_V) ) + perror("rtsc: GETINFO1"); + goto error; +@@ -186,7 +190,7 @@ static int realtime_samplecounter_availa + if (usec_delay > 200000) + break; + +- if (ioctl(fd, AUDIO_GETINFO, &info)) { ++ if (ioctl(fd, AUDIO_GETBUFINFO, &info)) { + if ( mp_msg_test(MSGT_AO,MSGL_V) ) + perror("rtsc: GETINFO2 failed"); + goto error; +@@ -650,7 +654,7 @@ static int get_space(void){ + } + #endif + +- ioctl(audio_fd, AUDIO_GETINFO, &info); ++ ioctl(audio_fd, AUDIO_GETBUFINFO, &info); + #if !defined (__OpenBSD__) && !defined(__NetBSD__) + if (queued_bursts - info.play.eof > 2) + return 0; +@@ -684,7 +688,7 @@ static int play(void* data,int len,int f + // return: delay in seconds between first and last sample in buffer + static float get_delay(void){ + audio_info_t info; +- ioctl(audio_fd, AUDIO_GETINFO, &info); ++ ioctl(audio_fd, AUDIO_GETBUFINFO, &info); + #if defined (__OpenBSD__) || defined(__NetBSD__) + return (float) info.play.seek/ (float)byte_per_sec ; + #else diff --git a/multimedia/mplayer/Makefile b/multimedia/mplayer/Makefile index 7d3658624a4..b71859c9d9b 100644 --- a/multimedia/mplayer/Makefile +++ b/multimedia/mplayer/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.80 2011/10/18 16:04:35 drochner Exp $ +# $NetBSD: Makefile,v 1.81 2011/10/24 13:06:05 jmcneill Exp $ PKGNAME= mplayer-${MPLAYER_VERSION} -PKGREVISION= 8 +PKGREVISION= 9 COMMENT= Fast, cross-platform movie player |