help! How does an element know it is added into the pipeline?

David Walker dwalker0044 at
Tue Dec 13 01:06:46 PST 2011


To see if an element is added to the pipeline you can use:
gst_bin_get_by_name((GstBin *)pipeline, "decoder");
where "decoder" was the name given when you created the element using

To see if the element is linked, you'll need to get the pad you want
to test, and then use gst_pad_get_peer() to get the pad it is
connected to. Finally you'll  need to use gst_pad_get_parent_element
on the peer pad to get the element.

There might be better way of doing this, but this is what I'd do.



On 12 December 2011 23:17, kevin kelly <go4save at> wrote:
> Hello,there,
> I am writing a decoder plugin and I need send an upstream event to its peer
> element to send some information to its peer element before the state
> changed to playing.
> My questions is how can I know that the decoder element is added into the
> pipeline or how the decoder element know it is linked with its upstream peer
> element?
> thanks a lot  for your input.
> --
> View this message in context:
> Sent from the GStreamer-devel mailing list archive at
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at

More information about the gstreamer-devel mailing list