openbsd-ports/graphics/fxtv/patches/patch-tvcapture_c
naddy 87674e8f6a Complete overhaul of this port.
Submitted by Wilbern Cobb <vedge@csoft.org>.
2002-02-02 00:52:18 +00:00

57 lines
2.0 KiB
Plaintext

$OpenBSD: patch-tvcapture_c,v 1.1 2002/02/02 00:52:18 naddy Exp $
--- tvcapture.c.orig Mon Feb 12 14:59:22 2001
+++ tvcapture.c Wed Aug 15 13:46:30 2001
@@ -35,7 +35,8 @@
#include <fcntl.h>
#include <errno.h>
#include <sys/mman.h>
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+# include <sys/ioctl.h>
# include <dev/ic/bt8xx.h>
#else
# include <machine/ioctl_bt848.h>
@@ -520,8 +521,6 @@ void TVCAPTURESetInputDevice( TV_CAPTURE
case TV_AUDIO_INPUT_INTERN : arg = AUDIO_INTERN; break;
}
if ( ioctl( c->tfd, BT848_SAUDIO, &arg ) < 0 ) {
- fprintf( stderr, "ioctl(BT848_SAUDIO, %d) failed: %s\n",
- arg, strerror(errno) );
return;
}
}
@@ -562,8 +561,6 @@ void TVCAPTURESetAudioInputDevice( TV_CA
/* to keep that setting whenever it wants to change the setting. */
if ( dev != TV_AUDIO_INPUT_AUTO ) {
if ( ioctl( c->tfd, BT848_SAUDIO, &arg ) < 0 ) {
- fprintf( stderr, "ioctl(BT848_SAUDIO, %d) failed: %s\n",
- arg, strerror(errno) );
return;
}
c->audio_input_dev = dev;
@@ -727,7 +724,6 @@ void TVCAPTURESetAudioMute( TV_CAPTURE *
/* Don't change audio source; just mute it */
if ( ioctl( c->tfd, BT848_SAUDIO, &arg ) < 0 ) {
- DO_IOCTL_SERR( "BT848_SAUDIO", arg );
return;
}
}
@@ -1729,7 +1725,7 @@ TV_BOOL TVCAPTUREConfigure( TV_CAPTURE
goto RETURN;
}
- if ( c->xfer_mode == TV_TRANSFER_DIRECT )
+ if ( c->xfer_mode == TV_TRANSFER_DIRECT ) {
if ( !( x->visual_modes[ x->active_visual ] & TV_TRANSFER_DIRECT )) {
strcpy( S_err_msg, "Active visual does not support direct video");
goto RETURN;
@@ -1738,6 +1734,7 @@ TV_BOOL TVCAPTUREConfigure( TV_CAPTURE
strcpy( S_err_msg, "Direct transfer only supported for video" );
goto RETURN;
}
+ }
/* Get capture geometry */
if ( c->xfer_mode == TV_TRANSFER_DIRECT ) {