AW: Add sink pad to compositor while playing

Weber, Holger Holger.Weber at telerob.com
Wed Apr 11 07:14:40 UTC 2018


Hi,

with "don't stop the pipeline" I mean, there is a running pipeline (Video playback) and from another thread I call gst_element_get_request_pad(compositor","sink_%u").
After that I add a pad_probe for that pad. The cb gets called an I do the following things:

-          Create elements for the stream I want to add (filesrc, dmuexers etc.)

-          Add elements to the pipeline

-          Link elements

-          Add callback for a needed "pad-added"

-          Return GST_PAD_PROBE_REMOVE

If I activate the debugging output I can see:
aggregator gstaggregator.c:667:gst_aggregator_wait_and_check:<mixer> Waiting for src on thread 0d9e70e

So I guess it's the problem you described. I need to get the new elements in state play, but I don't know how to do that.

Kind Regards,

Von: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org> Im Auftrag von Mathieu Duponchelle
Gesendet: Dienstag, 10. April 2018 18:41
An: gstreamer-devel at lists.freedesktop.org
Betreff: Re: Add sink pad to compositor while playing

Hi,

What do you mean exactly by "stop the pipeline"? I assume you mean the state doesn't actually change,
but compositor simply stops producing buffers?

If you are not using the compositor in "live" mode, ie none of the sources you plug in are live, then compositor
will wait for all pads to have data before mixing the output buffer, this might be the problem you are observing,
either your new source does not push any buffers, or the buffers it does push do not have the expected
timestamps and are simply getting dropped, in which case you might want to set an offset on the pad.

Using GST_DEBUG=*aggregator*:6 should give you more information regarding this issue.
On 04/10/2018 06:23 PM, Weber, Holger wrote:
Hi,
I want to mix multiple video streams into one picture.
Therefore I use the compositor element. I can mix two videos and it seems to work fine (written in C).

One requirement is, to mix only one to up to four (quad view) videos.
Just for a quick test I only added one video source, started the pipeline and later, while the video was running,  I called gst_element_get_request_pad(pData->m_pElMixer, "sink_%u");  which leads to stop the pipeline.
Can that be done this way or do I need to add all four sink pads with fake sources to the compositor before starting and replacing them later?

Kind Regards




_______________________________________________

gstreamer-devel mailing list

gstreamer-devel at lists.freedesktop.org<mailto:gstreamer-devel at lists.freedesktop.org>

https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180411/797ea8c4/attachment.html>


More information about the gstreamer-devel mailing list