Page 1 of 1

ATEM Reconnection Issues

PostPosted: Fri Mar 23, 2018 9:39 pm
by e_marcio@hotmail.com
Hi all,

I've venturing myself with the ATEM SDK for Switchers and Delphi... So for it has been an amazing experience and all looks good, with one exception... Reconnecting to my ATEM device after a connection problem.

Let's say all is connected and suddenly some kicked a cable ( ouch ) the RJ45 disconnected from the ATEM. My app is still running and altough I can use the Notification interface to alert a disconnection I can't connect to it again.

I've tried many ways to but all failed... I even have a Thread running after the disconnection notification arrives but it simply can't reconnect and I need to restart my app.

My question... what would be the correct way to recover from a connection issue ?

Thanks,

Re: ATEM Reconnection Issues

PostPosted: Mon Jun 10, 2019 2:40 pm
by marciocorrea
Had anyone ever faced this ?

Re: ATEM Reconnection Issues

PostPosted: Tue Jul 30, 2019 11:40 am
by JNeundorf
Hey Marcio,

we also faced some reconnection issues in the beginning with the ATEM. We are using the SDK for C#.
I am not sure if this is helpful but you always have to make sure that you release all COM objects before initializing the connection to the Atem again. Thats very important otherwise the connection will not work again.
In C#:

If you do that:
Code: Select all
                IBMDSwitcherMixEffectBlock mixEffectBlock = null;
                IBMDSwitcherMixEffectBlockIterator meIterator = null;
                IntPtr meIteratorPtr;
                Guid meIteratorIID = typeof(IBMDSwitcherMixEffectBlockIterator).GUID;
                m_switcher.CreateIterator(ref meIteratorIID, out meIteratorPtr);

                meIterator = (IBMDSwitcherMixEffectBlockIterator)Marshal.GetObjectForIUnknown(meIteratorPtr);

     
                for (int i = 1; i <= mixEffectBlockNumber; i++)
                {             
                    meIterator.Next(out mixEffectBlock);
                }


Be sure to do that if the connection breaks:

Code: Select all
                //Release pointer objects       
                Marshal.FinalReleaseComObject(meIterator);
                Marshal.Release(meIteratorPtr);
                Marshal.FinalReleaseComObject(mixEffectBlock);


Regards
Julian