[Solved] Mini Pro: Does IBMDSwitcherStreamRTMP::SetKey work?

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

lanephillips

  • Posts: 7
  • Joined: Wed Dec 06, 2017 10:05 pm

[Solved] Mini Pro: Does IBMDSwitcherStreamRTMP::SetKey work?

PostTue Sep 29, 2020 5:11 pm

We have a MacOS application that uses the ATEM SDK to automatically configure Blackmagic devices. I'm working with an ATEM Mini Pro now and was making good progress with it, but now I've run into a roadblock.

While I can query the ATEM for its current streaming settings using GetServiceName, GetUrl, and GetKey, if I try calling SetServiceName, SetUrl, or SetKey they just return E_FAIL. Does anyone have C++ code that successfully configures the streaming key?

I can do all this through the ATEM Software Control application, so there is no reason it shouldn't be possible. I had assumed they wrote this application on top of their own SDK.
Last edited by lanephillips on Mon Oct 05, 2020 1:41 pm, edited 1 time in total.
Offline

Cameron Nichols

Blackmagic Design

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

Re: ATEM Mini Pro: Does IBMDSwitcherStreamRTMP::SetKey work?

PostWed Sep 30, 2020 3:31 am

Hi Lane,

The methods IBMDSwitcherStreamRTMP::SetServiceName, IBMDSwitcherStreamRTMP::SetUrl and IBMDSwitcherStreamRTMP::SetKey will return E_FAIL if it is already streaming.

You may want to check that IBMDSwitcherStreamRTMP::GetStatus outputs state bmdSwitcherStreamRTMPStateIdle before calling any of the IBMDSwitcherStreamRTMP::Set* methods.

Regards
Cameron
Offline

lanephillips

  • Posts: 7
  • Joined: Wed Dec 06, 2017 10:05 pm

Re: ATEM Mini Pro: Does IBMDSwitcherStreamRTMP::SetKey work?

PostWed Sep 30, 2020 2:57 pm

I can confirm that IBMDSwitcherStreamRTMP::SetKey does not return E_FAIL if streaming is idle. However, the reason I thought it still wasn't working is that it appears that IBMDSwitcherStreamRTMP::GetKey still returns the old value even after calling IBMDSwitcherStreamRTMP::SetKey with a new value. After restarting my app IBMDSwitcherStreamRTMP::GetKey returns the correct new value. Is there some delay before the new value "sticks"?
Offline

Cameron Nichols

Blackmagic Design

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

Re: ATEM Mini Pro: Does IBMDSwitcherStreamRTMP::SetKey work?

PostMon Oct 05, 2020 4:55 am

Hi Lane,

Yes there is delay for GetKey to pick up the previous SetKey due to the delay for the setting to be provided to the switches itself.

In order to wait until the key value is reflected in the switcher, you should create class that implements IBMDSwitcherStreamRTMPCallback interface[1], and defines all methods in this interface. In your implementation of IBMDSwitcherStreamRTMPCallback::Notify, filter for event type bmdSwitcherStreamRTMPEventTypeKeyChanged[2], at this point you can call IBMDSwitcherStreamRTMP::GetKey with the reflected key value. Register you callback class by calling IBMDSwitcherStreamRTMP::AddCallback[3].

Regards
Cameron

References (ATEM Switchers SDK Manual):
[1] 11.3.2 IBMDSwitcherStreamRTMPCallback Interface
[2] 11.2.3 Streaming Event Type
[3] 11.3.1.21 IBMDSwitcherStreamRTMP::AddCallback method

Return to Software Developers

Who is online

Users browsing this forum: Larry Masters and 33 guests