aboutsummaryrefslogblamecommitdiff
path: root/multimedia/vic/files/patch-al
blob: 6aa16586f2d7b5bf90c96e44bbed510f3cd3e5f5 (plain) (tree)
1
2
                                                                                          
                                        



















                                                                                                
                                                                                        
                                        

































                                                                                                    
                                                
                                                                                                        
























































                                                                            




















                                                                                                  
                                                














































































































































































































































































                                                                                                        
                                                









                                                                                                        
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
 
 	#