Line 0
Link Here
|
|
|
1 |
--- tvsim/tvsim_main.c.orig Fri Jul 30 16:37:05 2004 |
2 |
+++ tvsim/tvsim_main.c Fri Jul 30 17:00:10 2004 |
3 |
@@ -63,6 +63,9 @@ |
4 |
#include "tvsim/tvsim_gui.h" |
5 |
#include "tvsim/tvsim_version.h" |
6 |
|
7 |
+#if defined(__FreeBSD__) || defined(__NetBSD__) |
8 |
+#include <machine/ioctl_bt848.h> |
9 |
+#endif |
10 |
|
11 |
// prior to 8.4 there's a SEGV when evaluating const scripts (Tcl tries to modify the string) |
12 |
#if (TCL_MAJOR_VERSION > 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)) |
13 |
@@ -493,7 +496,6 @@ |
14 |
} |
15 |
|
16 |
#else // __NetBSD__ || __FreeBSD__ |
17 |
- char * pDevName; |
18 |
ulong lfreq; |
19 |
uint norm; |
20 |
bool result = FALSE; |
21 |
@@ -505,26 +507,26 @@ |
22 |
{ |
23 |
if ( (*pIsTuner) && (lfreq != 0) ) |
24 |
{ |
25 |
- if (tuner_fd != -1) |
26 |
+ if (video_fd != -1) |
27 |
{ |
28 |
// mute audio |
29 |
int mute_arg = AUDIO_MUTE; |
30 |
- if (ioctl (tuner_fd, BT848_SAUDIO, &mute_arg) == 0) |
31 |
+ if (ioctl (video_fd, BT848_SAUDIO, &mute_arg) == 0) |
32 |
{ |
33 |
dprintf0("Muted tuner audio.\n"); |
34 |
} |
35 |
else |
36 |
- fprintf(stderr, "muting audio (ioctl AUDIO_MUTE)\n", strerror(errno)); |
37 |
+ fprintf(stderr, "muting audio (ioctl AUDIO_MUTE): %s\n", strerror(errno)); |
38 |
|
39 |
// Set the tuner frequency |
40 |
- if(ioctl(tuner_fd, VIDIOCSFREQ, &lfreq) == 0) |
41 |
+ if(ioctl(video_fd, TVTUNER_SETFREQ, &lfreq) == 0) |
42 |
{ |
43 |
dprintf1("Vbi-TuneChannel: set to %.2f\n", (double)freq/16); |
44 |
|
45 |
result = TRUE; |
46 |
} |
47 |
else |
48 |
- fprintf(stderr, "setting tuner frequency (ioctl VIDIOCSFREQ): \n", strerror(errno)); |
49 |
+ fprintf(stderr, "setting tuner frequency (ioctl TVTUNER_SETFREQ): %s\n", strerror(errno)); |
50 |
} |
51 |
} |
52 |
} |