[SCM] morituri/master: Set start and length properly on File

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:10:11 UTC 2014


The following commit has been merged in the master branch:
commit 1271ccea18c63088e79f32cd1f52b30105a675e5
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sun Mar 3 23:15:44 2013 +0100

    Set start and length properly on File

diff --git a/morituri/image/toc.py b/morituri/image/toc.py
index 7e19775..4190324 100644
--- a/morituri/image/toc.py
+++ b/morituri/image/toc.py
@@ -239,7 +239,8 @@ class TocFile(object, log.Loggable):
                     self.debug('track %d, switched to new FILE, '
                                'increased counter to %d',
                         trackNumber, counter)
-                currentFile = File(filePath, start, length)
+                currentFile = File(filePath, common.msfToFrames(start),
+                    common.msfToFrames(length))
                 #absoluteOffset += common.msfToFrames(start)
                 currentLength += common.msfToFrames(length)
 
@@ -258,7 +259,7 @@ class TocFile(object, log.Loggable):
                         'increased counter to %d',
                         trackNumber, counter)
                 # FIXME: assume that a MODE2_FORM_MIX track always starts at 0
-                currentFile = File(filePath, 0, length)
+                currentFile = File(filePath, 0, common.msfToFrames(length))
                 #absoluteOffset += common.msfToFrames(start)
                 currentLength += common.msfToFrames(length)
 
@@ -353,13 +354,16 @@ class File:
 
     def __init__(self, path, start, length):
         """
-        @type  path: unicode
+        @type  path:   C{unicode}
+        @type  start:  C{int}
+        @param start:  starting point for the track in this file, in frames
+        @param length: length for the track in this file, in frames
         """
         assert type(path) is unicode, "%r is not unicode" % path
 
         self.path = path
-        #self.start = start
-        #self.length = length
+        self.start = start
+        self.length = length
 
     def __repr__(self):
         return '<File %r>' % (self.path, )

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list