COM exception during ConvertFrame function

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

sunil_sjb

  • Posts: 2
  • Joined: Tue Dec 11, 2018 12:07 pm
  • Real Name: Sunil Kumar

COM exception during ConvertFrame function

PostTue 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
Offline

cristhiangr

  • Posts: 4
  • Joined: Wed Mar 27, 2019 12:45 am
  • Real Name: Cristhian Gallo

Re: COM exception during ConvertFrame function

PostWed Mar 27, 2019 12:47 am

Hello, I have the same problem, could you solve it?
Offline

Cameron Nichols

Blackmagic Design

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

Re: COM exception during ConvertFrame function

PostWed Mar 27, 2019 11:26 pm

Hi Cristhian,

Please download the latest Desktop Video SDK 11.0, this issue was resolved in this release.

Kind Regards
Cameron
Offline

cristhiangr

  • Posts: 4
  • Joined: Wed Mar 27, 2019 12:45 am
  • Real Name: Cristhian Gallo

Re: COM exception during ConvertFrame function

PostTue Apr 02, 2019 8:34 pm

Thank you Cameron
I already have it but now I have another problem in this new SDK in Strill.cs in the VideoFrameArrived method in the code "if (m_captureCountdown! = Null)
m_captureCountdown.Signal (); "I missed the following error" System.InvalidOperationException: 'Invalid attempt to reduce the count of the event below zero'. "

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 2 guests