Search code examples
c#pipelinegstreamer

Direct use of gstreamer-sharp (without command line)


I use gstreamer-sharp as follows:

var pipeDescription = "playbin uri=file:///a:/test.avi ";
var pipeline = Gst.Parse.Launch(pipeDescription) as Gst.Bin;  

As far as I understand, it starts gstreamer's launcher and gives parameters to gstreamer. It is the same how I will launch gstreamer from the command line.

Is this the only choice to work with gstreamer? Can I use these functions, as in other libraries(function();), without indirectly using the command line? Is this possible for cross platform use if I use gst-launch.exe?


Solution

  • Parse.Launch does not use the command line indirectly, it just behaves like gst-launch. You can also create an element using the ElementFactory and pass it the parameters like this:

    var playbin = ElementFactory.Make("playbin", "my-playbin");
    playbin["uri"] = "file:///a:/test.avi";