From b39debb27ae25e483923231ef7433b0152e1e22a Mon Sep 17 00:00:00 2001 From: Jono Bacon Date: Mon, 12 Oct 2009 18:59:39 +0000 Subject: [PATCH] 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 --- posts/GStreamer/beep.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 posts/GStreamer/beep.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() -- 2.26.2