ATEM SDK Object Lifetime

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

simon247

  • Posts: 2
  • Joined: Wed Aug 11, 2021 7:52 am
  • Real Name: Simon Rea

ATEM SDK Object Lifetime

PostWed Aug 11, 2021 8:32 am

Hi,

The ATEM SDK has iterators to provide instances of objects like switchers and mix effect blocks, but how long can I rely on those objects being valid/stable. I.e. should they be created as needed and disposed of shortly after use, or is it acceptable to keep (for example) an ME block object alive and used continually throughout a production which might last 24 hours or more.

Simon.
Offline

Ian Morrish

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

Re: ATEM SDK Object Lifetime

PostMon Aug 16, 2021 9:51 am

I keep the object for as long as Windows stays running (months on end). So long as you have reliable network connectivity.

Sent from my SM-G960F using Tapatalk
Regards,
Ian Morrish
Video Integrated Scripting Environment
(Windows PowerShell with ATEM driver + more)
https://ianmorrish.wordpress.com
Offline

simon247

  • Posts: 2
  • Joined: Wed Aug 11, 2021 7:52 am
  • Real Name: Simon Rea

Re: ATEM SDK Object Lifetime

PostMon Aug 16, 2021 8:06 pm

Thanks for the response Ian.

My main concern is detecting when the objects may no longer be valid due to network issues, the ATEM being rebooted etc. In the absence of any specific indication of this from the API, I guess my best approach is just to have an easy 'reset' button that grabs new versions when the user recognises there's an issue.

Simon
Offline

Cameron Nichols

Blackmagic Design

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

Re: ATEM SDK Object Lifetime

PostFri Sep 10, 2021 12:45 am

Hi Simon,

To detect network disconnect with a callback, please use the following steps:
  • Generate class the implements IBMDSwitcherCallback interface[1], and defines all methods in this interface.
  • In your implementation of IBMDSwitcherCallback::Notify, filter for BMDSwitcherEventType event type bmdSwitcherEventTypeDisconnected[2].
  • Register you callback class by calling IBMDSwitcher::AddCallback[3].
Regards
Cameron

References (ATEM Switchers SDK Manual):
[1] 2.3.3 IBMDSwitcherCallback Interface
[2] 2.2.2 Switcher Event Type
[3] 2.3.2.31 IBMDSwitcher::AddCallback method

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 11 guests