Hi Juri,
To output a frame with Rec.2020, please use the following steps:
- If required, create IDeckLinkMutableVideoFrame object with IDeckLinkOutput::CreateVideoFrame[1].
- Create new class that implements both IDeckLinkVideoFrame and IDeckLinkVideoFrameMetadataExtensions with the following guidance[2][3]:
- Provide created IDeckLinkMutableVideoFrame object to constructor, storing reference.
- Release reference to IDeckLinkMutableVideoFrame object in destructor
- Implement all methods of IDeckLinkVideoFrame providing wrapped calls to the local IDeckLinkMutableVideoFrame member.
- Implement IDeckLinkVideoFrameMetadataExtensions::GetInt to return colorspace value bmdColorspaceRec2020 when metadata ID is bmdDeckLinkFrameMetadataColorspace[4][5]. Return E_NOTIMPL for other metadata IDs
- The remaining IDeckLinkVideoFrameMetadataExtensions method should just return E_NOTIMPL.
- Implement IUnknown methods with examples from SDK samples. QueryInterface should handle cases for IID_IDeckLinkVideoFrame and IID_IDeckLinkVideoFrameMetadataExtensions.
- Create an object with the custom interface and schedule output with the IDeckLinkVideoFrame as normal.
The SignalGenHDR sample should be used as reference, please have a look at the implementation of class HDRVideoFrame.
Regards
Cameron
References (DeckLink SDK manual)
[1] Section 2.5.3.9 IDeckLinkOutput::CreateVideoFrame method
[2] Section 2.5.5 IDeckLinkVideoFrame Interface
[3] Section 2.5.43 IDeckLinkVideoFrameMetadataExtensions Interface
[4] Section 3.65 Colorspace
[5] Section 3.61 Frame Metadata ID