LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SetCallbac​k ActiveX Control.

Solved!
Go to solution

Hello, All

  

I'm trying to capture & plyingback with the 'blackmagic hdmi capture board' using the ActiveX control that the cards supports.

But i have some problem on SetCallback & RegisterEventCallback ActiveX Control. i don't know how to create labview code for  'IDeckLinkInput::SetCallback' and  'IDeckLinkInputCallback::VideoInputFrameArrived' as in the following:

 

decklink1.JPG

 

decklink2.JPG

According to Blackmagic Decklink SDK(page 26 in sdk.pdf), 

 

Capture
An application performing a standard streaming capture operation should perform the following steps:
• If desired, enumerate the supported capture video modes by calling IDeckLinkInput::GetDisplayModeIterator. For each reported capture
mode, call IDeckLinkInput::DoesSupportVideoMode to check if the combination of the video mode and pixel format is supported. 
-> OK
• IDeckLinkInput::EnableVideoInput 
-> OK
• IDeckLinkInput::EnableAudioInput 
-> OK
• IDeckLinkInput::SetCallback 
-> ???
• IDeckLinkInput::StartStreams -
> OK
• While streams are running:
- receive calls to IDeckLinkInputCallback::VideoInputFrameArrived with video frame and corresponding audio packet 
-> ???
IDeckLinkInput::StopStreams 
-> OK
Audio may be “pulled” from a separate thread if desired.
If audio is not required, the call to IDeckLinkInput::EnableAudioInput may be omitted and the IDeckLinkInputCallback::VideoInputFrameArrived
callback will receive NULL audio packets.

 

I attatched my LabVIEW code with SDK and DLL. Please advise me!!

 

Download All
0 Kudos
Message 1 of 6
(4,692 Views)

For this SDK you need to implement an ActiveX class with the according interface. LabVIEW can't be used to implement ActiveX classes, it can only host ActiveX servers. If the SDK developer would have decided to also support ActiveX Events besides (or instead) of callback object interfaces, then you would be in business since LabVIEW does have support for ActiveX Events.

 

Since the ActiveX Server for your device doesn't seem to support ActiveX events you would have to write a wrapper ActiveX component in C++ or similar which implements the ActiveX callback class and then translates this into an ActiveX event or possibly directly into a LabVIEW user event. But especially the latter is pretty advanced C++ programming.

Rolf Kalbermatter
My Blog
Message 2 of 6
(4,673 Views)

That was very helpful, thank you!!

0 Kudos
Message 3 of 6
(4,652 Views)

Hello, All

 

I'm trying to capture & plyingback with the 'blackmagic hdmi capture board' using the ActiveX control that the borad supports.

But i have some problem on SetCallback & RegisterEventCallback ActiveX Control. i don't know how to create labview code for  'IDeckLinkInput::SetCallback' and  'IDeckLinkInputCallback::VideoInputFrameArrived' as in the following:

 

 

decklink1.JPG

decklink2.JPG

 

 

According to Blackmagic Decklink SDK(page 26 in sdk.pdf), 

 

Capture
An application performing a standard streaming capture operation should perform the following steps:
• If desired, enumerate the supported capture video modes by calling IDeckLinkInput::GetDisplayModeIterator. For each reported capture
mode, call IDeckLinkInput::DoesSupportVideoMode to check if the combination of the video mode and pixel format is supported. 
-> OK
• IDeckLinkInput::EnableVideoInput 
-> OK
• IDeckLinkInput::EnableAudioInput 
-> OK
• IDeckLinkInput::SetCallback 
-> ???
• IDeckLinkInput::StartStreams -
> OK
• While streams are running:
- receive calls to IDeckLinkInputCallback::VideoInputFrameArrived with video frame and corresponding audio packet 
-> ???
IDeckLinkInput::StopStreams 
-> OK
Audio may be “pulled” from a separate thread if desired.
If audio is not required, the call to IDeckLinkInput::EnableAudioInput may be omitted and the IDeckLinkInputCallback::VideoInputFrameArrived
callback will receive NULL audio packets.

 

I attatched my LabVIEW code with SDK and DLL. Please advise me!!

 

0 Kudos
Message 4 of 6
(4,660 Views)
Solution
Accepted by topic author yongkyu

This is almost exactly the same post as your initilal post. And you mentioned that my answer was very informative just before that.

 

You have two options:

 

1) ask the manufacturer to extend their SDK interface to also include an ActiveX event interface in addition to the callback interface

2) go and write (oir hire someone to write) an ActiveX DLL wrapper in C++ or similar that implements the ActiveX callback, calls the original API to assign it but in the callback trannslate it into an ActitveX event. 

 

Or ask the manufacturer if they have a different API available although most likely if they have it would be a standard C API and interfacing that to LabVIEW is going tto be a lot more painfull than ActiveX.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 6
(4,636 Views)

That was very helpful to me. i'll try it on your advice.

 

Thanks.

0 Kudos
Message 6 of 6
(4,565 Views)