Forum

Thread usage in vvvv plugins

Hello vvvvrothers,

I am currently working on a contribution to enable recording and playback of Kinect2 data via the KinectStudio API. So far things are working OK but in order to output some information, such as BufferSize usage during recording and current relative time during playback in a responsive manner, I think I need to use threads.

As things are currently implemented (no threads whatsoever), vvvv’s UI BufferSize data gets updated randomly or as long as I am moving my mouse. The desired behavior however would be for this values to be updated automatically in real time as soon as new values are available.

In my implementation I am just passing the recorder’s BufferUsage value to an output pin inside the Evaluate method of my custom plugin.

How is such as scenario usually managed? What are the best practices?

I can provide code and more information as needed.

Thanks in advance for any help you can provide.

Happy patching!