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