[AG-TECH] Patch to VideoConsumer.py

Thomas D. Uram turam at mcs.anl.gov
Mon Oct 13 14:15:16 CDT 2003


Hi Frank:

I'll take the quality patch and probably roll it into the stock video 
producer.

Can you describe the details of the crash you are fixing with the other 
change?  I'd like to understand that before applying it.

Tom

Frank Sweetser wrote:

>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
>
>  
>
>------------------------------------------------------------------------
>
>--- 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()
> 
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/ag-tech/attachments/20031013/be66b850/attachment.htm>


More information about the ag-tech mailing list