openbsd-ports/graphics/fxtv/patches/patch-tvcapture_c
2003-03-01 03:28:12 +00:00

60 lines
2.4 KiB
Plaintext

$OpenBSD: patch-tvcapture_c,v 1.4 2003/03/01 03:28:12 pvalchev Exp $
--- tvcapture.c.orig Mon Feb 12 11:59:22 2001
+++ tvcapture.c Fri Feb 28 19:54:30 2003
@@ -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>
@@ -492,9 +493,7 @@ void TVCAPTURESetInputDevice( TV_CAPTURE
case TV_DEVICE_VIDEO : arg = METEOR_INPUT_DEV0; break;
case TV_DEVICE_SVIDEO : arg = METEOR_INPUT_DEV_SVIDEO; break;
case TV_DEVICE_CSVIDEO : arg = METEOR_INPUT_DEV2; break;
-#ifdef METEOR_INPUT_DEV3
case TV_DEVICE_DEV3 : arg = METEOR_INPUT_DEV3; break;
-#endif
default :
fprintf( stderr, "TVCAPTURESetInputDevice(): Bad value %d\n",
dev );
@@ -520,8 +519,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 +559,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 +722,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;
}
}
@@ -811,9 +805,7 @@ TV_BOOL TVCAPTUREQueryDriverState( TV_CA
case METEOR_INPUT_DEV1 : s->input_dev = TV_DEVICE_TUNER ; break;
case METEOR_INPUT_DEV_SVIDEO : s->input_dev = TV_DEVICE_SVIDEO ; break;
case METEOR_INPUT_DEV2 : s->input_dev = TV_DEVICE_CSVIDEO; break;
-#ifdef METEOR_INPUT_DEV3
case METEOR_INPUT_DEV3 : s->input_dev = TV_DEVICE_DEV3 ; break;
-#endif
default :
fprintf( stderr, "TVCAPTUREQueryDriverState(): Bad INPUT %ld\n",
larg );