[SCM] morituri/master: debug and cleanup
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:10:02 UTC 2014
The following commit has been merged in the master branch:
commit a6925423073a8b13a8237a016873f75f823530b0
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Sun Feb 24 12:19:46 2013 +0100
debug and cleanup
diff --git a/morituri/common/encode.py b/morituri/common/encode.py
index 7b0ad8d..1fbd2a1 100644
--- a/morituri/common/encode.py
+++ b/morituri/common/encode.py
@@ -242,6 +242,8 @@ class EncodeTask(ctask.GstPipelineTask):
interval = self.gst.SECOND
if interval > duration:
interval = duration / 2
+ self.debug('Setting level interval to %s, duration %s',
+ self.gst.TIME_ARGS(interval), self.gst.TIME_ARGS(duration))
self._level.set_property('interval', interval)
# add a probe so we can track progress
# we connect to level because this gives us offset in samples
@@ -291,10 +293,14 @@ class EncodeTask(ctask.GstPipelineTask):
if self._peakdB is not None:
self.debug('peakdB %r', self._peakdB)
self.peak = math.sqrt(math.pow(10, self._peakdB / 10.0))
- else:
- self.warning('No peak found, something went wrong!')
- # workaround for when the file is too short to have volume ?
- # self.peak = 0.0
+ return
+
+ self.warning('No peak found.')
+
+ if self._duration:
+ self.warning('GStreamer level element did not send messages.')
+ # workaround for when the file is too short to have volume ?
+ # self.peak = 0.0
class TagReadTask(ctask.GstPipelineTask):
diff --git a/morituri/rip/debug.py b/morituri/rip/debug.py
index 5bb6a68..e7f09d0 100644
--- a/morituri/rip/debug.py
+++ b/morituri/rip/debug.py
@@ -49,7 +49,7 @@ class RCList(logcommand.LogCommand):
self.stdout.write('%s: %s - %s\n' % (
cddbid, artist.encode('utf-8'), title.encode('utf-8')))
-
+
class RCLog(logcommand.LogCommand):
@@ -155,6 +155,9 @@ class Encode(logcommand.LogCommand):
runner.run(encodetask)
+ self.stdout.write('Peak level: %r\n' % encodetask.peak)
+ self.stdout.write('Encoded to %s\n' % toPath.encode('utf-8'))
+
class Tag(logcommand.LogCommand):
summary = "run a tag reading task"
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list