capture_put_buffer()

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

Synopsis:

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

Arguments:

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

Library:

libcapture

Description:

This function capture_put_buffer() 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 subfields, 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 frames in the correct sequence. Thus, displaying an interlaced video correctly on a progressive display requires 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.

Returns:

0
Success.
-1
An error occurred (errno is set).

Errors:

EINVAL
Invalid index (idx) argument, or invalid sequence.