Skip to content

Decklink.cpp compile error

Decklink.cpp doesn't compile with the latest Blackmagic SDK 11.1.. With the predecessor SDK 10.11.4 decklink.cpp compiles without any error. I use VLC with Decklink demuxer compiled with SDK 10.11.4 since it works perfectly with the latest desktop video API 11.1 and its included kernel modules 11.1.

Here is the related output of gcc in compiling decklink.cpp with SDK 11.1 just before apporting due to errors:

 CXX      access/libdecklink_plugin_la-decklink.lo
access/decklink.cpp:138:5: error: »IDeckLinkAttributes« calls no type; did you mean »BMDDeckLinkAttributeID«?
     IDeckLinkAttributes *attributes;
     ^~~~~~~~~~~~~~~~~~~
     BMDDeckLinkAttributeID
In file included from ../include/vlc_common.h:1025,
                 from access/decklink.cpp:29:
access/decklink.cpp: in element function »virtual HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame*, IDeckLinkAudioInputPacket*)«:
access/decklink.cpp:303:30: warning: format »%d« expects argument type »int«, but argument 8 has type »long int« [-Wformat=]
             msg_Warn(demux_, "No input signal detected (%dx%d)",
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        videoFrame->GetWidth(), videoFrame->GetHeight());
        ~~~~~~~~~~~~~~~~~~~~~~ 
../include/vlc_messages.h:79:23: note: in definition of macro »msg_Generic«
             __func__, __VA_ARGS__)
                       ^~~~~~~~~~~
access/decklink.cpp:303:13: note: in substitution of macro »msg_Warn«
             msg_Warn(demux_, "no input signal detected (%dx%d)",
             ^~~~~~~~
access/decklink.cpp:303:30: warning: format »%d« expects argument type »int«, but argument 9 has type »long int« [-Wformat=]
             msg_Warn(demux_, "No input signal detected (%dx%d)",
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        videoFrame->GetWidth(), videoFrame->GetHeight());
                                ~~~~~~~~~~~~~~~~~~~~~~~
../include/vlc_messages.h:79:23: note: in definition of macro »msg_Generic«
             __func__, __VA_ARGS__)
                       ^~~~~~~~~~~
access/decklink.cpp:303:13: note: in substitution of macro »msg_Warn«
             msg_Warn(demux_, "no input signal detected (%dx%d)",
             ^~~~~~~~
access/decklink.cpp: in function »int Open(vlc_object_t*)«:
access/decklink.cpp:545:35: error: »IID_IDeckLinkAttributes« has not been defined in this scope
     if (sys->card->QueryInterface(IID_IDeckLinkAttributes, (void**)&sys->attributes) != S_OK) {
access/decklink.cpp:545:35: note: recommended alternative: »BMDDeckLinkAttributeID«
     if (sys->card->QueryInterface(IID_IDeckLinkAttributes, (void**)&sys->attributes) != S_OK) {
                                   ^~~~~~~~~~~~~~~~~~~~~~~
                                   BMDDeckLinkAttributeID
access/decklink.cpp:545:74: error: »demux_sys_t« {aka »struct demux_sys_t«} has no element named »attributes«
     if (sys->card->QueryInterface(IID_IDeckLinkAttributes, (void**)&sys->attributes) != S_OK) {
                                                                          ^~~~~~~~~~
access/decklink.cpp:555:14: error: »demux_sys_t« {aka »struct demux_sys_t«} has no element named »attributes«
     if (sys->attributes->GetFlag(BMDDeckLinkSupportsInputFormatDetection, &sys->autodetect) != S_OK) {
              ^~~~~~~~~~
access/decklink.cpp: in function »void Close(vlc_object_t*)«:
access/decklink.cpp:707:14: error: »demux_sys_t« {aka »struct demux_sys_t«} has no element named »attributes«
     if (sys->attributes)
              ^~~~~~~~~~
access/decklink.cpp:708:14: error: »demux_sys_t« {aka »struct demux_sys_t«} has no element named »attributes«
         sys->attributes->Release();
              ^~~~~~~~~~
make[4]: *** [Makefile:24614: access/libdecklink_plugin_la-decklink.lo] Error 1
make[4]: Leaving directory „/home/herges/vlc/repos/extra-x86_64/src/vlc-3.0.6/modules“
make[3]: *** [Makefile:27483: all-recursive] Error 1
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information