Causes of QueryInterface(IID_IDeckLinkInput) failure?

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

Flipper

  • Posts: 7
  • Joined: Mon May 04, 2020 6:53 pm
  • Real Name: Phil White

Causes of QueryInterface(IID_IDeckLinkInput) failure?

PostWed Jun 10, 2020 4:29 pm

OS: Ubuntu 18.04
SDK: 11.5

This seems like a basic question, but what are the possible causes of failing to query the input interface as per SDK Capture sample:

Code: Select all
   // Get the input (capture) interface of the DeckLink device
   result = deckLink->QueryInterface(IID_IDeckLinkInput, (void**)&g_deckLinkInput);
   if (result != S_OK)
   {
      fprintf(stderr, "The selected device does not have an input interface\n");
      goto bail;
   }
?

On machine 'A' with an 8K Pro card this always succeeds, but on machine 'B' with a Duo 2 card it always fails.

It doesn't appear to relate to another process accessing the device - on machine 'A' if I run ffmpeg (with DeckLink device support) to capture from the 8K Pro then run the SDK Capture sample against the same device, the QueryInterface(IID_IDeckLinkInput) call succeeds but the later g_deckLinkInput->EnableVideoInput() fails, which seems expected.

It also doesn't seem to be related to the selected profile for the device. Selecting profile 0 ("one sub-device full-duplex") with the SDK ActivateSample utility then running Capture results in the "if (duplexMode == bmdDuplexInactive)" duplex test failing instead.
Offline

Cameron Nichols

Blackmagic Design

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

Re: Causes of QueryInterface(IID_IDeckLinkInput) failure?

PostThu Jun 11, 2020 3:25 am

Hi Phil,

The 2 most likely reasons for QueryInterface with IID_IDeckLinkInput failing are:
  • Device is playback device only eg DeckLink Mini Monitor (Not applicable for DeckLink Duo 2)
  • Mismatch in SDK/Desktop Video installation - you are using a more recent version of SDK than the Desktop Video installation, so the REFIID value is not recognised. This will occur if you have Desktop Video 11.4.1 or earlier installed and using Desktop Video SDK 11.5 - The IDeckLinkInput interface was updated in 11.5.
Regards
Cameron
Offline

Flipper

  • Posts: 7
  • Joined: Mon May 04, 2020 6:53 pm
  • Real Name: Phil White

Re: Causes of QueryInterface(IID_IDeckLinkInput) failure?

PostSat Jun 13, 2020 1:23 pm

Thank you for that Cameron
Your second point is almost certainly the cause. The system with the Duo 2 card was set up some time around September last year and it looks like Desktop Video would have been at v11.3 or 11.4 at the time.
Is there a way to check the runtime library version, that it's either the same as the version compiled against (in DeckLinkAPIVersion.h) or compatible with it? It would be useful for our application to be able to check the runtime version so we can avoid this when it's rolled out to further systems.
Thanks again

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 13 guests