GStreamer workers to speed up a GstElement

Nicolas Dufresne nicolas at ndufresne.ca
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
thread.

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: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list