Tue Dec 11, 2018 12:18 pm
Hi,
I'm using C# code provided in the SDK as example and I'm getting an error while capturing still
Solution: StillsCSharp
Issue In Function :
public Bgra32VideoFrame ConvertFrame(IDeckLinkVideoFrame srcFrame)
{
Bgra32VideoFrame dstFrame;
// Check whether srcFrame is already bmdFormat8BitBGRA
if (srcFrame.GetPixelFormat() == _BMDPixelFormat.bmdFormat8BitBGRA)
dstFrame = (Bgra32VideoFrame)srcFrame;
else
{
dstFrame = new Bgra32VideoFrame(srcFrame.GetWidth(), srcFrame.GetHeight(), srcFrame.GetFlags());
m_deckLinkConversion.ConvertFrame(srcFrame, (IDeckLinkVideoFrame)dstFrame);
}
return dstFrame;
}
Issue in line:
dstFrame = (Bgra32VideoFrame)srcFrame;
Exception:
Unable to cast COM object of type 'System.__ComObject' to class type 'StillsCSharp.Bgra32VideoFrame'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
Windows OS:
Windows 10
Please help me in resolving the issue