-
To activate user buffers, set the
buffer_type field of the video format to
UNICAP_BUFFER_TYPE_USER.
-
The application needs to allocate the memory for each data
buffer. The buffer_size field of the
unicap_format_t struct contains the number of bytes
required for one buffer.
-
unicap_start_capture activates the video
device.
-
The buffer needs to be placed in the queue using
unicap_queue_buffer. The buffer should not be
accessed by the application until it is returned by a call
to either unicap_wait_buffer or
unicap_dequeue_buffer.
-
After a buffer is returned by unicap_wait_buffer,
image processing algorithms can access the image data
pointed to in the buffer.data field. When the
application is done with the buffer, it can be placed back
in the queue using unicap_queue_buffer.
-
unicap_stop_capture deactivates the video capture device.