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 GStremer Gst.init(out args); // Creating pipeline and elements pipeline = new Pipeline ("test"); src = ElementFactory.make ("audiotestsrc", "my_src"); sink = ElementFactory.make ("pulsesink", "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 GStreamer mainloop loop.run (); } } }