Page 1 of 1

Setting the video input connection

PostPosted: Mon Nov 12, 2018 5:23 pm
by benbbb
Hello all,

I'm having a hard time getting bmdDeckLinkConfigVideoInputConnection to work correctly.

This is with the latest macOS and Blackmagic drivers (macOS 10.14.1 & BM 10.11.4). I've also tried with macOS 10.11.6 and BM 10.8.6.

I've read the manual and all other relevant forum posts and I'm pretty sure I'm doing it correctly. My device (UltraStudio Mini Recorder) has SDI and HDMI connectors.

So I'm using CreateDeckLinkIteratorInstance() / Next() to find the IDeckLink device, then I'm using the following code to set the input connection:

IDeckLinkConfiguration* deckLinkConfiguration=NULL;

if (deckLink->QueryInterface(IID_IDeckLinkConfiguration,(void**)&deckLinkConfiguration)==S_OK)
{
deckLinkConfiguration->SetInt(bmdDeckLinkConfigVideoInputConnection,vic);
deckLinkConfiguration->WriteConfigurationToPreferences();
deckLinkConfiguration->Release();
}

"vic" is set to either bmdVideoConnectionSDI or bmdVideoConnectionHDMI. I then go on to get the IDeckLinkInput, select a display mode, call EnableVideoInput() and StartStreams().

What I'm finding is that the bmdDeckLinkConfigVideoInputConnection setting does not take effect immediately. If the device is currently set to SDI, and I call SetInt(bmdDeckLinkConfigVideoInputConnection,bmdVideoConnectionHDMI), the connection does not change to HDMI. If I then close the device, open it again and call SetInt(bmdDeckLinkConfigVideoInputConnection,bmdVideoConnectionSDI), then the connection will then change to HDMI. Strangely, it seems that calling SetInt() will cause whatever connection was specified at the previous call to SetInt() to take effect.

I'm looking at the Desktop Video Setup app to see what input is being selected.

Any help would be much appreciated. Is this a known problem?

Many thanks,
Ben

Re: Setting the video input connection

PostPosted: Fri Nov 16, 2018 5:24 am
by Cameron Nichols
Hi Ben,

Thanks for raising this. Can you put a delay (eg usleep(1000)) before the deckLinkConfiguration->Release() and let me know if this changes the observed behaviour?

Regards
Cameron

Re: Setting the video input connection

PostPosted: Fri Nov 16, 2018 1:09 pm
by benbbb
Hi Cameron,

Thanks for the reply.

Strangely, the problem has mostly gone away, and I can't explain why. Nothing has changed about my setup. Now, setting the video input connection appears to work as expected (i.e. the settings set in my app are correctly reflected in Desktop Video Setup). The only issue is that sometimes when the connection is changed (e.g. from SDI to HDMI, where there is a valid HDMI signal only), I don't get any valid video frames right away. Closing and re-opening the device with the same settings resolves this.

At this point I'm getting confusing and inconsistent results. I think I'll leave this particular setting out of my app, and just direct my users to use Desktop Video Setup to set the video connection. Mostly, users will only need to set this once anyway.

Thanks,
Ben