-
To activate system buffers, set the
buffer_type field of the video format to
UNICAP_BUFFER_TYPE_SYSTEM.
-
Use unicap_register_callback to tell unicap which
function to call on each new frame.
-
unicap_start_capture activates the video
devices. The registered callback gets called when new
frames arrive from now on.
-
The callback gets called in a different thread context:
the capture thread context. Here we just wait until the
given number of frames was seen by the callback.
-
unicap_stop_capture deactivates the video capture device.
-
The callback gets called in the capture thread
context. The lowlevel drivers have an internal ring buffer
of a size which depends on the video capture device. If a
new frame arrives while the callback is still being
executed, it is placed into the ring buffer. If the ring
buffer is full, the new frames are dropped.