[gst-devel] plugins knowing about other plugins

Dezelon, Mark dez at ti.com
Fri Mar 4 15:53:29 CET 2005

> > My question is:  Can a plugin query GStreamer to figure out 
> > what other plugins are linked to its pads?  If so, when does
> > this occur?

Gergely Nagy wrote:
> You can do a gst_pad_get_parent (gst_pad_get_peer (pad)) in, 
> for example the _link() function for your srcpad, and then
> figure out whether the peer is the right element (eg, by
> checking a custom property, or something like that).

Thanks!  I used gst_pad_get_peer() and everything works like charm.  I
obtain the linked pad, then I get it's parent, and I check that parent's
class.  If they're the same, I attempt to share resources; otherwise I
just behave like a typical GStreamer plugin.

Maciej Katafiasz wrote:
> This has been discussed recently, see:
> http://thread.gmane.org/gmane.comp.video.gstreamer.devel/12319
> http://thread.gmane.org/gmane.comp.video.gstreamer.devel/12387
> http://thread.gmane.org/gmane.comp.video.gstreamer.devel/12458

A link is worth a thousand words.  Also, the third link helped me to
solve yet another problem (this one about events) without having to ask
this mailing list.  Thanks for your help, too!

-- Mark Dezelon / dez at ti.com / Don't Panic! --

More information about the gstreamer-devel mailing list