Package flumotion :: Package component :: Package encoders :: Package dirac :: Module wizard_gtk
[hide private]

Source Code for Module flumotion.component.encoders.dirac.wizard_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,2008,2009 Fluendo, S.L. 
 6  # Copyright (C) 2010,2011 Flumotion Services, S.A. 
 7  # All rights reserved. 
 8  # 
 9  # This file may be distributed and/or modified under the terms of 
10  # the GNU Lesser General Public License version 2.1 as published by 
11  # the Free Software Foundation. 
12  # This file is distributed without any warranty; without even the implied 
13  # warranty of merchantability or fitness for a particular purpose. 
14  # See "LICENSE.LGPL" in the source distribution for more information. 
15  # 
16  # Headers in this file shall remain intact. 
17   
18  import gettext 
19  import os 
20   
21  from zope.interface import implements 
22   
23  from flumotion.admin.assistant.interfaces import IEncoderPlugin 
24  from flumotion.admin.assistant.models import VideoEncoder 
25  from flumotion.admin.gtk.basesteps import VideoEncoderStep 
26   
27  __version__ = "$Rev: 6443 $" 
28  _ = gettext.gettext 
29   
30   
31 -class DiracVideoEncoder(VideoEncoder):
32 componentType = 'dirac-encoder' 33
34 - def __init__(self):
35 super(DiracVideoEncoder, self).__init__() 36 37 self.properties.bitrate = 400
38 39
40 -class DiracStep(VideoEncoderStep):
41 name = 'Dirac encoder' 42 title = _('Dirac Encoder') 43 sidebarName = _('Dirac') 44 icon = 'xiphfish.png' 45 gladeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), 46 'wizard.glade') 47 componentType = 'dirac' 48 docSection = 'help-configuration-assistant-encoder-dirac' 49 docAnchor = '' 50 docVersion = 'local' 51 52 # WizardStep 53
54 - def setup(self):
55 self.bitrate.data_type = int 56 self.add_proxy(self.model.properties, 57 ['bitrate'])
58
59 - def workerChanged(self, worker):
60 self.model.worker = worker 61 62 self.wizard.debug('running Dirac checks') 63 # FIXME: what happens to this deferred ? Does it get fired into the 64 # unknown ? Should we wait on it ? 65 self.wizard.requireElements(worker, 'schroenc')
66 67
68 -class DiracWizardPlugin(object):
69 implements(IEncoderPlugin) 70
71 - def __init__(self, wizard):
72 self.wizard = wizard 73 self.model = DiracVideoEncoder()
74
75 - def getConversionStep(self):
76 return DiracStep(self.wizard, self.model)
77