diff --git a/ChangeLog b/ChangeLog index 787a91e..5ac296a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-01-21 Thomas Vander Stichele + + * morituri/common/checksum.py: + * morituri/common/program.py: + Fix/add logging. + 2012-01-21 Thomas Vander Stichele * morituri.spec.in: diff --git a/morituri/common/checksum.py b/morituri/common/checksum.py index 4a5ce55..d0fe2e0 100644 --- a/morituri/common/checksum.py +++ b/morituri/common/checksum.py @@ -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 diff --git a/morituri/common/program.py b/morituri/common/program.py index 9f71bff..7aed499 100644 --- a/morituri/common/program.py +++ b/morituri/common/program.py @@ -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):