06-21-2016 01:53 AM
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:
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!!
Solved! Go to Solution.
06-21-2016 05:30 AM
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.
06-21-2016 08:28 PM
That was very helpful, thank you!!
06-21-2016 08:34 PM
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:
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!!
06-22-2016 02:22 AM - edited 06-22-2016 02:23 AM
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.
06-27-2016 12:50 AM
That was very helpful to me. i'll try it on your advice.
Thanks.