[SCM] morituri/master: * morituri/image/cue.py: * morituri/image/image.py: * morituri/image/table.py: * morituri/image/toc.py: * morituri/program/cdrdao.py: * morituri/test/test_image_cue.py: * morituri/test/test_image_table.py: Rename ITTrack to Track.
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:00 UTC 2014
The following commit has been merged in the master branch:
commit 09fe46ee99c587d9096ca3217ce09ea6fa977795
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Sat May 16 09:29:01 2009 +0000
* morituri/image/cue.py:
* morituri/image/image.py:
* morituri/image/table.py:
* morituri/image/toc.py:
* morituri/program/cdrdao.py:
* morituri/test/test_image_cue.py:
* morituri/test/test_image_table.py:
Rename ITTrack to Track.
diff --git a/ChangeLog b/ChangeLog
index 1b92c6a..1e3bb8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2009-05-16 Thomas Vander Stichele <thomas at apestaart dot org>
+ * morituri/image/cue.py:
+ * morituri/image/image.py:
+ * morituri/image/table.py:
+ * morituri/image/toc.py:
+ * morituri/program/cdrdao.py:
+ * morituri/test/test_image_cue.py:
+ * morituri/test/test_image_table.py:
+ Rename ITTrack to Track.
+
+2009-05-16 Thomas Vander Stichele <thomas at apestaart dot org>
+
* morituri/common/common.py:
* morituri/image/cue.py:
Use FRAMES_PER_SECOND where appropriate.
diff --git a/morituri/image/cue.py b/morituri/image/cue.py
index 3309e2a..763a0cf 100644
--- a/morituri/image/cue.py
+++ b/morituri/image/cue.py
@@ -114,7 +114,7 @@ class CueFile(object, log.Loggable):
trackMode = m.group('mode')
self.debug('found track %d', trackNumber)
- currentTrack = table.ITTrack(trackNumber)
+ currentTrack = table.Track(trackNumber)
self.table.tracks.append(currentTrack)
continue
diff --git a/morituri/image/image.py b/morituri/image/image.py
index 11c4207..8003b98 100644
--- a/morituri/image/image.py
+++ b/morituri/image/image.py
@@ -79,7 +79,7 @@ class Image(object, log.Loggable):
length = self.cue.getTrackLength(self.cue.table.tracks[i])
if length == -1:
length = verify.lengths[i + 1]
- t = table.ITTrack(i + 1, audio=True)
+ t = table.Track(i + 1, audio=True)
tracks.append(t)
# FIXME: this probably only works for non-compliant .CUE files
# where pregap is put at end of previous file
diff --git a/morituri/image/table.py b/morituri/image/table.py
index 126158b..0b09221 100644
--- a/morituri/image/table.py
+++ b/morituri/image/table.py
@@ -50,7 +50,7 @@ CDTEXT_FIELDS = [
]
-class ITTrack:
+class Track:
"""
I represent a track entry in an IndexTable.
@@ -117,12 +117,12 @@ class IndexTable(object, log.Loggable):
I represent a table of indexes on a CD.
@ivar tracks: tracks on this CD
- @type tracks: list of L{ITTrack}
+ @type tracks: list of L{Track}
@ivar catalog: catalog number
@type catalog: str
"""
- tracks = None # list of ITTrack
+ tracks = None # list of Track
leadout = None # offset where the leadout starts
catalog = None # catalog number; FIXME: is this UPC ?
cdtext = None
diff --git a/morituri/image/toc.py b/morituri/image/toc.py
index a879b63..f080139 100644
--- a/morituri/image/toc.py
+++ b/morituri/image/toc.py
@@ -142,7 +142,7 @@ class TocFile(object, log.Loggable):
pregapLength = 0
# FIXME: track mode
- currentTrack = table.ITTrack(trackNumber)
+ currentTrack = table.Track(trackNumber)
self.table.tracks.append(currentTrack)
continue
diff --git a/morituri/program/cdrdao.py b/morituri/program/cdrdao.py
index a21546d..75c7df0 100644
--- a/morituri/program/cdrdao.py
+++ b/morituri/program/cdrdao.py
@@ -27,7 +27,7 @@ import signal
import subprocess
import tempfile
-from morituri.common import task, log
+from morituri.common import task, log, common
from morituri.image import toc, table
from morituri.extern import asyncsub
@@ -106,8 +106,8 @@ class OutputParser(object, log.Loggable):
if m and self._track is not None:
track = self.table.tracks[self._track - 1]
frame = (track.getIndex(1).absolute or 0) \
- + int(m.group('hh')) * 60 * 75 \
- + int(m.group('mm')) * 75 \
+ + int(m.group('hh')) * 60 * common.FRAMES_PER_SECOND \
+ + int(m.group('mm')) * common.FRAMES_PER_SECOND \
+ int(m.group('ss'))
self.log('at frame %d of %d', frame, self._frames)
self._task.setProgress(float(frame) / self._frames)
@@ -155,7 +155,7 @@ class OutputParser(object, log.Loggable):
m = _TRACK_RE.search(line)
if m:
self._tracks = int(m.group('track'))
- track = table.ITTrack(self._tracks)
+ track = table.Track(self._tracks)
track.index(1, absolute=int(m.group('start')))
self.table.tracks.append(track)
self.debug('Found track %d', self._tracks)
diff --git a/morituri/test/test_image_cue.py b/morituri/test/test_image_cue.py
index 6d00df9..67a05cd 100644
--- a/morituri/test/test_image_cue.py
+++ b/morituri/test/test_image_cue.py
@@ -57,11 +57,11 @@ class WriteCueFileTestCase(unittest.TestCase):
it = table.IndexTable()
- t = table.ITTrack(1)
+ t = table.Track(1)
t.index(1, path='track01.wav', relative=0, counter=1)
it.tracks.append(t)
- t = table.ITTrack(2)
+ t = table.Track(2)
t.index(0, path='track01.wav', relative=1000, counter=1)
t.index(1, path='track02.wav', relative=0, counter=2)
it.tracks.append(t)
diff --git a/morituri/test/test_image_table.py b/morituri/test/test_image_table.py
index 9a82135..400a84f 100644
--- a/morituri/test/test_image_table.py
+++ b/morituri/test/test_image_table.py
@@ -21,8 +21,8 @@ class LadyhawkeTestCase(unittest.TestCase):
self.table = table.IndexTable()
for i in range(12):
- self.table.tracks.append(table.ITTrack(i + 1, audio=True))
- self.table.tracks.append(table.ITTrack(13, audio=False))
+ self.table.tracks.append(table.Track(i + 1, audio=True))
+ self.table.tracks.append(table.Track(13, audio=False))
offsets = [0, 15537, 31691, 50866, 66466, 81202, 99409,
115920, 133093, 149847, 161560, 177682, 207106]
@@ -56,7 +56,7 @@ class MusicBrainzTestCase(unittest.TestCase):
self.table = table.IndexTable()
for i in range(6):
- self.table.tracks.append(table.ITTrack(i + 1, audio=True))
+ self.table.tracks.append(table.Track(i + 1, audio=True))
offsets = [0, 15213, 32164, 46442, 63264, 80339]
t = self.table.tracks
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list