Changeset 587
- Timestamp:
- 12-07-12 11:38:59 (11 months ago)
- Location:
- trunk/morituri/common
- Files:
-
- 1 added
- 2 edited
-
checksum.py (modified) (3 diffs)
-
encode.py (modified) (4 diffs)
-
task.py (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/morituri/common/checksum.py
r571 r587 7 7 8 8 # This file is part of morituri. 9 # 9 # 10 10 # morituri is free software: you can redistribute it and/or modify 11 11 # it under the terms of the GNU General Public License as published by 12 12 # the Free Software Foundation, either version 3 of the License, or 13 13 # (at your option) any later version. 14 # 14 # 15 15 # morituri is distributed in the hope that it will be useful, 16 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 18 # GNU General Public License for more details. 19 # 19 # 20 20 # You should have received a copy of the GNU General Public License 21 21 # along with morituri. If not, see <http://www.gnu.org/licenses/>. … … 144 144 145 145 def stopped(self): 146 self.debug('stopped') 146 147 if not self._last: 148 self.debug('raising EmptyError') 147 149 # see http://bugzilla.gnome.org/show_bug.cgi?id=578612 148 150 self.debug('not a single buffer gotten, raising') … … 270 272 return checksum 271 273 272 class TRMTask( gstreamer.GstPipelineTask):274 class TRMTask(task.GstPipelineTask): 273 275 """ 274 276 I calculate a MusicBrainz TRM fingerprint. -
trunk/morituri/common/encode.py
r513 r587 27 27 28 28 from morituri.common import common, log 29 from morituri.common import task as ctask 29 30 30 31 from morituri.extern.task import task, gstreamer … … 125 126 ALL_PROFILES.update(LOSSY_PROFILES) 126 127 127 class EncodeTask( gstreamer.GstPipelineTask):128 class EncodeTask(ctask.GstPipelineTask): 128 129 """ 129 130 I am a task that encodes a .wav file. … … 219 220 bus.connect('message::element', self._message_element_cb) 220 221 self._level = self.pipeline.get_by_name('level') 222 223 # set an interval that is smaller than the duration 224 # FIXME: check level and make sure it emits level up to the last 225 # sample, even if input is small 226 interval = 1000000000L 227 if interval < duration: 228 interval = duration / 2 229 self._level.set_property('interval', interval) 221 230 # add a probe so we can track progress 222 231 # we connect to level because this gives us offset in samples … … 269 278 else: 270 279 self.warning('No peak found, something went wrong!') 280 # workaround for when the file is too short to have volume ? 281 # self.peak = 0.0 271 282 272 283 class TagReadTask(gstreamer.GstPipelineTask):
Note: See TracChangeset
for help on using the changeset viewer.
