capture_update()

Updated: May 27, 2022

Apply the capture settings

Synopsis:

#include <vcapture/capture.h>
int capture_update(capture_context_t context,
                   uint32_t flags)

Arguments:

context
The pointer to the video capture context.
flags
Reserved. Don't use.

Library:

libcapture

Description:

This function applies (commits) all updates posted since it was last called to the driver.

Functions such as capture_set_property_i() and capture_set_property_p() update memory but they don't apply updates to the video capture device. To apply updates, you must call capture_update(). This behavior allows the proper combining of discrete properties, such as *DST_X, *DST_Y and *DST_WIDTH. Once these properties are combined, a call to capture_update() commits all the changes to the device at the same time.

Returns:

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. The driver may slog*() more detailed error information. Use slog2info to retrieve it.