[SCM] morituri/master: * morituri/common/checksum.py: * morituri/common/program.py: Fix/add logging.
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:38 UTC 2014
The following commit has been merged in the master branch:
commit a8a7a33b0a0557a35c1932594a98acb391a3f365
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Sat Jan 21 18:04:41 2012 +0000
* morituri/common/checksum.py:
* morituri/common/program.py:
Fix/add logging.
diff --git a/ChangeLog b/ChangeLog
index 787a91e..5ac296a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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:
Spec fix.
* morituri/image/image.py:
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):
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list