- Posts: 1
- Joined: Fri May 06, 2022 11:23 pm
- Real Name: Ben Chen
Consider the following code segment:
- Code: Select all
IDeckLinkVideoFrame* videoFrame;
// Initialize videoFrame with IDeckLinkOutput::CreateVideoFrame
uint32_t rowBytes = videoFrame->GetRowBytes();
uint32_t* buffer = nullptr;
if (videoFrame->GetBytes((void**) buffer) == S_OK)
{
// Process buffer
}
The output buffer parameter points to the beginning (top-left) of the video frame buffer. The beginning of the 2nd row is buffer + rowBytes, beginning of 3rd row is buffer + 2 * rowBytes, etc. Then any additional padding is always at the end of the row.
Regards
Cameron