Hi everybody,
I wasted the last 1,5 days to get into the atem switcher sdk and had some success.
But I'm really losing at the CallBack function of the IMBDSwitcherMixEffectBlock Callback.
On each IBMDSwitcherMixEffectBlock.PropertyChanged callback, I want to check
1. if it is a input change at prgm or prew bus
2. check which input has become active at the bus
So far, it is no problem to register the callback method and do part 1 like this:
But if I try to get the value of a property like this:
It does not work. The mixEfxBlk is a global variable in the class with the IBMDSwitcherMixEffectBlock object.
So, after hours of testing and failing, I found out, that this is a problem caused by the way the callback is invoked. It seems as the system forks the part of the class when its invoked by the COM object and therefore, the mixEfxBlk object is not able to call anything on the COM interface anymore.
The same happens when I try to access the IBMDSwitcherMixEffectBlock from an other class which runs as own thread.
I tried to hand out an IntPtr (pointer) instead of the COM Object itself and then reconnect it to an object but without any success.
So, my question is, has anybody here experience how to access the IBMDSwitcherMixEffectBlock Object in the propertyChanged Callback with VB.Net?
Thanks in advance
cheers
sublan
I wasted the last 1,5 days to get into the atem switcher sdk and had some success.
But I'm really losing at the CallBack function of the IMBDSwitcherMixEffectBlock Callback.
On each IBMDSwitcherMixEffectBlock.PropertyChanged callback, I want to check
1. if it is a input change at prgm or prew bus
2. check which input has become active at the bus
So far, it is no problem to register the callback method and do part 1 like this:
- Code: Select all
Public Sub PropertyChanged(ByVal propertyId As BMDSwitcherAPI._BMDSwitcherMixEffectBlockPropertyId) Implements BMDSwitcherAPI.IBMDSwitcherMixEffectBlockCallback.PropertyChanged
Select Case propertyId
Case _BMDSwitcherMixEffectBlockPropertyId.bmdSwitcherMixEffectBlockPropertyIdProgramInput
'do something
Case _BMDSwitcherMixEffectBlockPropertyId.bmdSwitcherMixEffectBlockPropertyIdPreviewInput
'do something
End Select
End Sub
But if I try to get the value of a property like this:
- Code: Select all
mixEfxBlk.GetInt(_BMDSwitcherMixEffectBlockPropertyId.bmdSwitcherMixEffectBlockPropertyIdProgramInput, iid)
It does not work. The mixEfxBlk is a global variable in the class with the IBMDSwitcherMixEffectBlock object.
So, after hours of testing and failing, I found out, that this is a problem caused by the way the callback is invoked. It seems as the system forks the part of the class when its invoked by the COM object and therefore, the mixEfxBlk object is not able to call anything on the COM interface anymore.
The same happens when I try to access the IBMDSwitcherMixEffectBlock from an other class which runs as own thread.
I tried to hand out an IntPtr (pointer) instead of the COM Object itself and then reconnect it to an object but without any success.
So, my question is, has anybody here experience how to access the IBMDSwitcherMixEffectBlock Object in the propertyChanged Callback with VB.Net?
Thanks in advance
cheers
sublan