* morituri/common/checksum.py:
* morituri/common/program.py: Fix/add logging.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2012-01-21 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* morituri/common/checksum.py:
|
||||
* morituri/common/program.py:
|
||||
Fix/add logging.
|
||||
|
||||
2012-01-21 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* morituri.spec.in:
|
||||
|
||||
@@ -28,12 +28,13 @@ import gst
|
||||
|
||||
from morituri.common import common
|
||||
from morituri.common import gstreamer as cgstreamer
|
||||
from morituri.common import log
|
||||
|
||||
from morituri.extern.task import task, gstreamer
|
||||
from morituri.extern.task import gstreamer
|
||||
|
||||
# checksums are not CRC's. a CRC is a specific type of checksum.
|
||||
|
||||
class ChecksumTask(gstreamer.GstPipelineTask):
|
||||
class ChecksumTask(log.Loggable, gstreamer.GstPipelineTask):
|
||||
"""
|
||||
I am a task that calculates a checksum of the decoded audio data.
|
||||
|
||||
@@ -116,7 +117,7 @@ class ChecksumTask(gstreamer.GstPipelineTask):
|
||||
gst.SEEK_FLAG_FLUSH,
|
||||
gst.SEEK_TYPE_SET, self._frameStart,
|
||||
gst.SEEK_TYPE_SET, self._frameEnd + 1) # half-inclusive interval
|
||||
gst.debug('CRCing %r from sector %d to sector %d' % (
|
||||
self.debug('CRCing %r from sector %d to sector %d' % (
|
||||
self._path,
|
||||
self._frameStart / common.SAMPLES_PER_FRAME,
|
||||
(self._frameEnd + 1) / common.SAMPLES_PER_FRAME))
|
||||
@@ -144,6 +145,7 @@ class ChecksumTask(gstreamer.GstPipelineTask):
|
||||
def stopped(self):
|
||||
if not self._last:
|
||||
# see http://bugzilla.gnome.org/show_bug.cgi?id=578612
|
||||
self.debug('not a single buffer gotten, raising')
|
||||
self.setException(common.EmptyError('not a single buffer gotten'))
|
||||
else:
|
||||
self._checksum = self._checksum % 2 ** 32
|
||||
|
||||
@@ -406,7 +406,10 @@ class Program(log.Loggable):
|
||||
|
||||
runner.run(t)
|
||||
|
||||
return trackResult.testcrc == t.checksum
|
||||
ret = trackResult.testcrc == t.checksum
|
||||
log.debug('program',
|
||||
'verifyTrack: track result crc %r, file crc %r, result %r',
|
||||
trackResult.testcrc, t.checksum, ret)
|
||||
|
||||
def ripTrack(self, runner, trackResult, offset, device, profile, taglist,
|
||||
what=None):
|
||||
|
||||
Reference in New Issue
Block a user