Changeset 485


Ignore:
Timestamp:
24-05-11 19:00:04 (2 years ago)
Author:
thomas
Message:
  • morituri/common/encode.py: Query for duration and use it in level callback to set progress. Works around F-15 bug where encode progress is not being updated.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r484 r485  
     12011-05-24  Thomas Vander Stichele  <thomas at apestaart dot org> 
     2 
     3        * morituri/common/encode.py: 
     4          Query for duration and use it in level callback to set progress. 
     5          Works around F-15 bug where encode progress is not being updated. 
     6 
    172011-05-24  Thomas Vander Stichele  <thomas at apestaart dot org> 
    28 
  • trunk/morituri/common/encode.py

    r484 r485  
    195195            return 
    196196 
     197 
    197198        # wavparse 0.10.14 returns in bytes 
    198199        if qformat == self.gst.FORMAT_BYTES: 
     
    201202        self.debug('total length: %r', length) 
    202203        self._length = length 
     204 
     205        duration = None 
     206        try: 
     207            duration, qformat = identity.query_duration(self.gst.FORMAT_TIME) 
     208        except self.gst.QueryError, e: 
     209            self.debug('Could not query duration') 
     210        self._duration = duration 
    203211 
    204212        # set up level callbacks 
     
    246254                self.log('higher peakdB found, now %r', self._peakdB) 
    247255                self._peakdB = p 
     256 
     257        # FIXME: works around a bug on F-15 where buffer probes don't seem 
     258        # to get triggered to update progress 
     259        if self._duration is not None: 
     260            self.schedule(0, self.setProgress, 
     261                float(s['stream-time'] + s['duration']) / self._duration) 
    248262 
    249263    def stopped(self): 
Note: See TracChangeset for help on using the changeset viewer.