IDecklinkIterator does not report last device

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

altug.simsek

  • Posts: 16
  • Joined: Wed Jan 04, 2017 12:18 pm

IDecklinkIterator does not report last device

PostWed Nov 18, 2020 5:52 pm

IDecklinkIterator does not report last device when the IDeckLinkInput interfaces are acquired and kept open.

1x Intensity Pro
1x Mini Recorder
4x Quad2 in HalfDuplex mode
A total of 34 devices.

AMD Threadripper 1900x platform

CentOS Linux release 7.9.2009 (Core)
Linux kernel 3.10.0-1160.2.2.el7.x86_64
Blackmagic_Desktop_Video_Linux_11.6.tar

Drivers for all devices are loaded. No dmesg errors, etc.
Firmware updater, DeviceConfigure & DeviceList samples from the SDK see all of the 34 devices.

My intention is to simultaneously capture from all available devices.
Simplified code as follows:

Code: Select all
m_pDecklinkIterator = CreateDeckLinkIteratorInstance();

if ( m_pDecklinkIterator == NULL )
{
   LOG_WRITE( ERROR0 , "Cannot create m_pDecklinkIterator. DeckLink drivers may not be installed..." );
}


cardIndex = 0;

while ( m_pDecklinkIterator -> Next( &m_pDecklink[ cardIndex ] ) == S_OK )
{

   mbDispName = NULL;
   
   m_pDecklink[ cardIndex ] -> GetDisplayName( &mbDispName );
   
   LOG_WRITE( DEBUG3 , "DEVICE[%02d] ==> %s" , cardIndex , mbDispName );

   free( ( void * )mbDispName );   // Allocated from inside Decklink API. free() should be used.


/*
   LOG_WRITE( DEBUG3 , "Getting input interface of DEVICE[%02d]" , cardIndex );


   hr = m_pDecklink[ cardIndex ] -> QueryInterface( IID_IDeckLinkInput , ( void ** )&m_pDecklinkInput[ cardIndex ] );

   if ( FAILED( hr ) )
   {
      LOG_WRITE( ERROR0 , "Cannot get m_pDecklinkInput interface. 0x%08x" , hr );
   }
*/


   /*
   ** Next ?
   */

   cardIndex++;

}


m_pDecklinkIterator -> Release();



If the call the call to QueryInterface(IID_IDeckLinkInput) is commented out, iterator reports 34 devices as expected:

DEVICE[00] ==> Intensity Pro
DEVICE[01] ==> DeckLink Mini Recorder
DEVICE[02] ==> DeckLink-Quad-1-1
DEVICE[03] ==> DeckLink-Quad-1-2
DEVICE[04] ==> DeckLink-Quad-1-3
DEVICE[05] ==> DeckLink-Quad-1-4
DEVICE[06] ==> DeckLink-Quad-1-5
DEVICE[07] ==> DeckLink-Quad-1-6
DEVICE[08] ==> DeckLink-Quad-1-7
DEVICE[09] ==> DeckLink-Quad-1-8
DEVICE[10] ==> DeckLink-Quad-2-1
DEVICE[11] ==> DeckLink-Quad-2-2
DEVICE[12] ==> DeckLink-Quad-2-3
DEVICE[13] ==> DeckLink-Quad-2-4
DEVICE[14] ==> DeckLink-Quad-2-5
DEVICE[15] ==> DeckLink-Quad-2-6
DEVICE[16] ==> DeckLink-Quad-2-7
DEVICE[17] ==> DeckLink-Quad-2-8
DEVICE[18] ==> DeckLink-Quad-3-1
DEVICE[19] ==> DeckLink-Quad-3-2
DEVICE[20] ==> DeckLink-Quad-3-3
DEVICE[21] ==> DeckLink-Quad-3-4
DEVICE[22] ==> DeckLink-Quad-3-5
DEVICE[23] ==> DeckLink-Quad-3-6
DEVICE[24] ==> DeckLink-Quad-3-7
DEVICE[25] ==> DeckLink-Quad-3-8
DEVICE[26] ==> DeckLink-Quad-4-1
DEVICE[27] ==> DeckLink-Quad-4-2
DEVICE[28] ==> DeckLink-Quad-4-3
DEVICE[29] ==> DeckLink-Quad-4-4
DEVICE[30] ==> DeckLink-Quad-4-5
DEVICE[31] ==> DeckLink-Quad-4-6
DEVICE[32] ==> DeckLink-Quad-4-7
DEVICE[33] ==> DeckLink-Quad-4-8


