From: Jono Bacon <jono@jonobacon.org>
Date: Mon, 12 Oct 2009 18:59:39 +0000 (+0000)
Subject: posts:gstreamer:beep: add Jono Bacon's GStreamer beep tutorial.
X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b39debb27ae25e483923231ef7433b0152e1e22a;p=mw2txt.git

posts:gstreamer:beep: add Jono Bacon's GStreamer beep tutorial.

From:
  http://www.jonobacon.org/2006/08/28/getting-started-with-gstreamer-with-python/
  http://jonobacon.org/files/gstreamertutorial-1.py
---

diff --git a/posts/GStreamer/beep.py b/posts/GStreamer/beep.py
new file mode 100644
index 0000000..172c31c
--- /dev/null
+++ b/posts/GStreamer/beep.py
@@ -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()