Acquire a frame.
int SDL_AcquireVideoCaptureFrame(SDL_VideoCaptureDevice *device, SDL_VideoCaptureFrame *frame);
device | opened video capture device |
frame | pointer to get the frame |
Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
The frame is a memory pointer to the image data, whose size and format are given by the the obtained spec.
Non blocking API. If there is a frame available, frame->num_planes is non
After used, the frame should be released with SDL_ReleaseVideoCaptureFrame
This function is available since SDL 3.0.0.