- Posts: 4
- Joined: Tue Dec 06, 2016 5:46 pm
Hi Basavaraja,
If your application has a pointer to pixel data in an appropriate pixel format [1] for the DeckLink API, and on the assumption that the video frame cannot be generated directly into an IDeckLinkVideoFrame[2] buffer created via IDeckLinkOutput::CreateVideoFrame [3], the next option is that your application can implement your own class implementing the IDeckLinkVideoFrame interface, and provide those frames for playback via the DeckLink API.
Your custom video frame class can implement the methods exposed by the IDeckLinkVideoFrame interface in order to return the frame width, height, pixel format, etc, and implement GetBytes[4] to return the pointer to the valid pixel buffer data generated by your application.
Please note that your implementation will have to take care to ensure that the pointer returned by GetBytes is valid for as long as the video frame instance is valid.
For an example of a custom IDeckLinkVideoFrame implementation, please see the SignalGenerator SDK sample class SignalGenerator3DVideoFrame, which implements the IDeckLinkVideoFrame and IDeckLinkVideoFrame3DExtensions [5] interfaces, noting that IDeckLinkVideoFrame3DExtensions will be unnecessary for your application unless you are implementing 3D playback.
Cheers,
-nick
[1] 2.7.4 Pixel Formats
[2] 2.5.5 IDeckLinkVideoFrame Interface
[3] 22.5.3.8 IDeckLinkOutput::CreateVideoFrame method
[4] 2.5.5.6 IDeckLinkVideoFrame::GetBytes method
[5] 2.5.8 IDeckLinkVideoFrame3DExtensions Interface