| Trees | Indices | Help |
|---|
|
|
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 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 gettext 23 import os 24 25 from zope.interface import implements 26 27 from flumotion.wizard.basesteps import AudioEncoderStep 28 from flumotion.wizard.interfaces import IEncoderPlugin 29 from flumotion.wizard.models import AudioEncoder 30 31 __version__ = "$Rev: 6765 $" 32 _ = gettext.gettext 33 3436 componentType = 'vorbis-encoder'56 5738 super(VorbisAudioEncoder, self).__init__() 39 self.has_bitrate = True 40 self.has_quality = False 41 42 self.properties.bitrate = 64 43 self.properties.quality = 0.54446 properties = super(VorbisAudioEncoder, self).getProperties() 47 if self.has_bitrate: 48 del properties.quality 49 properties.bitrate *= 1000 50 elif self.has_quality: 51 del properties.bitrate 52 else: 53 raise AssertionError 54 55 return properties59 name = 'Vorbis encoder' 60 title = _('Vorbis encoder') 61 sidebarName = _('Vorbis') 62 icon = 'xiphfish.png' 63 gladeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), 64 'wizard.glade') 65 componentType = 'vorbis' 66 67 # WizardStep 6890 91 # Callbacks 92 97 98 10770 self.has_bitrate.data_type = bool 71 self.has_quality.data_type = bool 72 self.bitrate.data_type = int 73 self.quality.data_type = float 74 75 self.add_proxy(self.model, 76 ['has_quality', 'has_bitrate']) 77 self.add_proxy(self.model.properties, 78 ['bitrate', 'quality'])7981 self.model.worker = worker 82 83 def hasVorbis(unused, worker): 84 self.wizard.runInWorker( 85 worker, 'flumotion.worker.checks.encoder', 'checkVorbis')86 87 self.wizard.debug('running Vorbis checks') 88 d = self.wizard.requireElements(worker, 'vorbisenc') 89 d.addCallback(hasVorbis, worker)
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sat Jul 26 09:43:13 2008 | http://epydoc.sourceforge.net |