- Posts: 3
- Joined: Thu Jul 01, 2021 10:09 pm
- Real Name: Christian Dommel
Hi,
I'm trying to integrate the IBMDSwitcherStreamRTMP object with C#.
I have found examples of how to integrate the IBMDSwitcherMultiViewIterator object, but nothing about the IBMDSwitcherStreamRTMP object. The MultiView object can be integrated like this:
This doesn't work with the SwitcherStreamRTMP object. According to the documentation, the MultiView object is integrated via the CreateIterator method, the SwitcherStreamRTMP object with the QueryInterface method. So I tried something like this:
Unfortunately that doesn't work. I got the error: Conversion of "BMDSwitcherAPI.IBMDSwitcher" to "System.IntPtr" not possible.
Does anybody know how to integrate the StreamRTMP object?
Thanks!
I'm trying to integrate the IBMDSwitcherStreamRTMP object with C#.
I have found examples of how to integrate the IBMDSwitcherMultiViewIterator object, but nothing about the IBMDSwitcherStreamRTMP object. The MultiView object can be integrated like this:
- Code: Select all
private bool InitializeMultiView()
{
IntPtr multiViewPtr;
Guid multiViewIID = typeof(IBMDSwitcherMultiViewIterator).GUID;
_BMDSwitcher.CreateIterator(ref multiViewIID, out multiViewPtr);
if (multiViewPtr == null)
{
return false;
}
IBMDSwitcherMultiViewIterator multiViewIterator = (IBMDSwitcherMultiViewIterator)Marshal.GetObjectForIUnknown(multiViewPtr);
if (multiViewIterator == null)
{
return false;
}
multiViewIterator.Next(out _BMDSwitcherMultiView);
return true;
}
This doesn't work with the SwitcherStreamRTMP object. According to the documentation, the MultiView object is integrated via the CreateIterator method, the SwitcherStreamRTMP object with the QueryInterface method. So I tried something like this:
- Code: Select all
private bool atem_initialize_stream_rtmp()
{
IntPtr StreamPtr;
Guid streamIID = typeof(IBMDSwitcherStreamRTMP).GUID;
Marshal.QueryInterface(_BMDSwitcher, ref streamIID, out StreamPtr);
}
Unfortunately that doesn't work. I got the error: Conversion of "BMDSwitcherAPI.IBMDSwitcher" to "System.IntPtr" not possible.
Does anybody know how to integrate the StreamRTMP object?
Thanks!