AW: Add sink pad to compositor while playing
Weber, Holger
Holger.Weber at telerob.com
Wed Apr 11 12:32:49 UTC 2018
Hi,
I did some more testing and the strem I added seems to start, but than there is a poroblem with pad negotiation.
After adding the new pipeline part and connecting it to the compositor I get the following errors.
0:00:03.953236964 4232 da11480 ERROR videoaggregator gstvideoaggregator.c:882:gst_video_aggregator_pad_sink_setcaps:<mixer:sink_2> got input caps video/x-raw, format=(string)I420, width=(int)720, height=(int)576, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)12/11, chroma-site=(string)mpeg2, colorimetry=(string)bt601, framerate=(fraction)25/1, but current caps are video/x-raw, format=(string)I420, width=(int)785, height=(int)576, framerate=(fraction)25/1, chroma-site=(string)mpeg2
0:00:03.953341177 4232 da11480 ERROR videoaggregator gstvideoaggregator.c:882:gst_video_aggregator_pad_sink_setcaps:<mixer:sink_2> got input caps video/x-raw, format=(string)I420, width=(int)720, height=(int)576, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)12/11, chroma-site=(string)mpeg2, colorimetry=(string)bt601, framerate=(fraction)25/1, but current caps are video/x-raw, format=(string)I420, width=(int)785, height=(int)576, framerate=(fraction)25/1, chroma-site=(string)mpeg2
0:00:03.953698368 4232 da11480 ERROR videoaggregator gstvideoaggregator.c:882:gst_video_aggregator_pad_sink_setcaps:<mixer:sink_2> got input caps video/x-raw, format=(string)I420, width=(int)720, height=(int)576, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)12/11, chroma-site=(string)mpeg2, colorimetry=(string)bt601, framerate=(fraction)25/1, but current caps are video/x-raw, format=(string)I420, width=(int)785, height=(int)576, framerate=(fraction)25/1, chroma-site=(string)mpeg2
0:00:03.953821082 4232 da11480 ERROR videoaggregator gstvideoaggregator.c:882:gst_video_aggregator_pad_sink_setcaps:<mixer:sink_2> got input caps video/x-raw, format=(string)I420, width=(int)720, height=(int)576, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)12/11, chroma-site=(string)mpeg2, colorimetry=(string)bt601, framerate=(fraction)25/1, but current caps are video/x-raw, format=(string)I420, width=(int)785, height=(int)576, framerate=(fraction)25/1, chroma-site=(string)mpeg2
0:00:03.953939643 4232 da11480 ERROR videoaggregator gstvideoaggregator.c:882:gst_video_aggregator_pad_sink_setcaps:<mixer:sink_2> got input caps video/x-raw, format=(string)I420, width=(int)720, height=(int)576, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)12/11, chroma-site=(string)mpeg2, colorimetry=(string)bt601, framerate=(fraction)25/1, but current caps are video/x-raw, format=(string)I420, width=(int)785, height=(int)576, framerate=(fraction)25/1, chroma-site=(string)mpeg2
0:00:03.954044610 4232 da11480 ERROR videoaggregator gstvideoaggregator.c:882:gst_video_aggregator_pad_sink_setcaps:<mixer:sink_2> got input caps video/x-raw, format=(string)I420, width=(int)720, height=(int)576, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)12/11, chroma-site=(string)mpeg2, colorimetry=(string)bt601, framerate=(fraction)25/1, but current caps are video/x-raw, format=(string)I420, width=(int)785, height=(int)576, framerate=(fraction)25/1, chroma-site=(string)mpeg2
Error: Internal data stream error.
Returned, stopping playback
0:00:03.954949672 4232 da11480 ERROR videoaggregator gstvideoaggregator.c:882:gst_video_aggregator_pad_sink_setcaps:<mixer:sink_2> got input caps video/x-raw, format=(string)I420, width=(int)720, height=(int)576, interlace-mode=(string)mixed, pixel-aspect-ratio=(fraction)12/11, chroma-site=(string)mpeg2, colorimetry=(string)bt601, framerate=(fraction)25/1, but current caps are video/x-raw, format=(string)I420, width=(int)785, height=(int)576, framerate=(fraction)25/1, chroma-site=(string)mpeg2
The added stream has the same format than the already running streams. I didn't set any caps or added videoconverter elements - so I'm not sure if that's the issue.
Kind Regards,
Von: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org> Im Auftrag von Weber, Holger
Gesendet: Mittwoch, 11. April 2018 09:15
An: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
Betreff: AW: Add sink pad to compositor while playing
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<mailto: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<mailto: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/4586997f/attachment-0001.html>
More information about the gstreamer-devel
mailing list