gStreamer pipeline construction failure.
r.tucker at thermoteknix.com
Tue Mar 13 07:41:39 PDT 2012
We've just started trying out gStreamer-Sharp to see if we can create
pipelines with a view to writing a media player component for our C#
software. Some pipelines can be created, linked and run no problem, but
others fail. Anyway I have a repro-case below that fails to link from
an avidemux element into an mpeg4 element programmatically, although it
works on the command line. Is there something really basic we're doing
We also don't seem to be able to get logging up and running from the
software either, although obviously the command-line displays it. Is this
Thanks for any help you can give.
public partial class MainForm : Form
#region Private Variables
private Gst.Pipeline MyPipeline;
private Gst.Element MyFileSource, MyDemux, MyMpeg4, MyDrawSink;
// Overlay adapter.
private XOverlayAdapter MySinkAdapter;
// Initialise gStreamer.
// Create new pipeline.
MyPipeline = new Gst.Pipeline();
Pipeline pipeline = new Pipeline("pipeline");
// Construct pipeline filescr -> avidemux -> mpeg4 ->
MyFileSource = ElementFactory.Make("filesrc", "filesrc");
MyFileSource["location"] = "c:\\test.mp4";
MyDemux = ElementFactory.Make("avidemux", "avidemux");
MyMpeg4 = ElementFactory.Make("ffdec_mpeg4", "ffdec_mpeg4");
MyDrawSink = ElementFactory.Make("directdrawsink",
// Output to our window.
MySinkAdapter = new XOverlayAdapter(MyDrawSink.Handle);
MySinkAdapter.XwindowId = (ulong)this.Handle;
// Add and link pipeline.
MyPipeline.Add(MyFileSource, MyDemux, MyMpeg4, MyDrawSink);
// FAILS HERE
// Play video.
More information about the gstreamer-devel