- Posts: 9
- Joined: Mon Feb 17, 2020 6:59 pm
- Real Name: Glenn Kenny
The GetTimecode() is overridden as DeckLinkCoreMediaVideoFrame implements IDeckLinkVideoFrame. For timecode to be embedded in the output video frame, you should do the following.
- Create class that implements IDeckLinkTimecode [1], has local members for hours, minutes, seconds, frames, flags, optionally string and optionally userbits. Pass these into constructor and implement all IDeckLinkTimecode and IUnknown methods. Ensure QueryInterface casts for REFIID of IID_IDeckLinkTimecode
- Implement DeckLinkCoreMediaVideoFrame as IDeckLinkMutableVideoFrame, instead of IDeckLinkVideoFrame. [2]
- In DeckLinkCoreMediaVideoFrame, have a custom timecode member for each BMDTimecodeFormat you want to support
- Implement IDeckLinkMutableVideoFrame::SetTimecode() - call your custom timecode constructor with values from timecode->Get* methods. You may need to release existing timecode if non-nullptr.
- Implement IDeckLinkMutableVideoFrame::SetTimecodeFromComponents() - call custom timecode constructor with parameters. You may need to release existing timecode if non-nullptr.
- Implement IDeckLinkVideoFrame::GetTimecode() [3] return your custom timecode object
- Set timecode by calling SetTimecode() or SetTimecodeFromComponents() within your application
Let me know if you require further elaboration.
Regards
Cameron
References:
[1] 2.5.24 IDeckLinkTimecode Interface
[2] 2.5.7 IDeckLinkMutableVideoFrame Interface
[3] 2.5.5.7 IDeckLinkVideoFrame::GetTimecode method