Languages

audio

GStreamer Audio Stream Example

4
Your rating: None Average: 4 (2 votes)
using Gst;
 
public class StreamPlayer {
 
    private MainLoop loop = new MainLoop (null, false);
 
    private void foreach_tag (Gst.TagList list, string tag) {
        switch (tag) {
        case "title":
            string tag_string;
            list.get_string (tag, out tag_string);
            stdout.printf ("tag: %s = %s\n", tag, tag_string);
            break;
        default:
            break;
        }
    }
 
    private bool bus_callback (Gst.Bus bus, Gst.Message message) {
        switch (message.type) {
        case MessageType.ERROR:
            GLib.Error err

GStreamer audio example

0
Your rating: None
using Gst;
 
public void main (string[] args) {
    Element src;
    Element sink;
    Pipeline pipeline;
 
    // Initializing GStreamer
    Gst.init (ref args);
 
    // Creating pipeline and elements
    // NOTE: The return type of the pipeline construction method is Element,
    // not Pipeline, so we have to cast
    pipeline = (Pipeline) new Pipeline ("test");
    src = ElementFactory.make ("audiotestsrc", "my_src");
    sink = ElementFactory.make ("autoaudiosink", "my_sink");
 
    // Adding elements to pipeline
    pipeline.add_many (src, sink);
 
    // Linking source t
Syndicate content