[gst-devel] Converting a gst-launch pipeline to C code

Tim-Philipp Müller t.i.m at zen.co.uk
Sat Oct 3 11:39:35 CEST 2009

On Fri, 2009-10-02 at 15:01 -0700, MSJ wrote:

> I'm trying to do the same, but my pipeline doesn't seem to work; if I removed
> either of the lines marked *** then video or audio play, but having both
> lines doesn't seem to work.  I've been trying evrything, and I notice than
> in the working case I get an sync-done message which I don't get in the
> other cases.  I appreaciate any insight.

An async-done message just means that the pipeline has prerolled and
data has made it through to all the sinks.

No idea why things work if you remove either of those statements, but
the easiest way to see what's happening is usually to follow the data:
if a pipeline doesn't preroll, data doesn't make it to one of the sinks,
so you should figure out where it doesn't get through. This (equivalent
to gst-launch's -v switch) might provide some pointers in the right

    g_signal_connect (pipeline, "deep-notify",
        G_CALLBACK (gst_object_default_deep_notify), NULL);

You might also consider adding the audio/video bin only in the callback
when you get the pad you will link them to (don't forget to do
gst_element_set_state(blabin,GST_STATE_PLAYING) then after you
gst_bin_add()ed it).

Just to be sure: you know about gst_parse_launch() and
gst_parse_bin_from_description(), right?

Also, any reason you're not using uridecodebin or playbin2 here?


More information about the gstreamer-devel mailing list