[gst-devel] Pipeline state and negotiated caps.

Axel Philipsenburg axel.philipsenburg at hobnox.com
Tue Jun 23 14:18:43 CEST 2009


Hi everyone!

Since a few days I'm toying around with gstreamer. Got to say,
I'm in love with the concept and the amount of language bindings.
Good job!

And of course I ran into my first dead end while trying to do
a simple transcoding application.

The problem is, that I can't reliably retrieve negotiated
capabilities from pads.

Here's what I do, using the Java bindings:

I link a filesource and a decodebin element and connect
a class to its PAD_ADDED event (signal?).

When this event fires, I link a fakesink element to each
created pad and store the pads in a list.

Then I set the pipeline to PAUSE, try to wait for it to reach that
state and then use the list of pads to retrieve their negotiated
caps.

This works sometimes, especially if I delay the retrieval
some seconds after setting the pipeline to PAUSE.

My question is, is this the right way at all to retrieve
informations such as video resolution? I suppose the
reason that I sometimes don't get the negotiated caps
properly  is the fact that they are still not set then.
The video might be still prerolling, as I understand
that setting the state is a non-blocking function.

Thanks a lot in advance!

See ya,

Axel








More information about the gstreamer-devel mailing list