~openshot.developers/openshot/debian-packages

« back to all changes in this revision

Viewing changes to openshot/openshot/classes/timeline.py

  • Committer: Jonathan Thomas
  • Date: 2010-02-08 00:38:50 UTC
  • Revision ID: jonathan@jonathan64-20100208003850-i03t93q4vob0wmp8
Fixed the following Debian packaging issues:
-----------
Updated the control file to include a better description,
 new standards-version, updated dependencies.

Removed the /openshot/ source from this branch... since
it should be added by renaming and extracting the source
tar.gz file.

Added 2 folders, one for debian and one for my 
LaunchPad ppa (which has a different changelog)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#       OpenShot Video Editor is a program that creates, modifies, and edits video files.
2
 
#   Copyright (C) 2009  Jonathan Thomas
3
 
#
4
 
#       This file is part of OpenShot Video Editor (http://launchpad.net/openshot/).
5
 
#
6
 
#       OpenShot Video Editor is free software: you can redistribute it and/or modify
7
 
#       it under the terms of the GNU General Public License as published by
8
 
#       the Free Software Foundation, either version 3 of the License, or
9
 
#       (at your option) any later version.
10
 
#
11
 
#       OpenShot Video Editor is distributed in the hope that it will be useful,
12
 
#       but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
#       GNU General Public License for more details.
15
 
#
16
 
#       You should have received a copy of the GNU General Public License
17
 
#       along with OpenShot Video Editor.  If not, see <http://www.gnu.org/licenses/>.
18
 
 
19
 
 
20
 
 
21
 
class timeline:
22
 
        """This class contains methods to simply displaying time codes"""
23
 
 
24
 
        #----------------------------------------------------------------------
25
 
        def __init__(self):
26
 
                """Constructor"""
27
 
                
28
 
 
29
 
        def get_friendly_time(self, milli):
30
 
                """Convert milliseconds to a tuple of the common time"""
31
 
                sec, milli = divmod(milli, 1000)
32
 
                min, sec = divmod(sec, 60)
33
 
                hour, min = divmod(min, 60)
34
 
                day, hour = divmod(hour, 24)
35
 
                week, day = divmod(day, 7)
36
 
                
37
 
                return (week, day, hour, min, sec, int(milli))
 
 
b'\\ No newline at end of file'