[Mplayer-cvslog] CVS: main/libmpdemux tvi_bsdbt848.c,1.10,1.11
Alex Beregszaszi
alex at mplayerhq.hu
Fri Jan 2 15:24:48 CET 2004
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/tmp/cvs-serv10100
Modified Files:
tvi_bsdbt848.c
Log Message:
sync with netbsd ports: audio grabbing support fixed
Index: tvi_bsdbt848.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/tvi_bsdbt848.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- tvi_bsdbt848.c 2 Jan 2004 14:03:31 -0000 1.10
+++ tvi_bsdbt848.c 2 Jan 2004 14:24:45 -0000 1.11
@@ -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 @@
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 :( */
More information about the MPlayer-cvslog
mailing list