X-Git-Url: https://git.ao2.it/vidi-player.git/blobdiff_plain/0d79a5bbce33df27b08acf2dd67009bc9f5dd205..4ed04d98bb6205b3d96ab924991a1adc7a9465f3:/vidi/Timeline.py diff --git a/vidi/Timeline.py b/vidi/Timeline.py index 48c6181..43bb9c9 100755 --- a/vidi/Timeline.py +++ b/vidi/Timeline.py @@ -43,7 +43,8 @@ class Timeline(object): self.layer = self.timeline.append_layer() - def add_clip(self, clip_uri, start_time, duration): + def add_clip(self, clip_path, start_time, duration): + clip_uri = Gst.filename_to_uri(clip_path) asset = GES.UriClipAsset.request_sync(clip_uri) self.layer.add_asset(asset, start_time * Gst.SECOND, 0, duration * Gst.SECOND, GES.TrackType.UNKNOWN) @@ -55,5 +56,6 @@ class Timeline(object): ges_pipeline.set_timeline(self.timeline) Player(ges_pipeline).play() - def save(self, uri): + def save(self, path): + uri = Gst.filename_to_uri(path) self.project.save(self.timeline, uri, None, False)