ATEM API Iterator help

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

Bostjan Nagode

  • Posts: 4
  • Joined: Tue Sep 05, 2017 3:15 pm

ATEM API Iterator help

PostTue Sep 05, 2017 3:50 pm

Dear,

is there anyone that can help me with issue about DSK key, i just can't find the way to do:
-Get info about DSK1 On/off (status)
-Select key & fill input for DSK1 keyer

I'm doing in c# and vb.net, i have a code for input selection, take ME1 & ME 2, but my base problem is that i simply don't understand the iterator methods. Simply im stuck at "how to create iterator for Key functions" Any help would be really appreciated, any kind of it. Thanks to all in advance,

Best, Bostjan
Offline

Ian Morrish

  • Posts: 144
  • Joined: Sun Jan 18, 2015 9:24 pm
  • Location: New Zealand

Re: ATEM API Iterator help

PostThu Sep 07, 2017 7:51 pm

This GitHub project should get you started.
https://github.com/YSTV/BMDSwitcherApps
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com
Offline

Bostjan Nagode

  • Posts: 4
  • Joined: Tue Sep 05, 2017 3:15 pm

Re: ATEM API Iterator help

PostThu Sep 07, 2017 8:14 pm

Ian,
thanks a lot, i will test on ATEM tomorrow and will report back. Thanks again! I can see (hope clearly) the key iterator procedure. I will try further on with key fill and alpha selection and then with supersource... I will report back in case i travel into blind way...
Best, Bostjan
Offline

Ian Morrish

  • Posts: 144
  • Joined: Sun Jan 18, 2015 9:24 pm
  • Location: New Zealand

Re: ATEM API Iterator help

PostFri Sep 08, 2017 3:49 am

Just to warn you, DSK is relatively easy as it only needs a switcher object. Most other things also need a reference to a MixerEffect, and if you are talking about SuperSource then that is even more iterators.

There is also a good explanation on Aux's (which is the same way you have to get the SuperSource input) here viewtopic.php?f=12&t=41964&p=281558&hilit=aux#p242746
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com
Offline

Bostjan Nagode

  • Posts: 4
  • Joined: Tue Sep 05, 2017 3:15 pm

Re: ATEM API Iterator help

PostMon Sep 11, 2017 5:02 pm

Ian,

thanks for your asistance, The DSK is working as it should, thanks again.
If someone is in same trouble, i can provide sample in vb.net..

Best, Bostjan
Offline

Bostjan Nagode

  • Posts: 4
  • Joined: Tue Sep 05, 2017 3:15 pm

Re: ATEM API Iterator help

PostTue Sep 19, 2017 7:53 am

Hello,

Well, i have done DSK 1 and 2, that is now ok. But again, im going now to Supersource, where i must do a Box input selection. Any tip would be apreciated.

If i do

Dim m_SS_switcher_local As IBMDSwitcherSuperSourceBox
Dim meSSIterator As IBMDSwitcherSuperSourceBoxIterator
SwitcherAPIHelper.CreateIterator(m_SS_switcher_local, meSSIterator)
If meSSIterator IsNot Nothing Then
'meSSIterator is always returned Nothing
End if

But meSSiterator is always returning nothing...
According to documentation An IBMDSwitcherSuperSourceBox object will be returned after a successful call to IBMDSwitcherSuperSourceBoxIterator::Next method.

Thanks in advance,

Bostjan Nagode
Offline

Ian Morrish

  • Posts: 144
  • Joined: Sun Jan 18, 2015 9:24 pm
  • Location: New Zealand

Re: ATEM API Iterator help

PostTue Sep 19, 2017 8:31 pm

Hi,
Supersource must be obtained before your can get boxes. Supersource is based on an input, just like Aux. If you follow the Aux pattern I mention below, it will show you how to get this from iterating the inputs.
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com
Offline

Ian Morrish

  • Posts: 144
  • Joined: Sun Jan 18, 2015 9:24 pm
  • Location: New Zealand

Re: ATEM API Iterator help

PostWed Sep 20, 2017 7:35 pm

Based on the Aux example (credit to JohnB for this which helped me heaps). You need to use the Input iterator code from viewtopic.php?f=12&t=41964&p=281558&hilit=aux#p242755 to properly get the SuperSource object.

Look for the "if (InputPortType==" line and change to

if (inputPortType == _BMDSwitcherPortType.bmdSwitcherPortTypeSuperSource)

inside that conditional code...

IBMDSwitcherInputSuperSource superSource = (IBMDSwitcherInputSuperSource)input;
//put box iterator here using SwitcherAPIHelper.CreateIterator(superSource,meSSIterator)


I think your create iterator function just needs to use superSource, rather than
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com

Return to Software Developers

Who is online

Users browsing this forum: Andy Coulthurst and 4 guests