Page 1 of 1

GetAvailableVideoFrameCount() always returns 0

PostPosted: Thu Feb 15, 2018 10:36 pm
by notnot
I am developing a machine vision application on OS X using an Intensity Extreme for capturing HDMI frames.
It turns out that IDeckLinkInput::GetAvailableVideoFrameCount() always returns 0. I hoped to use this method to skip frames when processing can't keep up, but now i have to find another way to achieve that. Is this a known issue in the driver or am i misunderstanding the purpose of this function? Will it only work with some specific capture devices?

Re: GetAvailableVideoFrameCount() always returns 0

PostPosted: Fri Feb 16, 2018 4:49 am
by Cameron Nichols
Hi Erwin,

Thanks for raising this, the fix for IDeckLinkInput::GetAvailableVideoFrameCount() will be included in the next Desktop Video release.

There are two alternative mechanisms:
1) On IDeckLinkInputCallback::VideoInputFrameArrived callback, make a call to IDeckLinkVideoInputFrame:: GetHardwareReferenceTimestamp[1], keep track of the frameTime to ensure that the processing is keeping up with the expected stream time.

2) You may want to consider using IDeckLinkScreenPreviewCallback[2], instead of VideoInputFrameArrived callback, the latter callback expects the processing to be within the frame interval. IDeckLinkScreenPreviewCallback is primarily targeted for OpenGL/DirectX rendering, as render times can be greater than the frame interval time. As such there is no requirement for IDeckLinkScreenPreviewCallback processing time and no impact of dropped frames.

Regards
Cameron

Refs
[1] 2.5.11.2 IDeckLinkVideoInputFrame:: GetHardwareReferenceTimestamp method
[2] 2.5.22.1 IDeckLinkScreenPreviewCallback::DrawFrame method