If QueryInterface(IID_IDeckLinkInput) code is not commented out and IDeckLinkInput interfaces are stored in an array to be used for simultaneous capture, the iterator reports 33 devices. The last device is always missing!

DEVICE[00] ==> Intensity Pro
Getting input interface of DEVICE[00]
DEVICE[01] ==> DeckLink Mini Recorder
Getting input interface of DEVICE[01]
DEVICE[02] ==> DeckLink-Quad-1-1
Getting input interface of DEVICE[02]
DEVICE[03] ==> DeckLink-Quad-1-2
Getting input interface of DEVICE[03]
DEVICE[04] ==> DeckLink-Quad-1-3
Getting input interface of DEVICE[04]
DEVICE[05] ==> DeckLink-Quad-1-4
Getting input interface of DEVICE[05]
DEVICE[06] ==> DeckLink-Quad-1-5
Getting input interface of DEVICE[06]
DEVICE[07] ==> DeckLink-Quad-1-6
Getting input interface of DEVICE[07]
DEVICE[08] ==> DeckLink-Quad-1-7
Getting input interface of DEVICE[08]
DEVICE[09] ==> DeckLink-Quad-1-8
Getting input interface of DEVICE[09]
DEVICE[10] ==> DeckLink-Quad-2-1
Getting input interface of DEVICE[10]
DEVICE[11] ==> DeckLink-Quad-2-2
Getting input interface of DEVICE[11]
DEVICE[12] ==> DeckLink-Quad-2-3
Getting input interface of DEVICE[12]
DEVICE[13] ==> DeckLink-Quad-2-4
Getting input interface of DEVICE[13]
DEVICE[14] ==> DeckLink-Quad-2-5
Getting input interface of DEVICE[14]
DEVICE[15] ==> DeckLink-Quad-2-6
Getting input interface of DEVICE[15]
DEVICE[16] ==> DeckLink-Quad-2-7
Getting input interface of DEVICE[16]
DEVICE[17] ==> DeckLink-Quad-2-8
Getting input interface of DEVICE[17]
DEVICE[18] ==> DeckLink-Quad-3-1
Getting input interface of DEVICE[18]
DEVICE[19] ==> DeckLink-Quad-3-2
Getting input interface of DEVICE[19]
DEVICE[20] ==> DeckLink-Quad-3-3
Getting input interface of DEVICE[20]
DEVICE[21] ==> DeckLink-Quad-3-4
Getting input interface of DEVICE[21]
DEVICE[22] ==> DeckLink-Quad-3-5
Getting input interface of DEVICE[22]
DEVICE[23] ==> DeckLink-Quad-3-6
Getting input interface of DEVICE[23]
DEVICE[24] ==> DeckLink-Quad-3-7
Getting input interface of DEVICE[24]
DEVICE[25] ==> DeckLink-Quad-3-8
Getting input interface of DEVICE[25]
DEVICE[26] ==> DeckLink-Quad-4-1
Getting input interface of DEVICE[26]
DEVICE[27] ==> DeckLink-Quad-4-2
Getting input interface of DEVICE[27]
DEVICE[28] ==> DeckLink-Quad-4-3
Getting input interface of DEVICE[28]
DEVICE[29] ==> DeckLink-Quad-4-4
Getting input interface of DEVICE[29]
DEVICE[30] ==> DeckLink-Quad-4-5
Getting input interface of DEVICE[30]
DEVICE[31] ==> DeckLink-Quad-4-6
Getting input interface of DEVICE[31]
DEVICE[32] ==> DeckLink-Quad-4-7
Getting input interface of DEVICE[32]


My code works and captures from 33 devices, but not the 34th device because I cannot detect its presence. A SDK issue?

Regards...
Offline

Cameron Nichols

Blackmagic Design

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

Re: IDecklinkIterator does not report last device

PostWed Nov 18, 2020 10:57 pm

Hi Altug,

The issue with not all devices iterated when a large number of devices installed in system is known and resolved in Desktop Video 11.7. Please download the latest Desktop Video from the Blackmagic support site: https://www.blackmagicdesign.com/suppor ... d-playback

Regards
Cameron
Offline

altug.simsek

  • Posts: 16
  • Joined: Wed Jan 04, 2017 12:18 pm

Re: IDecklinkIterator does not report last device

PostFri Nov 20, 2020 1:35 pm

Dear Cameron,
As you directed, no such issue when I use Decklink Linux Driver 11.7...

Best regards,
Altug

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 2 guests