summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authordan <dan>2003-05-25 07:12:54 +0000
committerdan <dan>2003-05-25 07:12:54 +0000
commita1073b53847f6baddcdc2b5b53429844c2dd1773 (patch)
tree1b29f3a31b9913bdc05411932665a7861611593b /graphics
parent21c8071a4ce2f7736b771dfa7d1822f142ba4bce (diff)
downloadpkgsrc-a1073b53847f6baddcdc2b5b53429844c2dd1773.tar.gz
make audio capture for -tv work on NetBSD.
We don't provide FIONREAD for /dev/audio, so use the seek field from AUDIO_GETINFO instead. XXX: by my calculations, the number of samples in seek should be multiplied by the sample size to get number of bytes to read, but this results in mencoder being very choppy, presumably because its blocking for audio. I've left the multiplication in the patch, commented out. The present patch works just fine, so probably my calculations are wrong. This bumps all of the mplayer variants, because -tv -dumpaudio might be used even with the players.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/mplayer-share/distinfo3
-rw-r--r--graphics/mplayer-share/patches/patch-ae42
2 files changed, 44 insertions, 1 deletions
diff --git a/graphics/mplayer-share/distinfo b/graphics/mplayer-share/distinfo
index 545e244ebfc..512bebacc3e 100644
--- a/graphics/mplayer-share/distinfo
+++ b/graphics/mplayer-share/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.23 2003/04/09 17:19:14 drochner Exp $
+$NetBSD: distinfo,v 1.24 2003/05/25 07:12:54 dan Exp $
SHA1 (mplayer/MPlayer-0.90.tar.bz2) = 01be27d68a250be814af5f090e8a217c1f4838a8
Size (mplayer/MPlayer-0.90.tar.bz2) = 3436463 bytes
@@ -12,3 +12,4 @@ SHA1 (patch-aa) = 6938dbdccb9b760dadad304f3bf61245e8b1baa6
SHA1 (patch-ab) = f2fd9006914a7d1bac364be74ca5d7cb9aab6806
SHA1 (patch-ac) = 3539a185ff74922f8ce6da3187ca443334fa2d78
SHA1 (patch-ad) = ec670b03f010b5f9983e518c1bbd77d5601ef4a1
+SHA1 (patch-ae) = 12d16a7dda6be9d950d09d23d41d0de03ca70425
diff --git a/graphics/mplayer-share/patches/patch-ae b/graphics/mplayer-share/patches/patch-ae
new file mode 100644
index 00000000000..756413cf18c
--- /dev/null
+++ b/graphics/mplayer-share/patches/patch-ae
@@ -0,0 +1,42 @@
+$NetBSD: patch-ae,v 1.1 2003/05/25 07:12:55 dan Exp $
+
+--- libmpdemux/tvi_bsdbt848.c.orig 2003-01-15 05:20:17.000000000 +1100
++++ libmpdemux/tvi_bsdbt848.c 2003-05-25 16:40:00.000000000 +1000
+@@ -41,6 +41,7 @@
+
+ #ifdef __NetBSD__
+ #include <dev/ic/bt8xx.h>
++#include <sys/audioio.h>
+ #else
+ #include <machine/ioctl_meteor.h>
+ #include <machine/ioctl_bt848.h>
+@@ -777,14 +778,29 @@
+ 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 wont go do anything else until it gets it :( */