Multithreaded plugin

Patrick Doyle wpdster at gmail.com
Fri Oct 24 18:10:12 PDT 2014


Hello Experts,
I need to process live (30fps) video on a frame-by-frame basis.  The
problem is, my algorithm takes longer than 33ms per frame to operate
(on my fast i7).  So the natural thing to do is to split up my
processing into 2 threads.  Since my algorithm treats each frame
independently, the simplest thing I can think of to do (and which I
have done in the past) is to run 3 threads - a "manager" thread and 2
"worker" threads.  The "manager" thread would hand every other thread
to each worker thread, and harvest the results.

So here are my questions:

Is this a common idiom in gstreamer?

Is it common enough that there are hooks, templates, or "classes" that
make it easy to do?

Thanks for any tips you can give me.

--wpd


More information about the gstreamer-devel mailing list