<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 4 mars 2019 19 h 26, David Ing <<a href="mailto:ding@panopto.com">ding@panopto.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">For about a year I've been having a problem where my gstreamer pipeline would sometimes hang while changing from READY to PAUSED.  Specifically, my call to `gst_element_get_state` would return ASYNC (it would time out).  I eventually determined that this happens when I have a tee (GstTee) having multiple source pads.  There was no problem when the tee had only a single source pad.</div><div dir="ltr"><br></div><div>This felt like a thread deadlock issue related to the tee.  I fixed the problem by putting a queue after each of the tee's source pads.  I am not sure why this fixes in the problem, but I know that adding queues to a pipeline also adds threads behind the scenes.</div><div><br></div><div>Is this a known problem with the tee?</div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">No and this is well documented.</div><div dir="auto"><br></div><div dir="auto"><a href="https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-tee.html">https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-tee.html</a><br></div><div dir="auto"><br></div><div dir="auto">As tee (just like any demuxer) push from a single thread, you can easily endup in a situation where a sink waits for another sink before returning from the chain function. That's because of the preroll, we need all sinks to have data before we can start playback. This is the only way in a push back model to avoid skipping data while making sure streams are on sync from the start.</div><div dir="auto"><br></div><div dir="auto">If queue/thread is a problem for your use case, you may want to try using async property of sync element. Though, some streams may endup skipping to catch up with the first sync that reached ready state. Remember though the GStreamer is a push back model, so each push to each pad of the tee may block for an arbitrary amount of time, e.g on the clock to do pacing.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div></div></div>