<html><head></head><body><div>On Fri, 2021-05-28 at 06:15 -0500, darksidds via gstreamer-devel wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>I'm trying to organize GStreamer 'multithreaded' element. It should has one<br></div><div>sink and one source pad and perform a time consuming operation on each video<br></div><div>frame. In order to provide real-time processing (30 fps) I would like to<br></div><div>dispatch the operation to workers pool and then gather all results in a<br></div><div>queue (maybe priority queue based on timecode).<br></div><div><br></div><div>Does GStreamer provide such facilities? Are there any examples? Or<br></div><div>well-known approaches which I'm not aware of.</div></blockquote><div><br></div><div>There's nothing directly built into GStreamer but you can take a look at the videoconvert/videoscale elements (or rather the GstVideoConverter backing both) and the compositor element.</div><div><br></div><div>These are all using worker threads to do the processing in parallel on multiple CPU cores.</div><div>They also have some kind of helper type that allows splitting the problem into multiple tasks and then waiting until all are finished.</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote><div><br></div><div><span><pre>-- <br></pre><div data-evo-paragraph="" class="" style="width: 71ch;" data-evo-signature-plain-text-mode="">Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com">https://www.centricular.com</a></div><div data-evo-paragraph="" class="" style="width: 71ch;"><br></div></span></div></body></html>