Atem CPP SDK AUX

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

martin.mignon

  • Posts: 4
  • Joined: Mon May 18, 2020 10:52 pm
  • Real Name: Mignon

Atem CPP SDK AUX

PostFri Oct 16, 2020 2:41 am

Hi,

I'm trying to add aux control on the Switcher Panel Sample . I'have already spend hours on it and i'm still not able to figure how it's work.

So i need to itearate all the aux in the Atem, add a Callback on them and finaly get or set the input.

Im already able to know if i have Aux in my atem

Code: Select all
   InputMonitor* inputMonitor = new InputMonitor(input, m_hWnd);

         BMDSwitcherPortType inputPortType;
         input->GetPortType(&inputPortType);
         if(inputPortType==bmdSwitcherPortTypeAuxOutput){
            MessageBox(_T("There is an Aux"), _T("Test Message"));
         }

         input->Release();
         mInputMonitors.push_back(inputMonitor);


But i'm not able to put a Callback on this aux, to get or set an input

Coud you help me ?

Thank's a lot

Martin
Offline

Ian Morrish

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

Re: Atem CPP SDK AUX

PostFri Oct 16, 2020 7:13 pm

You don't need a callback. That is only if you want to be notified of changes.
See this example
https://forum.blackmagicdesign.com/viewtopic.php?f=12&t=101252&p=560887&hilit=aux+iterator#p560887
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com
Offline

martin.mignon

  • Posts: 4
  • Joined: Mon May 18, 2020 10:52 pm
  • Real Name: Mignon

Re: Atem CPP SDK AUX

PostSat Oct 17, 2020 1:12 pm

Yes I've seen that exemple but it is in C# and not CPP.

In my project, I need to be notified of changes, maybe in a second time.
Offline

Cameron Nichols

Blackmagic Design

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

Re: Atem CPP SDK AUX

PostTue Oct 20, 2020 12:36 am

Hi Martin,

First you should obtain the IBMDSwitcherInputAux interface[1] from your IBMDSwitcherInput object:
Code: Select all
IBMDSwitcherInputAux* inputAux = nullptr;
HRESULT hr = input->QueryInterface(IID_IBMDSwitcherInputAux, (void**)&inputAux);
if (hr != S_OK)
    // Does not have Input AUX interface
Next generate a new class that implements IBMDSwitcherInputAuxCallback callback interface[2]. Implement IBMDSwitcherInputAuxCallback::Notify to filter BMDSwitcherInputAuxEventType = bmdSwitcherInputAuxEventTypeInputSourceChanged[3]. I recommend passing the input ID to the class constructor (or reference to InputMonitor from your code sample) so that you can uniquely identify the callback.

Finally, register your callback class with IBMDSwitcherInputAux::AddCallback and unregister with IBMDSwitcherInputAux::RemoveCallback.

Regards
Cameron

References (ATEM Switchers SDK Manual):
[1] 2.3.12 IBMDSwitcherInputAux Interface
[2] 2.3.13 IBMDSwitcherInputAuxCallback Interface
[3] 2.2.17 Switcher Aux Events
Offline

martin.mignon

  • Posts: 4
  • Joined: Mon May 18, 2020 10:52 pm
  • Real Name: Mignon

Re: Atem CPP SDK AUX

PostThu Oct 22, 2020 12:35 am

Thank's for your help.

Return to Software Developers

Who is online

Users browsing this forum: Google [Bot], marlattrj and 5 guests