Changeset 438
- Timestamp:
- 19-05-11 02:28:36 (2 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
morituri/common/encode.py (modified) (5 diffs)
-
morituri/common/program.py (modified) (3 diffs)
-
morituri/program/cdparanoia.py (modified) (7 diffs)
-
morituri/rip/cd.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r437 r438 1 2011-05-19 Thomas Vander Stichele <thomas at apestaart dot org> 2 3 * morituri/program/cdparanoia.py: 4 * morituri/common/encode.py: 5 * morituri/common/program.py: 6 * morituri/rip/cd.py: 7 Add action and what args to describe task better. 8 1 9 2011-05-19 Thomas Vander Stichele <thomas at apestaart dot org> 2 10 -
trunk/morituri/common/encode.py
r434 r438 138 138 peak = None 139 139 140 def __init__(self, inpath, outpath, profile, taglist=None ):140 def __init__(self, inpath, outpath, profile, taglist=None, what="track"): 141 141 """ 142 142 @param profile: encoding profile … … 155 155 self._profile = profile 156 156 157 self.description = "Encoding %s" % what 157 158 self._profile.test() 158 159 … … 163 164 import gst 164 165 165 self._pipeline = gst.parse_launch('''166 desc = ''' 166 167 filesrc location="%s" ! 167 168 decodebin name=decoder ! … … 172 173 common.quoteParse(self._inpath).encode('utf-8'), 173 174 self._profile.pipeline, 174 common.quoteParse(self._outpath).encode('utf-8'))) 175 common.quoteParse(self._outpath).encode('utf-8')) 176 177 self.debug('creating pipeline: %r', desc) 178 self._pipeline = gst.parse_launch(desc) 175 179 176 180 tagger = self._pipeline.get_by_name('tagger') … … 273 277 self._pipeline.set_state(gst.STATE_NULL) 274 278 self.debug('set state to NULL') 279 # FIXME: maybe this should move lower ? If used by BaseMultiTask, 280 # this starts the next task without showing us the peakdB 275 281 task.Task.stop(self) 276 282 -
trunk/morituri/common/program.py
r431 r438 462 462 return trackResult.testcrc == t.checksum 463 463 464 def ripTrack(self, runner, trackResult, offset, device, profile, taglist): 464 def ripTrack(self, runner, trackResult, offset, device, profile, taglist, 465 what=None): 465 466 """ 466 467 @param trackResult: the object to store information in. … … 479 480 os.makedirs(dirname) 480 481 482 if not what: 483 what='track %d' % (trackResult.number, ) 484 481 485 t = cdparanoia.ReadVerifyTrackTask(trackResult.filename, 482 486 self.result.table, start, stop, … … 484 488 device=device, 485 489 profile=profile, 486 taglist=taglist )487 t.description = 'Reading Track %d' % trackResult.number490 taglist=taglist, 491 what=what) 488 492 489 493 runner.run(t) -
trunk/morituri/program/cdparanoia.py
r432 r438 188 188 """ 189 189 190 description = "Reading Track"190 description = "Reading track" 191 191 quality = None # set at end of reading 192 192 193 193 _MAXERROR = 100 # number of errors detected by parser 194 194 195 def __init__(self, path, table, start, stop, offset=0, device=None): 195 def __init__(self, path, table, start, stop, offset=0, device=None, 196 action="Reading", what="track"): 196 197 """ 197 198 Read the given track. … … 209 210 @param device: the device to rip from 210 211 @type device: str 212 @param action: a string representing the action; e.g. Read/Verify 213 @type action: str 214 @param what: a string representing what's being read; e.g. Track 215 @type what: str 211 216 """ 212 217 assert type(path) is unicode, "%r is not unicode" % path … … 222 227 self._buffer = "" # accumulate characters 223 228 self._errors = [] 229 self.description = "%s %s" % (action, what) 224 230 225 231 def start(self, runner): … … 372 378 373 379 def __init__(self, path, table, start, stop, offset=0, device=None, 374 profile=None, taglist=None ):380 profile=None, taglist=None, what="track"): 375 381 """ 376 382 @param path: where to store the ripped track … … 393 399 task.MultiSeparateTask.__init__(self) 394 400 401 self.debug('Creating read and verify task on %r', path) 395 402 self.path = path 396 403 … … 409 416 self.tasks.append( 410 417 ReadTrackTask(tmppath, table, start, stop, 411 offset=offset, device=device ))418 offset=offset, device=device, what=what)) 412 419 self.tasks.append(checksum.CRC32Task(tmppath)) 413 420 t = ReadTrackTask(tmppath, table, start, stop, 414 offset=offset, device=device) 415 t.description = 'Verifying track...' 421 offset=offset, device=device, action="Verifying", what=what) 416 422 self.tasks.append(t) 417 423 self.tasks.append(checksum.CRC32Task(tmppath)) … … 427 433 428 434 self.tasks.append(encode.EncodeTask(tmppath, tmpoutpath, profile, 429 taglist=taglist ))435 taglist=taglist, what=what)) 430 436 # make sure our encoding is accurate 431 437 self.tasks.append(checksum.CRC32Task(tmpoutpath)) -
trunk/morituri/rip/cd.py
r420 r438 216 216 device=self.parentCommand.options.device, 217 217 profile=profile, 218 taglist=prog.getTagList(number)) 218 taglist=prog.getTagList(number), 219 what='track %d of %d' % (number, len(itable.tracks))) 219 220 220 221 if trackResult.testcrc == trackResult.copycrc:
Note: See TracChangeset
for help on using the changeset viewer.
