def __init__(self, audiofile, strings=None, filename=None): self.filename = filename self.audiofile = audiofile self.touched = True if not strings: strings = [-5, -10, -14, -19, -24, -29] self.appsinkpipeline = Pipeline.AppSinkPipeline(self.audiofile) self.pipeline = Pipeline.Pipeline(self.audiofile) self.timeline = Timeline.Timeline(self, strings) self.timeline.show_all() self.control = VisualizerControl(self.pipeline)
def __init__(self, anim_): self.anim = anim_ # This is the time line object that if at to bottom of # the screen. self.timeline = Timeline(self.anim) # The list of all the user's objects self.animlist = [] # This stores the Z order list of items at a given time. # The key is the time (number) and the value is # a list of items id in the order they appear on screen. self.zorder = {} # Create our rootitem. We put each canvas item in it so at the end we # only have to kill it. The canvas deletes all the items it contains # automaticaly. self.rootitem = goocanvas.Group( parent=self.anim.gcomprisBoard.canvas.get_root_item()) self.pickle_protocol = 2 self.format_string = {'gcompris': 'GCompris anim 3 cPikle file'}