From 59d336e34153115464426357afab9a7ac85a55d3 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Mon, 28 Nov 2016 13:32:17 +0100 Subject: [PATCH 1/1] vidi/Timeline.py: move pipeline player initialization to the __init__ method --- vidi/Timeline.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vidi/Timeline.py b/vidi/Timeline.py index 43bb9c9..c1e9698 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,7 @@ class Timeline(object): def play(self): self.timeline.commit() - - ges_pipeline = GES.Pipeline() - ges_pipeline.set_timeline(self.timeline) - Player(ges_pipeline).play() + self.player.play() def save(self, path): uri = Gst.filename_to_uri(path) -- 2.1.4