Reputation: 31
I would like to develop an application using monodevelop
.
Since I need to playback audio and video with Gstreamer# (in fact I have to use Gstreamer-#), I did my best to figure out how I can do this, but unfortunately, I have not found any suitable link.
If anyone knows something I'll appreciate it if you share it with me.
Upvotes: 3
Views: 658
Reputation: 153
Like the doc says, you need to reference gstreamer-sharp.dll, which in turn requires gstreamersharpglue-0.10.dll in the same dir.
Gst.Application.Init(); // First init GStreamer - important!!
var pipeDescription = "playbin uri=myVid.avi name=myBin";
var pipeline = Gst.Parse.Launch(pipeDescription) as Gst.Bin; //Launch Pipeline
var someElementInPipe = pipeline.GetChildByName("myBin") as Gst.Element;
pipeline.SetState(Gst.State.Playing);
----OR use ElementFactory for manual pipe-construction----
Gst.Application.Init();
var pipeline = new Gst.Pipeline();
var elementA = Gst.ElementFactory.Make("someElement");
var elementB = Gst.ElementFactory.Make("someElement");
pipeline.Add(elementA, elementB);
elementA.Link(elementB);
pipeline.SetState(Gst.State.Playing);
For more examples check out the following tests: http://cgit.freedesktop.org/gstreamer/gstreamer-sharp/tree/tests
Upvotes: 1