using GLib; using Gst; namespace Tests { public class Test1 { public static void main(string[] args) { MainLoop loop; Element src; Element sink; Pipeline pipeline; // Creating a GLib main loop with a default context loop = new MainLoop (null, false); // Initializing GStreamer Gst.init (out args); // Creating pipeline and elements pipeline = new Pipeline ("test"); src = ElementFactory.make ("audiotestsrc", "my_src"); sink = ElementFactory.make ("autoaudiosink", "my_sink"); // Adding elements to pipeline pipeline.add (src); pipeline.add (sink); // Linking source to sink src.link (sink); // Setting waveform to square src.set ("wave", 1); // Set pipeline state to PLAYING pipeline.set_state (State.PLAYING); // Start GLib mainloop loop.run (); } } }