- Posts: 1
- Joined: Fri Aug 20, 2021 8:03 am
- Real Name: GyeongIk Shin
Hi Shin,
To access HDR metadata and Colorspace data from incoming frame: firstly in the IDeckLinkInputCallback::VideoInputFrameArrived callback, on the the received frame call IDeckLinkVideoInputFrame::QueryInterface[1] with REFIID = IID_IDeckLinkVideoFrameMetadataExtensions[2].
With the output IDeckLinkVideoFrameMetadataExtensions[2] object, call IDeckLinkVideoFrameMetadataExtensions::GetInt[3] with metadata ID bmdDeckLinkFrameMetadataHDRElectroOpticalTransferFunc[4] to access EOTF (HLG = 3).
Similarly you can access the colorspace of the input frame by calling IDeckLinkVideoFrameMetadataExtensions::GetInt[3] with metadata ID bmdDeckLinkFrameMetadataColorspace[4]. Check that the output ID is bmdColorspaceRec2020[5].
The CapturePreview SDK sample demonstrates reading the HDR metadata and Colorspace from the incoming frame.
Regards
Cameron
References (DeckLink SDK Manual):
[1] 1.2.1.1 IUnknown::QueryInterface method
[2] 2.5.43 IDeckLinkVideoFrameMetadataExtensions Interface
[3] 2.5.43.1 IDeckLinkVideoFrameMetadataExtensions::GetInt method
[4] 3.62 Frame Metadata ID
[5] 3.66 Colorspace