Enable the viewfinder event.
camera_error_t camera_enable_viewfinder_event(camera_handle_t handle, camera_eventmode_t eventmode, camera_eventkey_t *key, struct sigevent *event)
The handle returned by a call to the camera_open() function.
The event buffering mode as a camera_eventmode_t value.
A pointer to a returned camera_eventkey_t value. This argument is required for subsequent function calls to identify the proper event.
A pointer to a struct sigevent. The struct sigevent must be initialized by the caller. This is the struct sigevent that will be delivered when a viewfinder frame is available to retrieve using camera_get_viewfinder_buffers().
Library:libcamapi (For the qcc command, use the -l camapi option to link against this library)
Use this function to enable the viewfinder event. The viewfinder event is delivered when a viewfinder frame is available. You can then retrieve the viewfinder frame using camera_get_viewfinder_buffers(). This is the same image data that is delivered to your viewfinder_callback function registered when you started the viewfinder using camera_start_viewfinder().
Call this function when you are using the Camera API in event mode. For more information, see About event mode.
Use camera_disable_event() to disable an event when you no longer require viewfinder events to be delivered.
The viewfinder is automatically rendered to a screen window by the operating system. It is not required to provide display code unless custom output is required using some other mechanism such as OpenGL.
Last modified: 2014-11-11