Safely Ghost src-Pad of running tee-Element

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Safely Ghost src-Pad of running tee-Element

MaZderMind
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


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Safely Ghost src-Pad of running tee-Element

MaZderMind
Answering my own post: After writing the mail I had an idea and it
seems to work as follows:

After reqiuesting the new Pad from the tee, I can block on this Pad
using an IDLE-Probe and inside that Probe I can then safely create a
GhostPad and link it.

That seems to make this part of the Pipeline solid.

Regards, Peter


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel