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

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


Hi,

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
gst_element_factory_make()

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.

Thanks

David

On 12 December 2011 23:17, kevin kelly <go4save at gmail.com> 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: http://gstreamer-devel.966125.n4.nabble.com/help-How-does-an-element-know-it-is-added-into-the-pipeline-tp4188089p4188089.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list