LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using BlackMagic DeckLink SetCallback ActiveX Control

Hello All

 

I am currently getting to grips with a Blackmagic Decklink Capture Card.

 

I have managed to get an input from the card using OpenCV as this uses the directshow drivers.

I have read that this driver digitises the image - for my application this is not good.

 

I am trying to control and recieve an input from the card using the ActiveX controller that the card supports. So far I have managed to recieve a handle to the card and have gotten some basic functions to complete successfully. Following the instruction for the Decklink SDK I am at a stage where I should create a callback which is trigger when a new frame becomes available - from here I should then be able to start pulling frames from the card. However the callback is difficult to setup.

 

The Decklink SDK provides a function (IDeckLinkInputSetCallback) this looks like it sets the callback but I have no detail of the callbacks prototype.

I was wondering if I should set the callback up manually using CA_RegisterEventCallback or if CVI already manages this.

 

Has anyone already achieved this/ achieved similar with another ActiveX controller?

0 Kudos
Message 1 of 11
(5,345 Views)

I have managed to get the card working via the IMAQdx driver supplied with the NI vision modulesSmiley Very Happy

 

Unfortunately this joy was short lived as I am now realizing that this driver is working via Windows Directshow which appears to be limiting my input to 8-bits per pixel.Smiley Mad

 

I know that the Decklink card I am using is capable of 10-bits and I MUST have a 10-bit input. Can anyone confirm that this method does limit the video to 10-bits?

 

Also does anyone have any knowledge about using this card via DirectX as this is my preferred option as I am reasonably sure that I can achieve a 10 bit input using this method.

 

Cheers in advance.

Message 2 of 11
(5,287 Views)

I didn't realize I would be so in over my head.  I have a lot to learn before I move to the next step. Clearly This is the place to leanr and get the answers. Thank you!

0 Kudos
Message 3 of 11
(5,274 Views)

Better late than never. A good place to start would be the LabView Directshow VIs. With these I am to capture video from my Blackmagic card. I still have to set up the format in the Control Panel.

The DirectShow Vis are at https://decibel.ni.com/content/docs/DOC-26402

 

 

0 Kudos
Message 4 of 11
(4,933 Views)

Hi Thanks for the response

 

Still beavering away at this but have made sizeable progress since this post.

 

First off I ma looking for solutions within CVI and not LabView but I often find that if there is a solution in Labview then there is often one in CVI so my question becomes.....does Labview allow for capture of a 10 bit image? That is my biggest stumbling block.

 

My solution so far involves writing a C wrapper dll for the existing C++ SDK that is supplied with these cards in Visual studio then using it within CVI.

 

This works but has been allot of work and as disappointed as I would be to find that there is a simpler solution I would be happy to simplify the code involved in my overall project - and also to put details of the best solution on the forums for others that may be trying to do the same thing!

 

Another disadvantage to the curretn method is it is a little slow - I am constantly looking at way of speeding up aquisition of the images. I have no solid numbers but I'd estimate I am working in the region fo around 10 frames a second when working with 10 bit images.

 

For 8 bit images the best solution I have found is to make use of the IPP library that is provided by Intel. This hasgreat functions for taking the raw data from the card and presenting it in various ways at high speed. I have written 1 application with this that pulls the informaiton in real time but only at 8 bit as unfortunately there is no 10 bit option.

0 Kudos
Message 5 of 11
(4,917 Views)

Sorry about that. I have been searching so long on a way to do this (CVI or LabView) that I am just on one track.

0 Kudos
Message 6 of 11
(4,910 Views)

Hey - No problem

 

I'm glad that I am not the only person trying to do this!

 

As I said I have chosen to use the SDK directly and create a rapper to use in CVI - this also presents its challenges as you cna imagine.

 

If you find a simpler way please let me know as I will you.

 

0 Kudos
Message 7 of 11
(4,908 Views)

If it is any help to know that it can be done. I set up my BlackMagic SDI card to receive 10 bit 1080i 29.97fps and it is showing the video just fine using the directshow labview vis. Streaming smoothly.

You probably already know this but If you are trying to capture the images to disk you will have to have several drives in a RAID 0 array to go fast enough.

0 Kudos
Message 8 of 11
(4,897 Views)

How did you verify that the picture you were capturing was 10 bit?

 

It's a while since I last set this up using the IMAqDx drivers but if I remember correctly with the declink card set to 10 bit the image did capture but when I looked closely at the data it was only 8 bit.

 

Just to mention that it is great to speak to someone about this. I've not found anyone doing a similar project before!

0 Kudos
Message 9 of 11
(4,891 Views)

My confidence is high. In my setup I am taking a transport stream into a decoder and outputting SDI. The decoder indicates the stream is 10 bit. I have been told the architecture of our decoder does not allow bit change. What comes into the decoder as far as bit size is what I get out.

There should be a way to verify this. I will look into that.

 

0 Kudos
Message 10 of 11
(4,887 Views)