Page 1 of 1

Request - Simple example of Vanc Capture

PostPosted: Fri Feb 08, 2019 12:48 pm
by yuriflorencio
Hi
Does anyone have a simple example to VANC Capture?

I'm reading the manual, but don't know how to start.

Thanks in advance

I'm really new to this area. Just looking for some help to start.

Re: Request - Simple example of Vanc Capture

PostPosted: Mon Feb 18, 2019 4:33 pm
by yuriflorencio
hi
What should i pass as parameter in

2.5.21.2 IDeckLinkVideoFrameAncillaryPackets::GetFirstPacketByID method

I have the DID, SDID, but I don't know what to pass as parameter in IDeckLinkAncillaryPacket **packet

example: GetFirstPacketByID(61,01,??)

Re: Request - Simple example of Vanc Capture

PostPosted: Thu Feb 21, 2019 9:56 pm
by Cameron Nichols
Hi Yuri,

The IDeckLinkAncillaryPacket **packet parameter is an output, so you need to provide a reference to pointer IDeckLinkAncillaryPacket*

For example:
Code: Select all
IDeckLinkVideoAncillaryPackets* vancPackets = NULL;
IDeckLinkAncillaryPacket* packet = NULL;
HRESULT hr = S_OK;

hr = videoFrame->QueryInterface(IID_IDeckLinkVideoAncillaryPackets, (void**)&vancPackets);
if (hr != S_OK)
    goto bail;

hr = vancPackets->GetFirstPacketByID(61, 01, &packet);
if (hr != S_OK)
    goto bail;

Regards
Cameron

Re: Request - Simple example of Vanc Capture

PostPosted: Mon Mar 04, 2019 2:00 pm
by dheitmueller@ltnglobal.com
Hi yuriflorencio,

You might want to take a look at libklvanc and klvanc-tools. This library abstracts out all the VANC parsing and makes it easy to do VANC capture (just initialize the library, set callbacks for the VANC types you want to receive and start capturing video frames).

https://github.com/stoth68000/libklvanc
https://github.com/stoth68000/klvanc-tools

Some command line tools are included which demonstrate use of the library (and are a good starting point for writing your own app).