GStreamer workers to speed up a GstElement

Nicolas Dufresne nicolas at
Fri May 28 13:05:31 UTC 2021

Le vendredi 28 mai 2021 à 06:15 -0500, darksidds via gstreamer-devel a écrit :
> 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.

The final method will depend on the parallelism method used. GStreamer is using
GLib as it's OS abstraction, and GLib provide thread pools and synchronisation
primitives required. Additionally, you can you use GstPad task for streaming

GStreamer unfortunately does not have a global worker thread pool that would
allow multiple element to cooperate in multi-threading. There is a Rust
implement set of element, threadshare, that implement such cooperation though.

> Thanks in advance.
> --
> Sent from:
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at

More information about the gstreamer-devel mailing list