From 7a1a044354716e1181da2ef37957a233de77b16f Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sat, 9 Nov 2013 09:55:39 -0300 Subject: [PATCH] python: Remove old material.py example --- bindings/python/examples/material.py | 44 ---------------------------- 1 file changed, 44 deletions(-) delete mode 100644 bindings/python/examples/material.py diff --git a/bindings/python/examples/material.py b/bindings/python/examples/material.py deleted file mode 100644 index 937697dc8d..0000000000 --- a/bindings/python/examples/material.py +++ /dev/null @@ -1,44 +0,0 @@ -from gi.repository import Gst, GES, GLib - -import os - -class Simple: - def __init__(self, uri): - timeline = GES.Timeline() - trackv = GES.Track.video_raw_new() - self.layer = GES.Layer() - self.pipeline = GES.TimelinePipeline() - self.pipeline.add_timeline(timeline) - - - timeline.add_track(trackv) - timeline.add_layer(self.layer) - - GES.Asset.new_async(GES.UriClip, uri, None, self.discoveredCb, None) - self.loop = GLib.MainLoop() - self.loop.run() - - def discoveredCb(self, asset, result, blop): - self.layer.add_asset(asset, long(0), long(0), long(10 * Gst.SECOND), 1.0, GES.TrackType.VIDEO) - self.start() - - def busMessageCb(self, bus, message, udata): - if message.type == Gst.MessageType.EOS: - print "EOS" - self.loop.quit() - if message.type == Gst.MessageType.ERROR: - print "ERROR" - self.loop.quit() - - def start(self): - self.pipeline.set_state(Gst.State.PLAYING) - self.pipeline.get_bus().add_watch(GLib.PRIORITY_DEFAULT, self.busMessageCb, None) - -if __name__ == "__main__": - if len(os.sys.argv) < 2: - print "You must specify a file URI" - exit(-1) - GES.init() - - # And try! - Simple(os.sys.argv[1])