[Sumover-dev] [svn commit] r3835 - vic/trunk/tcl
sumover-dev at cs.ucl.ac.uk
sumover-dev at cs.ucl.ac.uk
Mon Sep 11 13:52:16 BST 2006
Author: ucacsva
Date: Mon Sep 11 13:51:24 2006
New Revision: 3835
Modified:
vic/trunk/tcl/ui-ctrlmenu.tcl
vic/trunk/tcl/ui-titlemaker.tcl
Log:
A bit of clean-up and bug fixing.
Fixed bugs that crashed vic when overlay was switched on and the user
- changed codec on-the-fly
- changed grabber.
Also, fixed issue with multiple overlay objects created when pressing LogoTransmit (having multiple overlays left a "ghost" logo image on the display.)
Modified: vic/trunk/tcl/ui-ctrlmenu.tcl
==============================================================================
--- vic/trunk/tcl/ui-ctrlmenu.tcl (original)
+++ vic/trunk/tcl/ui-ctrlmenu.tcl Mon Sep 11 13:51:24 2006
@@ -358,10 +358,14 @@
"can't open [$videoDevice nickname] capture device"
return
}
+
+
+ init_grabber $V(grabber)
if ![tm_init $V(grabber) $grabtarget] {
$V(grabber) target $grabtarget
}
- init_grabber $V(grabber)
+
+
if { $grabq != "" } {
$V(grabber) q $grabq
}
@@ -611,15 +615,16 @@
# (and at startup for default device)
#
proc select_device device {
- global transmitButton sizeButtons portButton formatButtons \
+ global transmitButton logoButton sizeButtons portButton formatButtons \
videoFormat defaultFormat lastDevice defaultPort inputPort \
- transmitButtonState typeButton
+ transmitButtonState logoButtonState typeButton
#
# Remember settings of various controls for previous device
# and close down the device if it's already open
#
set wasTransmitting $transmitButtonState
+ set wasOverlaying $logoButtonState
if [info exists lastDevice] {
set defaultFormat($lastDevice) $videoFormat
set defaultPort($lastDevice) $inputPort
@@ -640,6 +645,7 @@
}
}
$transmitButton configure -state normal
+ $logoButton configure -state normal
if [device_supports $device size small] {
$sizeButtons.b0 configure -state normal
} else {
@@ -665,6 +671,9 @@
set videoFormat $defaultFormat($device)
select_format $videoFormat
+ if $wasOverlaying {
+ $logoButton invoke
+ }
if $wasTransmitting {
$transmitButton invoke
}
@@ -1403,11 +1412,20 @@
# old one. just replace the old one without
# re-initializing the grabber.
# XXX doens't work if title-maker is installed
- #
+ # SV, title-maker fix: see marked code below
delete $V(encoder)
set V(encoder) $encoder
$encoder transmitter $V(session)
- $V(grabber) target $encoder
+
+ # SV ######################
+ global logoButtonState
+ if $logoButtonState {
+ logo_quit
+ logo_transmit
+ } else {
+ logo_quit
+ }
+ ###########################
} else {
#
# Restart the grabber.
Modified: vic/trunk/tcl/ui-titlemaker.tcl
==============================================================================
--- vic/trunk/tcl/ui-titlemaker.tcl (original)
+++ vic/trunk/tcl/ui-titlemaker.tcl Mon Sep 11 13:51:24 2006
@@ -142,11 +142,8 @@
if {$selectedFile != ""} {
puts "Got file: $selectedFile"
}
- # XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- #$w configure -text "$selectedFile"
- tm.update.filename $w $selectedFile
- # XXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ tm.update.filename $w $selectedFile
}
proc logo_transmit {} {
@@ -166,7 +163,7 @@
position_graphic $id $xcoord $ycoord 0
- } else {
+ } else {
tm_disable
}
@@ -291,8 +288,6 @@
global id
tm_disable
- tm_destroy $id
-
}
More information about the Sumover-dev
mailing list