- Posts: 21
- Joined: Mon Mar 30, 2015 10:35 am
- Location: Leipzig, Germany
Hi Steffen,
Thanks for providing your sample application - what version of Desktop Video are you running? Is the dropped frame always on a specific input channel or is it unpredictable?
I have run the project - I am working with 8 channels on DeckLink Quad 2 card, 1080p59.94. I have added approx 90 threads with 90% CPU load, but yet to see frame drop message.
There are a few things I picked up in the design:
1) It is possible (although uncommon) for VideoInputFrameArrived callback to occur with IDeckLinkVideoInputFrame* object equal NULL, even with active input capture. This could occur if there was delay for hardware access on video frame, however there are sufficient samples in audio buffer.
The issue with this is that the first call to AddRef() will create a valid COM object, and will call GetStreamTime() with unpredictable output.
2) There are calls to WaitForSingleObject(HANDLE) within the callback. Although use of mutexes are key to reliable multi-threaded applications, you need to ensure that the Callbacks are processed in reasonable timeframe so as not to block driver. It would be better to use non-blocking PostMessage and construct m_lErrors outside callback.
I hope this helps.
Kind Regards
Cameron Nichols