- Posts: 1
- Joined: Wed Jul 10, 2019 6:03 am
- Real Name: Kevin Wooley
We are developing a simple capture utility and have run into a somewhat baffling problem. When we connect most 1080p24 sources to the input, we are able to capture a frame and convert it to RGB using the IDeckLinkVideoConversion::ConvertFrame method. However, when we connect the Main SDI output from a Blackmagic Ursa Mini 4k camera, we get an E_NOTIMPL error from convert frame, even though camera is outputing a 1080p24 signal and it is detected as such. It works just fine with other sources and other cameras!
Here's what our callback for VideoFrameArrived looks like:
Any ideas what the problem might be? When we check all the available flags on the incoming video frame, it sure looks like the format from the Ursa is identical to the other sources - 1080p24, 1920x1080, YCbCr422 input, 10-bit YUV pixel format input, etc.
Thanks!
Here's what our callback for VideoFrameArrived looks like:
- Code: Select all
virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(IDeckLinkVideoInputFrame *frame,
IDeckLinkAudioInputPacket *packet)
{
static IDeckLinkVideoConversion* _conversion = CreateVideoConversionInstance();
if (frame && (frame->GetFlags() & bmdFrameHasNoInputSource) == 0)
{
IDeckLinkMutableVideoFrame _conversionFrame;
auto result = device()->deckLinkOutput()->CreateVideoFrame(frame>GetWidth(),
frame->GetHeight(),
frame->GetWidth()*4,
bmdFormat8BitARGB,
bmdFrameFlagDefault,
&_conversionFrame);
if (result != S_OK)
{
std::cout << "Unable to create conversion target output frame in rgb format" << std::endl;
return result;
}
auto result = _conversion->ConvertFrame(frame, _conversionFrame);
if (result != S_OK)
{
std::cout << "Unable to convert frame to rgb format" << std::endl;
switch(result)
{
case (E_FAIL):
std::cout << " E_FAIL" << std::endl; break;
case (E_NOTIMPL):
std::cout << " E_NOTIMPL" << std::endl; break;
case (E_OUTOFMEMORY):
std::cout << " E_OUTOFMEMORY" << std::endl; break;
}
return result;
}
// Do something interesting with the image
}
return S_OK;
}
Any ideas what the problem might be? When we check all the available flags on the incoming video frame, it sure looks like the format from the Ursa is identical to the other sources - 1080p24, 1920x1080, YCbCr422 input, 10-bit YUV pixel format input, etc.
Thanks!