Pass a buffer to the driver for deinterlacing a frame when bringing in video from an external source


#include <vcapture/capture.h>
int capture_put_buffer(capture_context_t ctx,
                       uint32_t idx,
                       uint32_t flags)


The pointer to the video capture context.
The index to the frame buffer to inject into the capture driver.
Flag specifying how to process the deinterlaced frame.




This function passes a buffer to the driver for deinterlacing frames brought in from a video on an external source, such as a USB memory stick. It should be used only when the CAPTURE_FLAG_EXTERNAL_SOURCE flag is set.

Interlaced video frames (typical of analog video) contain two sequential fields, which doubles the perceived frame rate and improves the video quality. To display interlaced video in a system using a progressive display, the interlaced frames need to be separated into two fields in the correct sequence. Thus, displaying an interlaced video correctly on a progressive display requires at least two buffers for every interlaced frame. The capture_put_buffer() function passes a buffer to the driver, which it can use for the second frame extracted from the interlaced frame.


0 if successful; or -1 if an error occurred (errno is set; refer to errno.h for more details). The return value and the value that's observed for errno may vary as they are dependent on the implementation by the library that handles your hardware.