[AG-TECH] Patch to VideoConsumer.py
Frank Sweetser
fs at WPI.EDU
Fri Oct 10 15:03:07 CDT 2003
I've attached a patch to VideoConsumer.py in CVS that makes two changes
- a fix to the "port" configuration entry that fixes a crash for me
- adds a "quality" configuration entry that lets you set the
corresponding setting in vic
--
Frank Sweetser fs at wpi.edu
WPI Network Engineer
-------------- next part --------------
--- CVS/VideoProducerService.py 2003-10-10 10:19:32.000000000 -0400
+++ working/VideoProducerService.py 2003-10-10 13:03:31.000000000 -0400
@@ -25,7 +25,7 @@
option add Vic.maxbw 6000 startupFile
option add Vic.bandwidth %d startupFile
option add Vic.framerate %d startupFile
-option add Vic.quality 75 startupFile
+option add Vic.quality %d startupFile
option add Vic.defaultFormat %s startupFile
option add Vic.inputType %s startupFile
set device \"%s\"
@@ -62,12 +62,14 @@
self.standard = OptionSetParameter( "standard", "NTSC", VideoProducerService.standards )
self.bandwidth = RangeParameter( "bandwidth", 800, 0, 3072 )
self.framerate = RangeParameter( "framerate", 25, 1, 30 )
+ self.quality = RangeParameter( "quality", 75, 1, 100 )
self.configuration.append( self.streamname )
self.configuration.append( self.port )
self.configuration.append( self.encoding )
self.configuration.append( self.standard )
self.configuration.append( self.bandwidth )
self.configuration.append( self.framerate )
+ self.configuration.append (self.quality )
def Start( self ):
"""Start service"""
@@ -88,12 +90,17 @@
'VideoProducerService_%d.vic' % ( os.getpid() ) )
f = open(startupfile,"w")
+ if self.port.value == '':
+ portstr = "None"
+ else:
+ portstr = self.port.value
f.write( vicstartup % (self.bandwidth.value,
self.framerate.value,
+ self.quality.value,
self.encoding.value,
self.standard.value,
vicDevice,
- self.port.value,
+ portstr,
self.streamname.value ) )
f.close()
More information about the ag-tech
mailing list