- Posts: 2
- Joined: Thu Jul 21, 2016 2:30 pm
- Location: London
Hi!
I am new here and I am new using this SDK. I developed some part of the code using C#. I was able to make a simple application which detects the Black Magic Card, and reproduce on a picture box a SDI input signal. But I would like to go to the next step. I'm able to get the SDI signal on 8BitYUV pixel format. What I do now is using a "manual" method in order to convert this format to 24bppRgb format. But I would like to take advantage of ConvertFrame method, although I am not able to use it.
My code is something like that... This is a method that I call after the callback after each frame received.
But I have errors that I can't solve. I don't understand the way that I can give the format property that I want for the conversion. I would like to obtain the image from 10BitYUV format to 12BitRGB format. Only for showing on a picturebox.
Thank you very much for your help.
I am new here and I am new using this SDK. I developed some part of the code using C#. I was able to make a simple application which detects the Black Magic Card, and reproduce on a picture box a SDI input signal. But I would like to go to the next step. I'm able to get the SDI signal on 8BitYUV pixel format. What I do now is using a "manual" method in order to convert this format to 24bppRgb format. But I would like to take advantage of ConvertFrame method, although I am not able to use it.
My code is something like that... This is a method that I call after the callback after each frame received.
- Code: Select all
void Change_Format(IDeckLinkVideoFrame frame)
{
int width = frame.GetWidth();
int height = frame.GetHeight();
int rowBytes = frame.GetRowBytes();
int noBytes = rowBytes * height;
// Get output interface for conversion.
IDeckLinkOutput m_deckLinkOutput = null;
// Convert video frame to RGB format.
IDeckLinkVideoFrame outFrame = null;
// Create new frame.
m_deckLinkOutput.CreateVideoFrame(width, height, rowBytes, _BMDPixelFormat.bmdFormat8BitARGB, 0, outFrame);
IDeckLinkVideoConversion frameConverter = null;
// frameConverter = IDeckLinkVideoConversion.CreateVideoConversionInstance();
frameConverter.ConvertFrame(frame, outFrame); // Segmentation fault here.
}
But I have errors that I can't solve. I don't understand the way that I can give the format property that I want for the conversion. I would like to obtain the image from 10BitYUV format to 12BitRGB format. Only for showing on a picturebox.
Thank you very much for your help.