X-Git-Url: https://git.ao2.it/vidi-player.git/blobdiff_plain/4ed04d98bb6205b3d96ab924991a1adc7a9465f3..053eff8c0013a6ad620b1d29638133fdaff5c7f5:/vidi/Timeline.py?ds=inline diff --git a/vidi/Timeline.py b/vidi/Timeline.py index 43bb9c9..fe98677 100755 --- a/vidi/Timeline.py +++ b/vidi/Timeline.py @@ -43,6 +43,10 @@ class Timeline(object): self.layer = self.timeline.append_layer() + ges_pipeline = GES.Pipeline() + ges_pipeline.set_timeline(self.timeline) + self.player = Player(ges_pipeline) + def add_clip(self, clip_path, start_time, duration): clip_uri = Gst.filename_to_uri(clip_path) asset = GES.UriClipAsset.request_sync(clip_uri) @@ -51,10 +55,10 @@ class Timeline(object): def play(self): self.timeline.commit() + self.player.play() - ges_pipeline = GES.Pipeline() - ges_pipeline.set_timeline(self.timeline) - Player(ges_pipeline).play() + def stop(self): + self.player.stop() def save(self, path): uri = Gst.filename_to_uri(path)