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

Source Code for Module flumotion.component.encoders.mulaw.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 AudioEncoder 
25  from flumotion.admin.gtk.basesteps import AudioEncoderStep 
26   
27  __version__ = "$Rev: 6359 $" 
28  _ = gettext.gettext 
29   
30   
31 -class MulawAudioEncoder(AudioEncoder):
32 componentType = 'mulaw-encoder'
33 34
35 -class MulawStep(AudioEncoderStep):
36 name = 'MulawEncoder' 37 title = _('Mulaw Encoder') 38 sidebarName = _('Mulaw') 39 section = _('Conversion') 40 gladeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), 41 'wizard.glade') 42 componentType = 'mulaw-encoder' 43 docSection = 'help-configuration-assistant-encoder-mulaw' 44 docAnchor = '' 45 docVersion = 'local' 46 47 # WizardStep 48
49 - def workerChanged(self, worker):
50 self.model.worker = worker 51 self.wizard.requireElements(worker, 'mulawenc')
52 53
54 -class MulawWizardPlugin(object):
55 implements(IEncoderPlugin) 56
57 - def __init__(self, wizard):
58 self.wizard = wizard 59 self.model = MulawAudioEncoder()
60
61 - def getConversionStep(self):
62 return MulawStep(self.wizard, self.model)
63