setcaps function for ghost pads never called

Stas Sergeev stsp at list.ru
Fri Sep 2 07:48:51 PDT 2011


Hi.

I am writing the bin element, and I want it
to be able to "sniff" the caps negotiation of its
children elements.
It turned out the setcaps function set on the
ghost pad, is never called. The reason for the
"src" pad is that on_src_target_notify() silently
changes the caps as soon as the target's caps
are changed, and then gst_pad_set_caps() does
nothing when data buffer arrives.
I wonder if it is a design decision or a bug?
Can on_src_target_notify() just use gst_pad_set_caps()
so that the handler can be activated?
Or, if it is a design decision, how can I make the
bin element to intercept the caps negotiations?
But, if it is a design decision, it is probably a bad
one anyway: gst_pad_set_setcaps_function() should
then check that this is a ghost pad and write a
critical error at least.

PS: I am using gstreamer-0.10.31, does the newer
ones behave differently? Looking at the git code,
its still the same.


More information about the gstreamer-devel mailing list