- Posts: 13
- Joined: Sat Jan 06, 2018 7:55 pm
So long as the IDeckLinkInputCallback::VideoInputFrameArrived[1] callback is being returned promptly, then you should be able to receive callback shortly after the end of frame on the wire (a few ms). You should run the InputLoopThrough SDK sample to see this measurement.
If the VideoInputFrameArrived callback is not promptly returned, then you may see queuing of input frames, and IDeckLinkInput::GetAvailableVideoFrameCount[2] and latency will grow.
As best practice:
- Maintain the frame reference by calling IDeckLinkVideoInputFrame::AddRef
- Push the captured frame to a queue (eg SampleQueue in InputLoopThrough)
- Return from IDeckLinkInputCallback::VideoInputFrameArrived
- In processing thread, pop the frame from queue
- Once completed processing release frame with IDeckLinkVideoInputFrame::Release
Regards
Cameron
References:
[1] DeckLink SDK Manual 2.5.10.1 IDeckLinkInputCallback::VideoInputFrameArrived method
[2] DeckLink SDK Manual 2.5.4.6 IDeckLinkInput::GetAvailableVideoFrameCount method
[3] https://developer.nvidia.com/gpudirectforvideo