~nagos/openshot/nagos

« back to all changes in this revision

Viewing changes to openshot/classes/track.py

  • Committer: Jonathan Thomas
  • Date: 2010-01-28 07:39:38 UTC
  • Revision ID: jonathan@jonathan64-20100128073938-xlmzndtbuqwgtama
Bumped version to 1.0.3

Intergrated a patch from Cody to fix some translation
strings missing (i.e. Track 1, Track 2)

Improved the speed of GenerateXML() 1300%.  This was mainly due to 
a very poor project.fps() method, which was slow and used all
over the place.  So, I tried to not call the method as much,
and I implemented some caching of the fps value.

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
                        
104
104
                        
105
105
                        
106
 
        def GenerateXML(self, dom, xmlParentNode):
 
106
        def GenerateXML(self, dom, xmlParentNode, fps=None):
107
107
                
108
108
                playlist = dom.createElement("playlist")
109
109
                playlist.setAttribute("id", self.name)
115
115
                for MyClip in self.clips:
116
116
                        
117
117
                        # Render track                  
118
 
                        current_frame = MyClip.GenerateXML(dom, playlist, current_frame)
 
118
                        current_frame = MyClip.GenerateXML(dom, playlist, current_frame, fps=fps)
119
119
 
120
120
 
121
121