GetAvailableVideoFrameCount() always returns 0

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

notnot

  • Posts: 10
  • Joined: Sat Jan 04, 2014 11:27 pm
  • Location: Amsterdam
  • Real Name: Erwin Driessens

GetAvailableVideoFrameCount() always returns 0

PostThu Feb 15, 2018 10:36 pm

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?
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 443
  • Joined: Mon Sep 04, 2017 4:05 am

Re: GetAvailableVideoFrameCount() always returns 0

PostFri Feb 16, 2018 4:49 am

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

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 13 guests