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.admin.assistant.interfaces import IEncoderPlugin 28 from flumotion.admin.assistant.models import AudioEncoder 29 from flumotion.admin.gtk.basesteps import AudioEncoderStep 30 31 __version__ = "$Rev: 7268 $" 32 _ = gettext.gettext 33 3436 componentType = 'vorbis-encoder' 3757 5839 super(VorbisAudioEncoder, self).__init__() 40 self.has_bitrate = True 41 self.has_quality = False 42 43 self.properties.bitrate = 64 44 self.properties.quality = 0.54547 properties = super(VorbisAudioEncoder, self).getProperties() 48 if self.has_bitrate: 49 del properties.quality 50 properties.bitrate *= 1000 51 elif self.has_quality: 52 del properties.bitrate 53 else: 54 raise AssertionError 55 56 return properties60 name = 'Vorbis encoder' 61 title = _('Vorbis Encoder') 62 sidebarName = _('Vorbis') 63 icon = 'xiphfish.png' 64 gladeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), 65 'wizard.glade') 66 componentType = 'vorbis' 67 docSection = 'help-configuration-assistant-encoder-vorbis' 68 docAnchor = '' 69 docVersion = 'local' 70 71 # WizardStep 7294 95 # Callbacks 96 101 102 11274 self.has_bitrate.data_type = bool 75 self.has_quality.data_type = bool 76 self.bitrate.data_type = int 77 self.quality.data_type = float 78 79 self.add_proxy(self.model, 80 ['has_quality', 'has_bitrate']) 81 self.add_proxy(self.model.properties, 82 ['bitrate', 'quality'])8385 self.model.worker = worker 86 87 def hasVorbis(unused, worker): 88 self.wizard.runInWorker( 89 worker, 'flumotion.worker.checks.encoder', 'checkVorbis')90 91 self.wizard.debug('running Vorbis checks') 92 d = self.wizard.requireElements(worker, 'vorbisenc') 93 d.addCallback(hasVorbis, worker)
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Mar 10 06:49:19 2011 | http://epydoc.sourceforge.net |