Good practice :question about gst_parse_launch

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

Good practice :question about gst_parse_launch

Potoman
Hello,

I would like to start 4 pipeline like that :

udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink

I would like to know if it's a good practice to launch this pipeline 4 times in one call of gst_parse_launch ?

And use gst_get_element_by_name (sorry, I don't remember exactly the function name) to retrieve all the appsink.

The code line look like :

gst_parse_launch("udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink name=app0 udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink name=app1 udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink name=app0 udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink name=app2 udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink name=app0 udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink name=app3");

I ask this question cause I wonder if one of the udpsrc doesn't received any data from ip/port can affect streaming of the other udpsrc.

Thank.
Reply | Threaded
Open this post in threaded view
|

Re: Good practice :question about gst_parse_launch

Thiago Sousa Santos-2


On Sat, Jan 21, 2017 at 12:11 PM, Potoman <[hidden email]> wrote:
Hello,

I would like to start 4 pipeline like that :

udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink

*I would like to know if it's a good practice to launch this pipeline 4
times in one call of gst_parse_launch ?*

And use gst_get_element_by_name (sorry, I don't remember exactly the
function name) to retrieve all the appsink.

The code line look like :

gst_parse_launch("udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink
name=app0 udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink
name=app1 udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink
name=app0 udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink
name=app2 udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink
name=app0 udpsrc ! rtph264depay ! decodebin ! videconvert ! appsink
name=app3");

I ask this question cause I wonder if one of the udpsrc doesn't received any
data from ip/port can affect streaming of the other udpsrc.

Elements in the same GstPipeline will share a single GstClock. Meaning they will synchronize against the same clock and their playback will be in sync. If one udpsrc doesn't receive data for a while, the clock will keep moving forward as usual and that data (from that udpsrc) might be too late to be played once it is received (the same would be true with a single udpsrc per pipeline). If you need playback to be in sync, you should use a single pipeline.

Side note: You can use an element to do buffering and post buffering messages (queue2) to notify you if one of those udpsrc isn't receiving data fast enough so you can pause the pipeline and stop the clock. This can also make other udpsrc's data be dropped or stop receiving data if their queues get full. Need to balance queue sizes correctly for your network expectations.

If synchronous playback is not a concern, you can use separate pipelines with queue2 and react to buffering messages being able to pause pipelines independently without affecting other pipelines.



Thank.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Good-practice-question-about-gst-parse-launch-tp4681581.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
Thiago Sousa Santos

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