diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-01-02 14:24:45 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-01-02 14:24:45 +0000 |
commit | 1b989de663ac3638df833c32b44f37494d595660 (patch) | |
tree | 6d5e33d713b3f00b45afb8f865005124e69c513d /libmpdemux | |
parent | e49b225d51458ec021afd2e8bb779103a37837fc (diff) |
sync with netbsd ports: audio grabbing support fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11726 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/tvi_bsdbt848.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libmpdemux/tvi_bsdbt848.c b/libmpdemux/tvi_bsdbt848.c index baf8f4d08d..e6640c218c 100644 --- a/libmpdemux/tvi_bsdbt848.c +++ b/libmpdemux/tvi_bsdbt848.c @@ -42,6 +42,7 @@ #include <sys/param.h> #ifdef __NetBSD__ #include <dev/ic/bt8xx.h> +#include <sys/audioio.h> #elif __FreeBSD_version >= 502100 #include <dev/bktr/ioctl_meteor.h> #include <dev/bktr/ioctl_bt848.h> @@ -789,14 +790,27 @@ return(priv->dspbytesread * 1.0 / priv->dsprate); static int get_audio_framesize(priv_t *priv) { int bytesavail; +#ifdef __NetBSD__ +struct audio_info auinf; +#endif if(priv->dspready == FALSE) return 0; +#ifdef __NetBSD__ +if(ioctl(priv->dspfd, AUDIO_GETINFO, &auinf) < 0) + { + perror("AUDIO_GETINFO"); + return(TVI_CONTROL_FALSE); + } +else + bytesavail = auinf.record.seek; /* *priv->dspsamplesize; */ +#else if(ioctl(priv->dspfd, FIONREAD, &bytesavail) < 0) { perror("FIONREAD"); return(TVI_CONTROL_FALSE); } +#endif /* When mencoder wants audio data, it wants data.. it won't go do anything else until it gets it :( */ |