GStreamer workers to speed up a GstElement

Sebastian Dröge sebastian at
Fri May 28 14:16:54 UTC 2021

On Fri, 2021-05-28 at 06:15 -0500, darksidds via gstreamer-devel wrote:
> I'm trying to organize GStreamer 'multithreaded' element. It should
> has one
> sink and one source pad and perform a time consuming operation on
> each video
> frame. In order to provide real-time processing (30 fps) I would like
> to
> dispatch the operation to workers pool and then gather all results in
> a
> queue (maybe priority queue based on timecode).
> Does GStreamer provide such facilities? Are there any examples? Or
> well-known approaches which I'm not aware of.

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.

These are all using worker threads to do the processing in parallel on
multiple CPU cores.
They also have some kind of helper type that allows splitting the
problem into multiple tasks and then waiting until all are finished.

Sebastian Dröge, Centricular Ltd ·

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list