Reply To: Bypass QCRenderer single-thread limitation

Home Forums Syphon Syphon Development – Developer Bypass QCRenderer single-thread limitation Reply To: Bypass QCRenderer single-thread limitation


You can init and run QCRenderers from multiple threads (like, a CVDisplayLink thread), but you have to be sure to init them, call executeAtTime and dealloc them all from *the same* thread. You cannot bounce them across threads.

So you can have multiple QCRenderers on multiple threads, assuming they never leave where they were alloc/initted from.

Syphon does not init or run QC Compositions / QCRenderers in the framework, its agnostic on rendering back ends, as long as its OpenGL based 🙂 So it cant help you with regards to opening compositions.

To be clear however, you can setValue: forInputKey from values that come from different threads. IE, if you render a comp, get out a CVOpenGLBuffer image from it, you can then move that to another thread. I dont think that should leak, as you are responsible for cleaning up the value of the output key. You do need to retain it, and ensure locking happens in threaded scenarios.

I believe that is correct, some software does use QCRenderers on threads other than the main thread without issue.

Is that information useful?