Package flumotion :: Package component :: Package producers :: Package firewire :: Module admin_gtk
[hide private]

Source Code for Module flumotion.component.producers.firewire.admin_gtk

 1  # -*- Mode: Python -*- 
 2  # vi:si:et:sw=4:sts=4:ts=4 
 3  # 
 4  # Flumotion - a streaming media server 
 5  # Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). 
 6  # All rights reserved. 
 7   
 8  # This file may be distributed and/or modified under the terms of 
 9  # the GNU General Public License version 2 as published by 
10  # the Free Software Foundation. 
11  # This file is distributed without any warranty; without even the implied 
12  # warranty of merchantability or fitness for a particular purpose. 
13  # See "LICENSE.GPL" in the source distribution for more information. 
14   
15  # Licensees having purchased or holding a valid Flumotion Advanced 
16  # Streaming Server license may use this file in accordance with the 
17  # Flumotion Advanced Streaming Server Commercial License Agreement. 
18  # See "LICENSE.Flumotion" in the source distribution for more information. 
19   
20  # Headers in this file shall remain intact. 
21   
22  import os 
23   
24  from flumotion.component.base import admin_gtk 
25  from flumotion.component.effects.volume.admin_gtk import VolumeAdminGtkNode 
26  from flumotion.component.effects.deinterlace.admin_gtk \ 
27      import DeinterlaceAdminGtkNode 
28  from flumotion.component.effects.videoscale.admin_gtk \ 
29      import VideoscaleAdminGtkNode 
30   
31  __version__ = "$Rev: 8694 $" 
32   
33   
34 -class FirewireAdminGtk(admin_gtk.BaseAdminGtk):
35
36 - def setup(self):
37 volume = VolumeAdminGtkNode(self.state, self.admin, 38 'inputVolume', 'Input Volume') 39 self.nodes['Volume'] = volume 40 deinterlace = DeinterlaceAdminGtkNode(self.state, self.admin, 41 'deinterlace', 'Deinterlacing') 42 self.nodes['Deinterlace'] = deinterlace 43 if 'FLU_VIDEOSCALE_DEBUG' in os.environ: 44 videoscale = VideoscaleAdminGtkNode(self.state, self.admin, 45 'videoscale', 'Video scaling') 46 self.nodes['Videoscale'] = videoscale 47 return admin_gtk.BaseAdminGtk.setup(self)
48
49 - def component_volumeChanged(self, channel, rms, peak, decay):
50 volume = self.nodes['Volume'] 51 volume.volumeChanged(channel, rms, peak, decay)
52
53 - def component_effectVolumeSet(self, effect, volume):
54 """ 55 @param volume: volume multiplier between 0.0 and 4.0 56 @type volume: float 57 """ 58 if effect != 'inputVolume': 59 self.warning('Unknown effect %s in %r' % (effect, self)) 60 return 61 v = self.nodes['Volume'] 62 v.volumeSet(volume)
63
64 - def component_effectModeSet(self, effect, mode):
65 """ 66 @param mode: deinterlace mode 67 @type volume: string 68 """ 69 if effect != 'deinterlace': 70 self.warning('Unknown effect %s in %r' % (effect, self)) 71 return 72 v = self.nodes['Deinterlace'] 73 v.modeSet(mode)
74
75 - def component_effectMethodSet(self, effect, mode):
76 """ 77 @param mode: deinterlace method 78 @type volume: string 79 """ 80 if effect != 'deinterlace': 81 self.warning('Unknown effect %s in %r' % (effect, self)) 82 return 83 v = self.nodes['Deinterlace'] 84 v.methodSet(mode)
85
86 - def component_effectWidthSet(self, effect, width):
87 if effect != 'videoscale': 88 self.warning('Unknown effect %s in %r' % (effect, self)) 89 return 90 v = self.nodes['Videoscale'] 91 v.widthSet(width)
92 93 GUIClass = FirewireAdminGtk 94