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,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 os 19 import gettext 20 21 import gst 22 23 from flumotion.component.base.baseadminnode import BaseAdminGtkNode 24 from flumotion.component.common.avproducer.admin_gtk import AVProducerAdminGtk 25 from flumotion.ui.glade import GladeWidget 26 27 __version__ = "$Rev$" 28 _ = gettext.gettext 29 3032 sec = value / gst.SECOND 33 mins = sec / 60 34 sec = sec % 60 35 hours = mins / 60 36 mins = mins % 60 37 return "%02d:%02d:%02d" % (hours, mins, sec)38 3941 gladeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), 42 'flufileinfo.glade') 43 duration = 0 4457 5846 self.locationlabel.set_text(location)47 5153 self.audiolabel.set_markup(audio or "<i>No audio</i>")5456 self.videolabel.set_markup(video or "<i>No video</i>")60 logCategory = 'looper' 61 62 uiStateHandlers = None 63 gladeFile = os.path.join('flumotion', 'component', 'producers', 64 'looper', 'looper.glade') 65120 121 129 130 GUIClass = LooperAdminGtk 13167 self.widget = self.wtree.get_widget('looper-widget') 68 self.fileinfowidget = self.wtree.get_widget('fileinfowidget') 69 self.numiterlabel = self.wtree.get_widget('iterationslabel') 70 self.curposlabel = self.wtree.get_widget('curposlabel') 71 self.positionbar = self.wtree.get_widget('positionbar') 72 self.restartbutton = self.wtree.get_widget('restartbutton') 73 self.restartbutton.set_sensitive(False)7476 BaseAdminGtkNode.setUIState(self, state) 77 if not self.uiStateHandlers: 78 self.uiStateHandlers = {'info-duration': 79 self.fileinfowidget.set_duration, 80 'info-location': 81 self.fileinfowidget.set_location, 82 'info-audio': 83 self.fileinfowidget.set_audio, 84 'info-video': 85 self.fileinfowidget.set_video, 86 'position': self.positionSet, 87 'num-iterations': self.numIterationsSet} 88 for k, handler in self.uiStateHandlers.items(): 89 handler(state.get(k))9092 self.log("got new position : %d" % newposition) 93 if self.fileinfowidget.duration: 94 percent = (float(newposition % self.fileinfowidget.duration) / 95 float(self.fileinfowidget.duration)) 96 self.positionbar.set_fraction(percent) 97 self.positionbar.set_text( 98 time_to_string(newposition % self.fileinfowidget.duration))99 102 105107 self.warning("Failure %s getting pattern: %s" % ( 108 failure.type, failure.getErrorMessage())) 109 return None110 115
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Aug 13 06:17:27 2013 | http://epydoc.sourceforge.net |