Skip to content

Instantly share code, notes, and snippets.

@soohyunc
Created June 10, 2013 09:37
Show Gist options
  • Save soohyunc/5747577 to your computer and use it in GitHub Desktop.
Save soohyunc/5747577 to your computer and use it in GitHub Desktop.
A sample Vic running script
# vic_script.tcl ---
#
# Filename: vic_script.tcl
# Description:
# Author: Soo-Hyun Choi <S.Choi@cs.ucl.ac.uk>
# Maintainer:
# Created: Thu Feb 5 16:39:02 2009 (+0000)
# Version:
# Last-Updated: Thu Feb 5 16:54:24 2009 (+0000)
# By: Mohamed Ahmed <m.ahmed@cs.ucl.ac.uk>
# Update #: 5
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
#
#
#
# Change log:
#
#
#
# Code:
option add Vic.disable_autoplace true startupFile
option add Vic.muteNewSources true startupFile
option add Vic.maxbw 6000 startupFile
option add Vic.bandwidth 800 startupFile
option add Vic.framerate 24 startupFile
option add Vic.quality 75 startupFile
option add Vic.defaultFormat h261 startupFile
option add Vic.inputType NTSC startupFile
option add Vic.device "still" startupFile
option add Vic.defaultTTL 127 startupFile
option add Vic.rtpName "Mo" startupFile
option add Vic.rtpEmail "m.ahmed@cs.ucl.ac.uk" startupFile
proc user_hook {} {
global videoDevice inputPort transmitButton transmitButtonState inputDeviceList
update_note 0 "m.ahmed@cs.ucl.ac.uk"
after 200 {
if { ![winfo exists .menu] } {
build.menu
}
if { ![info exists env(VIC_DEVICE)] } {
set deviceName "still"
foreach v $inputDeviceList {
if { [string last $deviceName [$v nickname]] != -1 } {
set videoDevice $v
select_device $v
$v file "foreman.yuv"
break
}
}
}
set inputPort "still"
grabber port "still"
## Starts sending straight away
if { [$transmitButton cget -state] != "disabled" } {
set transmitButtonState 1
transmit
}
}
}
#
# vic_script.tcl ends here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment