Create a video capture context
#include <vcapture/capture.h>
capture_context_t capture_create_context(uint32_t flags)
You must create a context before you can set video capture properties and start video capture. The context contains both mandatory information, such as device ID and input source ID (e.g., device 1, input source 2), and optional settings, such as brightness.
You can create multiple contexts, but you can have only one context in use for each device-source combination. If you have created multiple contexts for the same device-source combination, capture_get_frame() will use the first context you have enabled with capture_set_property_i().
Before your application exits, it must call capture_destroy_context() to destroy every context that it created. Failure to destroy a context before exiting can lead to memory corruption and unpredictable system behavior.
A pointer to a new context if successful; or NULL if an error occurred (errno is set; refer to errno.h for more details). The value that's observed for errno may vary as it is hardware dependent.