1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
$NetBSD: patch-ad,v 1.3 2011/07/05 03:27:22 dholland Exp $
Handle always-on-top.
Handle png.
Fix illegal C.
--- app_rsrc.h.orig 2001-02-12 22:17:53.000000000 +0100
+++ app_rsrc.h
@@ -80,6 +80,8 @@ typedef struct _AppResources {
int Bpp_24bit;
int Bpp_32bit;
+ Boolean aot_mode;
+
Boolean afc_mode;
Boolean disable_direct_v;
String remote_type; /* Type of Remote Control attached */
@@ -191,6 +193,8 @@ extern AppResources App_res;
#define RNafc "afc"
#define RCafc "Afc"
+#define RNalwaysOnTop "alwaysOnTop"
+#define RCalwaysOnTop "AlwaysOnTop"
#define RNdisableDirectV "disableDirectV"
#define RCdisableDirectV "DisableDirectV"
@@ -284,6 +288,7 @@ static XrmOptionDescRec Cmd_line_options
{ "-Bpp24bit" , RNBpp24bit , XrmoptionSepArg, NULL },
{ "-Bpp32bit" , RNBpp32bit , XrmoptionSepArg, NULL },
+ { "-noalwaysOnTop" , RNalwaysOnTop , XrmoptionNoArg , pFALSE },
{ "-noafc" , RNafc , XrmoptionNoArg , pFALSE },
{ "-disableDirectV" , RNdisableDirectV , XrmoptionNoArg , pTRUE },
{ "-remoteType" , RNremoteType , XrmoptionSepArg, NULL },
@@ -434,6 +439,10 @@ static XtResource Resources[] = {
XtOffsetOf(AppResources, Bpp_32bit), XtRString,
"-1" /* 0 = Guess */ },
+ { RNalwaysOnTop, RCalwaysOnTop, XtRBoolean, sizeof(Boolean),
+ XtOffsetOf(AppResources, aot_mode), XtRImmediate,
+ (XtPointer) True },
+
{ RNafc, RCafc, XtRBoolean, sizeof(Boolean),
XtOffsetOf(AppResources, afc_mode), XtRImmediate,
(XtPointer) True },
@@ -525,96 +534,96 @@ static XtResource Resources[] = {
};
-#define OPTION_HELP_STR "\
- BSD X TV (fxtv), Version " VERS_STR ".
- Written by Randall Hopper
-
-Please mail Fxtv and Bt848 driver-related comments and help requests to the
-multimedia@freebsd.org list. Feel free to subscribe and contribute
-(listserv: majordomo@freebsd.org).
-
-Available options:
-
--driverDefaults - Use appearance parms from driver on startup
--colorbars - Turn on colorbar display (for testing)
--hue [-90...90] - Initial Hue ; def=0
--brightness [-50..50] - Initial Brightness (%); def=0
--contrast [0..200] - Initial Contrast (%); def=100
--satU [0..200] - U Saturation (%); def=100
--satV [0..284] - V Saturation (%); def=100
--aspectlock - Enable 4:3 aspect lock on video window
-
--deviceNumber <#> - bktr/tuner device numbers; def=0
--inputFormat <fmt> - Tuner signal input format (ntsc,ntscm,ntscj,
- palbdghi,pal,palm,paln,secam,palncomb,rsvd)
-
--tunerMode [cable|antenna] - Tuner Mode
--defaultInput <input> - Startup tuner signal input
- [tuner|video|svideo|csvideo|dev3]
--defaultAudioInput <input> - Startup TV card audio input
- [tuner|external|internal|auto]
--defaultChannel <#> - Startup Channel Number
--cableStationList <...> - List of cable station presets (see rsrc file)
--antennaStationList <...> - List of antenna station presets
--cableFreqSet <freqset> - Freq set for cable (def = cableirc)
- [nabcst|cableirc|cablehrc|weurope|jpnbcst|
- jpncable|xussr|australia|france]
--antennaFreqSet <freqset> - Freq set for antenna (def = nabcst)
-
--noAudio - Suppress playing audio through soundcard
--dspDevice - Override default DSP device (def=/dev/dsp)
--mixerDevice - Override default mixer device (def=/dev/mixer)
--mixerChannel - Audio mixer (line,line1/2/3,cd,mic,video)
-
--stationInWinTitle - Display station text in window title
--stationInWinIcon - Display station text in window icon
-
--stationAnnotFont <fontpat> - Font pattern for station annot (see rsrc file)
--stationAnnotColor <color> - Color for station annot
--stationAnnotDelay <msec> - How long to display (0 = never; -1 = always)
--stationAnnotIDOnly - Display station ID alone (when available)
-
--tunerModeAnnot{Font,Color,Delay}
--inputDevAnnot{Font,Color,Delay}
--volumeDevAnnot{Font,Color,Delay}
--muteDevAnnot{Font,Color,Delay}
- - Other annotation options (see stationAnnot)
-
--remoteType - Type of attached remote control
- [None|X10|Hauppauge|PixelView]
-
--recCmdMpeg2 - MPEG-2 Audio record command
--recCmdMpeg3 - MPEG-3 Audio record command
--playCmdMpeg2 - MPEG-2 Audio play command
--playCmdMpeg3 - MPEG-3 Audio play command
-
--videoCnvtScript - Video conversion workhorse script for vid encod.
-
--bswap2Bpp - Byte/word swap options for direct video
--nobswap2Bpp (used to match driver's pixel format with
--bswap3Bpp the video card's)
--nobswap3Bpp
--bswap4Bpp 2Bpp - 15/16-bpp modes
--nobswap4Bpp 3Bpp - packed 24bpp modes
--bwwap4Bpp 4Bpp - unpacked 24bpp modes
--nowswap4Bpp
-
--Bpp24bit [3|4] - Set frame buffer Bytes-per-pixel for 24bpp mode
--Bpp32bit [3|4] - Set frame buffer Bytes-per-pixel for 32bpp mode
-
--videoCapFile[1-4] - Optional paths (0-4) to scratch file paths to
- use for video capture; spreads load across disks
-
--noafc - Disable AFC
--disableDirectV - Disable DMA transfers straight to video card
--debug <area> - Debug Msgs
- {startup,driver,subproc,events,video,frame}
--help - Display program options
-
-NOTE: All command line options are accessible as X resources as well.
- The X resources have the same names as the command-line options.
- See the sample Fxtv class resource file for details.
-"
+#define OPTION_HELP_STR \
+" BSD X TV (fxtv), Version " VERS_STR ".\n" \
+" Written by Randall Hopper\n" \
+"\n" \
+"Please mail Fxtv and Bt848 driver-related comments and help requests to the\n" \
+"multimedia@freebsd.org list. Feel free to subscribe and contribute\n" \
+"(listserv: majordomo@freebsd.org).\n" \
+"\n" \
+"Available options:\n" \
+"\n" \
+"-driverDefaults - Use appearance parms from driver on startup\n" \
+"-colorbars - Turn on colorbar display (for testing)\n" \
+"-hue [-90...90] - Initial Hue ; def=0\n" \
+"-brightness [-50..50] - Initial Brightness (%); def=0\n" \
+"-contrast [0..200] - Initial Contrast (%); def=100\n" \
+"-satU [0..200] - U Saturation (%); def=100\n" \
+"-satV [0..284] - V Saturation (%); def=100\n" \
+"-aspectlock - Enable 4:3 aspect lock on video window\n" \
+"-noalwaysOnTop - Disable always on top\n" \
+"\n" \
+"-deviceNumber <#> - bktr/tuner device numbers; def=0\n" \
+"-inputFormat <fmt> - Tuner signal input format (ntsc,ntscm,ntscj,\n" \
+" palbdghi,pal,palm,paln,secam,palncomb,rsvd)\n" \
+"\n" \
+"-tunerMode [cable|antenna] - Tuner Mode\n" \
+"-defaultInput <input> - Startup tuner signal input\n" \
+" [tuner|video|svideo|csvideo|dev3]\n" \
+"-defaultAudioInput <input> - Startup TV card audio input\n" \
+" [tuner|external|internal|auto]\n" \
+"-defaultChannel <#> - Startup Channel Number\n" \
+"-cableStationList <...> - List of cable station presets (see rsrc file)\n" \
+"-antennaStationList <...> - List of antenna station presets\n" \
+"-cableFreqSet <freqset> - Freq set for cable (def = cableirc)\n" \
+" [nabcst|cableirc|cablehrc|weurope|jpnbcst|\n" \
+" jpncable|xussr|australia|france]\n" \
+"-antennaFreqSet <freqset> - Freq set for antenna (def = nabcst)\n" \
+"\n" \
+"-noAudio - Suppress playing audio through soundcard\n" \
+"-dspDevice - Override default DSP device (def=/dev/audio)\n" \
+"-mixerDevice - Override default mixer device (def=/dev/mixer)\n" \
+"-mixerChannel - Audio mixer (line,line1/2/3,cd,mic,video)\n" \
+"\n" \
+"-stationInWinTitle - Display station text in window title\n" \
+"-stationInWinIcon - Display station text in window icon\n" \
+"\n" \
+"-stationAnnotFont <fontpat> - Font pattern for station annot (see rsrc file)\n" \
+"-stationAnnotColor <color> - Color for station annot\n" \
+"-stationAnnotDelay <msec> - How long to display (0 = never; -1 = always)\n" \
+"-stationAnnotIDOnly - Display station ID alone (when available)\n" \
+"\n" \
+"-tunerModeAnnot{Font,Color,Delay}\n" \
+"-inputDevAnnot{Font,Color,Delay}\n" \
+"-volumeDevAnnot{Font,Color,Delay}\n" \
+"-muteDevAnnot{Font,Color,Delay}\n" \
+" - Other annotation options (see stationAnnot)\n" \
+"\n" \
+"-remoteType - Type of attached remote control\n" \
+" [None|X10|Hauppauge|PixelView]\n" \
+"\n" \
+"-recCmdMpeg2 - MPEG-2 Audio record command\n" \
+"-recCmdMpeg3 - MPEG-3 Audio record command\n" \
+"-playCmdMpeg2 - MPEG-2 Audio play command\n" \
+"-playCmdMpeg3 - MPEG-3 Audio play command\n" \
+"\n" \
+"-videoCnvtScript - Video conversion workhorse script for vid encod.\n" \
+"\n" \
+"-bswap2Bpp - Byte/word swap options for direct video\n" \
+"-nobswap2Bpp (used to match driver's pixel format with\n" \
+"-bswap3Bpp the video card's)\n" \
+"-nobswap3Bpp\n" \
+"-bswap4Bpp 2Bpp - 15/16-bpp modes\n" \
+"-nobswap4Bpp 3Bpp - packed 24bpp modes\n" \
+"-bwwap4Bpp 4Bpp - unpacked 24bpp modes\n" \
+"-nowswap4Bpp\n" \
+"\n" \
+"-Bpp24bit [3|4] - Set frame buffer Bytes-per-pixel for 24bpp mode\n" \
+"-Bpp32bit [3|4] - Set frame buffer Bytes-per-pixel for 32bpp mode\n" \
+"\n" \
+"-videoCapFile[1-4] - Optional paths (0-4) to scratch file paths to\n" \
+" use for video capture; spreads load across disks\n" \
+"\n" \
+"-noafc - Disable AFC\n" \
+"-disableDirectV - Disable DMA transfers straight to video card\n" \
+"-debug <area> - Debug Msgs\n" \
+" {startup,driver,subproc,events,video,frame}\n" \
+"-help - Display program options\n" \
+"\n" \
+"NOTE: All command line options are accessible as X resources as well.\n" \
+" The X resources have the same names as the command-line options.\n" \
+" See the sample Fxtv class resource file for details.\n"
static String fallback_resources[] = {
/*"Fxtv.geometry: +10+10",*/
@@ -681,6 +690,7 @@ static String fallback_resources[] = {
"*menuBox*optionsMenu*captureToCmd.label: Capture To...",
"*menuBox*optionsMenu*saveOptionsCmd.label:Save Options",
"*menuBox*optionsMenu*setAfcCmd.label: AFC",
+ "*menuBox*optionsMenu*setAotCmd.label: Always on top",
"*menuBox*helpMenu.label: Help",
"*menuBox*helpMenu.menu.label: Help",
@@ -789,6 +799,7 @@ static String fallback_resources[] = {
"*imageSaveDialog*suffixLabel.label: Append Img # Suffix",
"*imageSaveDialog*formatLabel.label: Format:",
"*imageSaveDialog*formatMenuBox*tiffCmd.label: TIFF",
+ "*imageSaveDialog*formatMenuBox*pngCmd.label: PNG",
"*imageSaveDialog*formatMenuBox*ppmCmd.label: PPM",
"*imageSaveDialog*okCmd.label: OK",
@@ -902,6 +913,7 @@ static String fallback_resources[] = {
"*videoSaveDialog*imageEncLabel.label: IMAGE ENCODE",
"*videoSaveDialog*iFileFmtLabel.label: Format:",
"*videoSaveDialog*iFileFmtMenuBox*tiffCmd.label: TIFF",
+ "*videoSaveDialog*iFileFmtMenuBox*pngCmd.label: PNG",
"*videoSaveDialog*iFileFmtMenuBox*ppmCmd.label: PPM",
"*videoSaveDialog*iFileFmtMenuBox*yuvCmd.label: YUV",
|