posts:gstreamer:beep: add Jono Bacon's GStreamer beep tutorial.
authorJono Bacon <jono@jonobacon.org>
Mon, 12 Oct 2009 18:59:39 +0000 (18:59 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 14 Sep 2012 16:25:52 +0000 (12:25 -0400)
From:
  http://www.jonobacon.org/2006/08/28/getting-started-with-gstreamer-with-python/
  http://jonobacon.org/files/gstreamertutorial-1.py

posts/GStreamer/beep.py [new file with mode: 0644]

diff --git a/posts/GStreamer/beep.py b/posts/GStreamer/beep.py
new file mode 100644 (file)
index 0000000..172c31c
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+import pygst
+pygst.require("0.10")
+import gst
+import pygtk
+import gtk
+
+class Main:
+       def __init__(self):
+               self.pipeline = gst.Pipeline("mypipeline")
+
+               self.audiotestsrc = gst.element_factory_make("audiotestsrc", "audio")
+               self.pipeline.add(self.audiotestsrc)
+
+               self.sink = gst.element_factory_make("alsasink", "sink")
+               self.pipeline.add(self.sink)
+
+               self.audiotestsrc.link(self.sink)
+
+               self.pipeline.set_state(gst.STATE_PLAYING)
+
+start=Main()
+gtk.main()