Safely Ghost src-Pad of running tee-Element

Peter Körner ml at mazdermind.de
Fri Mar 13 18:39:36 UTC 2020


Hi there.

I'm writing a bin that contains a tee-Element on the output-side.

It has a custom Method for requesting a Pad.
In this Method I basicly call gst_element_get_request_pad on the tee
and get a new src-Pad, that is not linked.

gstpad.c:gst_pad_push_data logs "pushing, but it was not linked" which
I think is fine.

I now call gst_ghost_pad_new with a useful Name and the src-Pad as
Target.

stpad.c:gst_pad_push_data now logs "error pushing events, return
flushing" and the upstream src in front of the tee fails with "Internal
data stream error", presumeably because the tee's pad is now linked to
the ghost-pad.

So I guess this is not the correct way to create a GhostPad for a
running src-Element.

https://gstreamer.freedesktop.org/documentation/application-development/advanced/pipeline-manipulation.html#dynamically-changing-the-pipeline

talks about blocking a src-Pad prior to unlinking it, which makes
perfectly sense, but it does not talk about the correct process to
ghost running src-pads.

I'm running on 1.16.1.

Best Regards,
Peter




More information about the gstreamer-devel mailing list