aboutsummaryrefslogtreecommitdiff
path: root/mbone/vic/files/patch-al
blob: 6aa16586f2d7b5bf90c96e44bbed510f3cd3e5f5 (plain) (blame)
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
diff -ubwr ./grabber.cc /home/old_wd0f/ports/mbone/vic/work.luigi/vic-2.8-luigi/grabber.cc
--- grabber.cc	Tue Feb  6 00:02:00 1996
+++ /home/old_wd0f/ports/mbone/vic/work.luigi/vic-2.8-luigi/grabber.cc	Fri Apr 10 15:36:42 1998
@@ -69,6 +69,7 @@
 	  hstart_(0), hstop_(0),
 	  framebase_(0), frame_(0),
 	  inw_(0), inh_(0), outw_(0), outh_(0),
+	  threshold_(48),
 	  target_(0), tx_(0)
 {
 	bps(128);
@@ -122,6 +123,10 @@
 			}
 			return (TCL_OK);
 		}
+		if (strcmp(argv[1], "threshold") == 0) {
+			threshold_ = 8*atoi(argv[2]);
+			return (TCL_OK);
+		}
 		if (strcmp(argv[1], "fps") == 0) {
 			/*XXX assume value in range */
 			fps(atoi(argv[2]));
diff -ubwr ./grabber.h /home/old_wd0f/ports/mbone/vic/work.luigi/vic-2.8-luigi/grabber.h
--- grabber.h	Tue Feb  6 00:02:00 1996
+++ /home/old_wd0f/ports/mbone/vic/work.luigi/vic-2.8-luigi/grabber.h	Fri Apr 10 15:37:28 1998
@@ -87,6 +87,7 @@
 	int vstop_;
 	int hstart_;
 	int hstop_;
+	int threshold_ ; // when a block is changed ? (was constant 48)
 
 	u_int framesize_;
 	u_char* framebase_;
@@ -160,19 +161,19 @@
 			rb -= _rs << 3; \
  \
 			int center = 0; \
-			if (left >= 48 && x > 0) { \
+			if (left >= threshold_ && x > 0) { \
 				crv[-1] = CR_MOTION|CR_SEND; \
 				center = 1; \
 			} \
-			if (right >= 48 && x < w - 1) { \
+			if (right >= threshold_ && x < w - 1) { \
 				crv[1] = CR_MOTION|CR_SEND; \
 				center = 1; \
 			} \
-			if (bottom >= 48 && y < blkh_ - 1) { \
+			if (bottom >= threshold_ && y < blkh_ - 1) { \
 				crv[w] = CR_MOTION|CR_SEND; \
 				center = 1; \
 			} \
-			if (top >= 48 && y > 0) { \
+			if (top >= threshold_ && y > 0) { \
 				crv[-w] = CR_MOTION|CR_SEND; \
 				center = 1; \
 			} \
diff -ubwr ./ui-ctrlmenu.tcl /home/old_wd0f/ports/mbone/vic/work.luigi/vic-2.8-luigi/ui-ctrlmenu.tcl
--- ui-ctrlmenu.tcl	Thu Jun 27 01:27:48 1996
+++ /home/old_wd0f/ports/mbone/vic/work.luigi/vic-2.8-luigi/ui-ctrlmenu.tcl	Fri Apr 10 16:39:04 1998
@@ -390,11 +394,15 @@
 		-relief raised -command transmit \
 		-anchor w -variable transmitButtonState -font $f \
 		-state disabled -highlightthickness 0
+	checkbutton $w.freeze -text "Freeze" \
+		-relief raised -command "grabber freeze \$freeze" \
+		-anchor w -variable freeze -font $f \
+		-highlightthickness 0
 	button $w.release -text "Release" \
 		-relief raised -command release_device \
 		-font $f -highlightthickness 0
 
-	pack $w.send $w.release -fill both
+	pack $w.send $w.release $w.freeze -fill both
 }
 
 proc doNothing { args } {
@@ -434,8 +442,9 @@
 	
 	frame $w.bps
 	scale $w.bps.scale -orient horizontal -font $f \
-		-showvalue 0 -from 10 -to [option get . maxbw Vic] \
+		-showvalue 0 -from 1 -to [option get . maxbw Vic] \
 		-command "set_bps $w.bps.value" -width 12 \
+		-sliderlength 20 \
 		-relief groove
 	label $w.bps.value -font $f -width 8 -anchor w
 
@@ -443,6 +452,7 @@
 	scale $w.fps.scale -font $f -orient horizontal \
 		-showvalue 0 -from 1 -to 30 \
 		-command "set_fps $w.fps.value" -width 12 \
+		-sliderlength 20 \
 		-relief groove
 	label $w.fps.value -font $f -width 8 -anchor w
 
@@ -564,7 +574,7 @@
 proc select_device device {
 	global transmitButton sizeButtons portButton formatButtons \
 		videoFormat defaultFormat lastDevice defaultPort inputPort \
-		transmitButtonState
+		transmitButtonState typeButton
 
 	#
 	# Remember settings of various controls for previous device
@@ -607,6 +617,11 @@
 	} else {
 		$portButton configure -state disabled
 	}
+	if [device_supports $device type *] {
+		$typeButton configure -state normal
+	} else {
+		$typeButton configure -state disabled
+	}
 
 	insert_grabber_panel [$device nickname]
 
@@ -774,7 +789,8 @@
 	build.encoder_options $w.options
 	build.device $w.device
 	build.port $w.port
-	pack $w.device $w.port $w.options -fill x
+	build.type $w.type
+	pack $w.device $w.port $w.type $w.options -fill x
 }
 
 proc build.encoder_options w {
@@ -1172,6 +1188,9 @@
 	global inputPort inputType portButton typeButton
 	if { [$portButton cget -state] == "normal" } {
 		$grabber port $inputPort
+	}
+	if { [$typeButton cget -state] == "normal" } {
+		$grabber type $inputType
 	}
 	setFillRate
 	update
diff -ubwr ./ui-grabber.tcl /home/old_wd0f/ports/mbone/vic/work.luigi/vic-2.8-luigi/ui-grabber.tcl
--- ui-grabber.tcl	Fri Jun 21 04:39:35 1996
+++ /home/old_wd0f/ports/mbone/vic/work.luigi/vic-2.8-luigi/ui-grabber.tcl	Fri Apr 10 13:54:42 1998
@@ -39,65 +39,93 @@
 # called foo-1, foo-2, etc. and you'll only need build.foo
 #
 
+proc build.meteor w {
+#
+# The meteor has the same controls as the slicvideo, so just call that
+# routine to build the controls.
+
+	build.slicvideo $w
+}
+
+proc build.bktr w {
+	build.slicvideo $w
+}
+
 proc build.slicvideo w {
 	set f [smallfont]
+#	set f  "-*-helvetica-medium-r-normal--*-100-75-75-*-*-*-*"
 	label $w.title -text "Grabber"
 	frame $w.f -relief sunken -borderwidth 2
 
 	frame $w.f.h -relief flat
        
-	label $w.f.h.label  -font $f -anchor e -text "Hue"
-       
-	scale $w.f.h.scale -orient horizontal -width 12 -length 20 \
-		           -relief groove -showvalue 0 -from -128 -to 127 \
-                          -command "grabber set HUE"
-	pack  $w.f.h.label $w.f.h.scale -side left -fill x -expand 1
-
-	frame $w.f.ll -relief flat 
-       
-	label $w.f.ll.label  -font $f -text "Luma" -anchor s
-       
-	label $w.f.ll.clabel -font $f -text "Contrast" -anchor s
-      
-	label $w.f.ll.blabel -font $f -text "Brightness" -anchor s
-	pack  $w.f.ll.clabel $w.f.ll.label $w.f.ll.blabel \
+	frame $w.f.h.c
+	label $w.f.h.c.l1  -font $f -anchor e -text "Chan:"
+	mk.entry $w.f.h.c  do_chan "20"
+	$w.f.h.c.entry configure -relief sunken -width 5
+	bind $w.f.h.c.entry <Return> "grabber chan \[$w.f.h.c.entry get\]"
+	pack $w.f.h.c.l1 $w.f.h.c.entry -side top
+
+	global ths
+	scale $w.f.h.ths \
+-orient horizontal -width 12 -length 60 -relief groove -sliderlength 6 \
+	    -showvalue 0 -from 1 -to 10 \
+	    -command "grabber threshold" -label Thre
+	$w.f.h.ths set 6
+	# the actual scale is multiplied by 8
+	scale $w.f.h.scale \
+-orient horizontal -width 12 -length 100 -relief groove \
+	    -showvalue 0 -from -128 -to 127 \
+	    -command "grabber hue" -label Hue
+	pack  $w.f.h.c \
+		$w.f.h.ths \
+		$w.f.h.scale \
 			     -side left -fill x -expand 1
 
+#	frame $w.f.ll -relief flat 
+#	label $w.f.ll.label  -font $f -text "Luma" -anchor s
+#	label $w.f.ll.clabel -font $f -text "Contrast" -anchor s
+#	label $w.f.ll.blabel -font $f -text "Brightness" -anchor s
+#	pack  $w.f.ll.clabel $w.f.ll.label $w.f.ll.blabel \
+#			     -side left -fill x -expand 1
+
 	frame $w.f.l  -relief flat
        
-	scale $w.f.l.cscale   -orient horizontal -width 12 -relief groove \
+	scale $w.f.l.cscale \
+-orient horizontal -width 12 -length 100 -relief groove \
                               -showvalue 0 -from 0 -to 127 \
-                              -command "grabber set LUMA_CONTRAST"
+	  -label "Contrast" \
+	  -command "grabber contrast"
        
-	scale $w.f.l.bscale -orient horizontal -width 12 -relief groove \
+	scale $w.f.l.bscale \
+-orient horizontal -width 12 -length 100 -relief groove \
                             -showvalue 0 -from 0 -to 255 \
-                            -command "grabber set LUMA_BRIGHTNESS"
+	    -command "grabber brightness" -label "Brightness"
 	pack  $w.f.l.cscale $w.f.l.bscale  -side left -fill x -expand 1
 
-	frame $w.f.cl  -relief flat
-
-	label $w.f.cl.label  -font $f -text "Chroma" -anchor n
-       
-	label $w.f.cl.glabel -font $f -text "Gain" -anchor n
-       
-	label $w.f.cl.slabel -font $f -text "Saturation" -anchor n
-	pack  $w.f.cl.glabel $w.f.cl.label $w.f.cl.slabel \
-			     -side left -fill x -expand 1
+#	frame $w.f.cl  -relief flat
+#	label $w.f.cl.label  -font $f -text "Chroma" -anchor n
+#	label $w.f.cl.glabel -font $f -text "Gain" -anchor n
+#	label $w.f.cl.slabel -font $f -text "Saturation" -anchor n
+#	pack  $w.f.cl.glabel $w.f.cl.label $w.f.cl.slabel \
+#			     -side left -fill x -expand 1
 
 	frame $w.f.c -relief flat
        
-	scale $w.f.c.gscale -orient horizontal -width 12 -relief groove \
+	scale $w.f.c.gscale \
+-orient horizontal -width 12 -length 100 -relief groove \
                              -showvalue 0 -from 0 -to 255 \
-                             -command "grabber set CHROMA_GAIN"
+	     -command "grabber uvgain" -label "Chr.  Gain"
        
-	scale $w.f.c.sscale -orient horizontal -width 12 -relief groove \
+	scale $w.f.c.sscale \
+-orient horizontal -width 12 -length 100 -relief groove \
                             -showvalue 0 -from 0 -to 127 \
-                            -command "grabber set CHROMA_SATURATION"
+	    -command "grabber saturation" -label "Saturation"
 	pack  $w.f.c.gscale $w.f.c.sscale -side left -fill x -expand 1
 
      
-	pack  $w.f.h $w.f.ll $w.f.l $w.f.c $w.f.cl \
-	      -fill x -expand 1 -padx 1m 
+	# pack  $w.f.h $w.f.ll $w.f.l $w.f.c $w.f.cl
+	pack  $w.f.h $w.f.l $w.f.c -fill x -expand 1 -padx 1m 
 
 
 	pack $w.title $w.f -fill x -expand 1
@@ -109,6 +137,10 @@
 	$w.f.c.sscale set 64
 }
 
+#
+# STILL image-grabber (?)
+#
+
 proc build.still w {
 
     set f [smallfont]
@@ -131,6 +163,10 @@
     $lastDevice file $s
 }
 
+#
+# quickcam grabber
+#
+
 proc build.qcam {w} {
     global qcamwindow
 
@@ -190,3 +226,118 @@
     set qcamwindow(setwbal) "$w.f.s.s.wbal.scale set"
     set qcamwindow(setbpp) "set qcambpp"
 }
+
+#
+# X11 Grabber controls
+#
+proc x11grabUpdatePos {x y w h} {
+
+    global x11grabcontrols
+    set w $x11grabcontrols
+
+    if {[string compare $x [$w.x11grab.row1.pos.x.e get]] != 0} {
+	$w.x11grab.row1.pos.x.e delete 0 end
+	$w.x11grab.row1.pos.x.e insert 0 $x
+    }
+    if {[string compare $y [$w.x11grab.row1.pos.y.e get]] != 0} {
+	$w.x11grab.row1.pos.y.e delete 0 end
+	$w.x11grab.row1.pos.y.e insert 0 $y
+    }
+    if {[string compare $w [$w.x11grab.row1.pos.w.e get]] != 0} {
+	$w.x11grab.row1.pos.w.e delete 0 end
+	$w.x11grab.row1.pos.w.e insert 0 $w
+    }
+    if {[string compare $h [$w.x11grab.row1.pos.h.e get]] != 0} {
+	$w.x11grab.row1.pos.h.e delete 0 end
+	$w.x11grab.row1.pos.h.e insert 0 $h
+    }
+}
+
+proc x11cmd.update.geo w {
+    grabber fixed [$w.row.x get]  [$w.row.y get]
+}
+
+proc x11cmd.fixed {} {
+    global x11Source x11grabcontrols
+    set w $x11grabcontrols
+    $w.label configure -text "$x11Source"
+    if [winfo exists $w.row] {
+	destroy $w.row
+    }
+    frame $w.row
+    pack append $w.row \
+	[label $w.row.xl -text "X:" -width 2 -anchor e] {left filly} \
+	[entry $w.row.x -relief flat -width 4] {left filly} \
+	[label $w.row.yl -text "Y:" -width 2 -anchor e] {left filly} \
+	[entry $w.row.y -relief flat -width 4] {left filly}
+    bind $w.row.x <Return> "x11cmd.update.geo $w"
+    bind $w.row.y <Return> "x11cmd.update.geo $w"
+
+    pack $w.row -after $w.label
+}
+
+proc x11cmd.pointer {} {
+    global x11Source x11grabcontrols
+    set w $x11grabcontrols
+    $w.label configure -text "$x11Source"
+    if [winfo exists $w.row] {
+	destroy $w.row
+    }
+    frame $w.row
+    pack append $w.row \
+	[button $w.row.s -text "Follow pointer" ] { left filly }
+    pack $w.row -after $w.label
+}
+
+proc x11cmd.window {} {
+	global x11Source x11grabcontrols
+	puts "x11cmd -- x11Source $x11Source"
+	set w $x11grabcontrols
+	$w.label configure -text "$x11Source"
+	if [winfo exists $w.row] {
+	    destroy $w.row
+	}
+	frame $w.row
+	pack append $w.row \
+	    [button $w.row.s -text "Select window" ] { left filly }
+	pack $w.row -after $w.label
+}
+
+proc build.x11 w {
+	global x11grabcontrols x11Source
+	set f [smallfont] 
+
+	label $w.title -text "X11 Grabber controls"
+	frame $w.x11grab -relief sunken -borderwidth 2
+	set x11grabcontrols $w.x11grab
+	set x11Source "Fixed"
+	set w1 $w.x11grab
+
+	
+	# luigi
+	set m $w1.menu
+	set m1 $m.m1
+	menubutton $w1.menu -menu $m1 -text "Source:" \
+		-relief raised -width 7 -font $f
+	label $w1.label -width 6 -font $f
+	frame $w1.row
+	menu $m1
+	$m1 add radiobutton -label Fixed \
+		-state active \
+		-command "x11cmd.fixed" -font $f -variable x11Source
+#	$m1 add radiobutton -label Pointer \
+#		-command "x11cmd.pointer" -font $f -variable x11Source
+#	$m1 add radiobutton -label Window \
+#		-command "x11cmd.window" -font $f -variable x11Source
+
+	pack append $w1 \
+		$w1.menu {left} \
+		$w1.label {left} \
+		$w1.row {left}
+	
+	pack $w $w.title $w1 -fill x -expand 1
+
+	x11cmd.fixed
+}
+
+### end of file ###
diff -ubwr ./ui-resource.tcl /home/old_wd0f/ports/mbone/vic/work.luigi/vic-2.8-luigi/ui-resource.tcl
--- ui-resource.tcl	Wed Apr  3 02:33:56 1996
+++ /home/old_wd0f/ports/mbone/vic/work.luigi/vic-2.8-luigi/ui-resource.tcl	Fri Apr 10 21:11:56 1998
@@ -140,7 +140,7 @@
 	option add Vic.useHardwareDecode false startupFile
 	option add Vic.infoHighlightColor LightYellow2 startupFile
 	option add Vic.useJPEGforH261 false startupFile
-	option add Vic.stillGrabber false startupFile
+	option add Vic.stillGrabber true startupFile ; # XXX was false
 	option add Vic.siteDropTime "300" startupFile
 
 	#