SDK version vs Desktop Video version?

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

SDK version vs Desktop Video version?

PostThu Oct 01, 2020 2:13 pm

Short version:
Does an application built against SDK version X.Y need to run against precisely the same Desktop Video version, or is there any backward compatibility in new Desktop Video versions? This is on Ubuntu 18.04.

Long version:
We have a custom Decklink capture app developed against the v11.5 SDK, and it's been in use for some time. Today a new server was set up, and the latest Desktop Video software version was installed, currently v11.6. Our custom app does not work on this - it looks like the g_deckLinkInput->StartStreams() call is successful but it never sees a frame callback. The same thing happens with the Capture sample included in the Linux 11.5 SDK (Linux/Samples/bin/x86_64/Capture) which reports the command line configuration then does nothing.

Rebuilding our app against the 11.6 SDK allows it to run correctly, but then it doesn't run against the previous Desktop Video version (11.5). It does the same as the Capture sample from the 11.6 SDK, reporting "The selected device does not have an input interface".

Is this the standard behaviour, that an app built with SDK 11.5 (for example) won't run against Desktop Video 11.6 or later on Linux?
I haven't seen this mentioned in the SDK reference; that mentions changes on the SDK side in section 1.1.6 but not how SDK versions relate to the installed Desktop Video version.
Offline
User avatar

UnixMover

  • Posts: 12
  • Joined: Sun Dec 03, 2017 1:56 pm
  • Location: Hilton Head Island
  • Real Name: Thomas Klinect

Re: SDK version vs Desktop Video version?

PostThu Dec 10, 2020 5:43 pm

I have been in software development from imbedded systems to mainframe software applications: what is described is best handled with "#defines". I have only recently started to work with BMD SDK's so I have not run into any version issues.

However, checking the version of the SDK when you compile will allow you to select the correct version of the call to make. Even if you have to create a environment variable to describe the environment you are working in will help solve the problem.

As an example here are a couple of pre-processor defined entries which invoke a parameter swapping macro and a system level define for the code, based on the version number in VERSION (e.g: -DVERSION=3.1)

#if defined VERSION && VERSION = 3.1

# define sysFunc( x, y) myfunc( x, y ) // macro definition overload

# define COMM_BUFFER_SIZE 20 // Const variable size set

#else

# define sysFunc( x, y) myfunc( y, x ) // swapped macro parameters definition overload

# define COMM_BUFFER_SIZE 30 // Const variable size set differently

#endif

You can also not use a global macro, and make the change at the functional level, but then you are having to make changes all over the code which makes supportability an issue.

Just my 2cents...
Thomas Klinect
Offline

Flipper

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

Re: SDK version vs Desktop Video version?

PostThu Dec 10, 2020 9:38 pm

Greetings Thomas

Thank you for your reply. I think we're probably about the same vintage.

I would agree that #ifdef(s) would be the answer if this was an SDK version difference that could be handled at compile time, but unfortunately the problem is that we're seeing the behaviour of some API methods change depending on the combination of compile-time SDK + run-time Desktop Video versions.

For example if we build against SDK 11.5 then run the app on a machine with v11.6 runtime (on Linux meaning the Desktop Video version) then after starting capture with IDeckLinkInput::StartStreams() we never see a frame callback. Similarly if we build against SDK 11.6 then run against Desktop Video v11.5 we find that querying the decklink input interface (deckLink->QueryInterface(IID_IDeckLinkInput, (void**)&g_deckLinkInput)) reports that the device has no input interface. Essentially it means we need to ensure that whichever SDK we build against has to match the runtime version.

Blackmagic have acknowledged that this is not expected behaviour, but I haven't seen any further progress or comments since the initial acknowledgement. Must follow it up.

I found that on Linux the runtime version (Desktop Video) can be determined with:

Code: Select all
dpkg -l desktopvideo

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                Version                Architecture           Description
+++-===================================-======================-======================-===========================================================================
ii  desktopvideo                        11.5.1a14              amd64                  Blackmagic Design Desktop Video 11.5.1 - Driver and Firmware Update utility


although I haven't gone as far as parsing the output to get a machine readable version. For the time being we're sticking to v11.6 and as this is an in-house application we're OK with mandating that for the runtime. Still something of a pain but we can live with it.

Thanks again
Offline
User avatar

UnixMover

  • Posts: 12
  • Joined: Sun Dec 03, 2017 1:56 pm
  • Location: Hilton Head Island
  • Real Name: Thomas Klinect

Re: SDK version vs Desktop Video version?

PostSat Dec 19, 2020 3:39 pm

...
Here is a little regex to get the long version of the 'app'.

Code: Select all
bool isFound = false;
try {
   Regex regexVer = new Regex(@"(?<=desktopvideo[ \t]{0,})(?<long_version_str>\d{1,3}\.\d{0,3}\.\d{0,3}[a-zA-Z]{0,1}\d{0,4}\b)", RegexOptions.Multiline);
   isFound = regexVer.IsMatch(long_version_str);
} catch (ArgumentException ex) {
   // Syntax error in the regular expression
}


Flipper wrote:Greetings Thomas
Code: Select all
dpkg -l desktopvideo

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                Version                Architecture           Description
+++-===================================-======================-======================-===========================================================================
ii  desktopvideo                        11.5.1a14              amd64                  Blackmagic Design Desktop Video 11.5.1 - Driver and Firmware Update utility


although I haven't gone as far as parsing the output to get a machine readable version. For the time being we're sticking to v11.6 and as this is an in-house application we're OK with mandating that for the runtime. Still something of a pain but we can live with it.

Thanks again
Thomas Klinect

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 2 guests