python: Remove old material.py example
authorThibault Saunier <thibault.saunier@collabora.com>
Sat, 9 Nov 2013 12:55:39 +0000 (09:55 -0300)
committerThibault Saunier <thibault.saunier@collabora.com>
Sat, 9 Nov 2013 13:35:13 +0000 (10:35 -0300)
bindings/python/examples/material.py [deleted file]

diff --git a/bindings/python/examples/material.py b/bindings/python/examples/material.py
deleted file mode 100644 (file)
index 937697d..0000000
+++ /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])