DeckLink device memory and frame capture serialization

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

TimLegrand

  • Posts: 3
  • Joined: Wed Apr 27, 2016 3:45 pm

DeckLink device memory and frame capture serialization

PostMon Mar 06, 2017 4:56 pm

Hi,

Reading the documentation, it is unclear whether the VideoInputFrameArrived() provides device-memory- or host-memory-allocated video frames. My understanding is that they are stored on the device, since storing more than 25 UHD frames without releasing them seem to break my app. Please correct me if I'm wrong.

Since keeping 25 frames is not possible, I now plan to release every incoming frame to free device memory.
What I would achieve then is to serialize incoming frames into host memory, so I can Release() them up as they come along, and in the end deserialize them from host-memory back to the device memory for playback.
Is there any way to achieve this easily using the API? I am expecting something like:
Code: Select all
IDeckLinkInput::SaveVideoFrame(IDeckLinkVideoInputFrame *videoFrame, IDeckLinkHostVideoFrame ** hostFrame)
IDeckLinkOutput::RestoreVideoFrame(IDeckLinkHostVideoFrame *hostFrame, IDeckLinkVideoInputFrame ** videoFrame)

If no, I guess I have to serialize/deserialize by myself.
The idea then is to fetch all data from the IDeckLinkVideoInputFrame with:
Code: Select all
GetPixelFormat
GetFlags
GetBytes
GetTimecode
GetAncillaryData

and then store all these data into host memory, and release the frame.
Later, when we will need to playout the frame, one can create a IDeckLinkMutableVideoFrame instance and set all the data with:
Code: Select all
SetFlags
SetTimecode
SetTimecodeFromComponents
SetAncillaryData
SetTimecodeUserBits

Since the documentation is as vague as for video frames, my question is does the GetAncillaryData() method also provide a pointer to device-memory ancillary data?
If yes, i.e. if objects are not stored into host memory, how to get out of this?

Thanks,
Tim

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 14 guests