libdc1394
2.2.6
|
Capture functions. More...
Macros | |
#define | DC1394_CAPTURE_FLAGS_CHANNEL_ALLOC 0x00000001U |
Typedefs | |
typedef void(* | dc1394capture_callback_t) (dc1394camera_t *, void *) |
Enumerations | |
enum | dc1394capture_policy_t |
Functions | |
dc1394error_t | dc1394_capture_setup (dc1394camera_t *camera, uint32_t num_dma_buffers, uint32_t flags) |
dc1394error_t | dc1394_capture_stop (dc1394camera_t *camera) |
int | dc1394_capture_get_fileno (dc1394camera_t *camera) |
dc1394error_t | dc1394_capture_dequeue (dc1394camera_t *camera, dc1394capture_policy_t policy, dc1394video_frame_t **frame) |
dc1394error_t | dc1394_capture_enqueue (dc1394camera_t *camera, dc1394video_frame_t *frame) |
dc1394bool_t | dc1394_capture_is_frame_corrupt (dc1394camera_t *camera, dc1394video_frame_t *frame) |
void | dc1394_capture_set_callback (dc1394camera_t *camera, dc1394capture_callback_t callback, void *user_data) |
Capture functions.
More details soon
#define DC1394_CAPTURE_FLAGS_CHANNEL_ALLOC 0x00000001U |
Capture flags. Currently limited to switching automatic functions on/off: channel allocation, bandwidth allocation and automatic starting of ISO transmission
typedef void(* dc1394capture_callback_t) (dc1394camera_t *, void *) |
typedef for the callback param for dc1394_capture_set_callback
The capture policy.
Can be blocking (wait for a frame forever) or polling (returns if no frames is in the ring buffer)
dc1394error_t dc1394_capture_dequeue | ( | dc1394camera_t * | camera, |
dc1394capture_policy_t | policy, | ||
dc1394video_frame_t ** | frame | ||
) |
Captures a video frame. The returned struct contains the image buffer, among others. This image buffer SHALL NOT be freed, as it represents an area in the memory that belongs to the system.
dc1394error_t dc1394_capture_enqueue | ( | dc1394camera_t * | camera, |
dc1394video_frame_t * | frame | ||
) |
Returns a frame to the ring buffer once it has been used.
int dc1394_capture_get_fileno | ( | dc1394camera_t * | camera | ) |
Gets a file descriptor to be used for select(). Must be called after dc1394_capture_setup().
dc1394bool_t dc1394_capture_is_frame_corrupt | ( | dc1394camera_t * | camera, |
dc1394video_frame_t * | frame | ||
) |
Returns DC1394_TRUE if the given frame (previously dequeued) has been detected to be corrupt (missing data, corrupted data, overrun buffer, etc.). Note that certain types of corruption may go undetected in which case DC1394_FALSE will be returned. The ability to detect corruption also varies between platforms. Note that corrupt frames still need to be enqueued with dc1394_capture_enqueue() when no longer needed by the user.
void dc1394_capture_set_callback | ( | dc1394camera_t * | camera, |
dc1394capture_callback_t | callback, | ||
void * | user_data | ||
) |
Set a callback if supported by the platform (OS X only for now).
dc1394error_t dc1394_capture_setup | ( | dc1394camera_t * | camera, |
uint32_t | num_dma_buffers, | ||
uint32_t | flags | ||
) |
Setup the capture, using a ring buffer of a certain size (num_dma_buffers) and certain options (flags)
dc1394error_t dc1394_capture_stop | ( | dc1394camera_t * | camera | ) |
Stop the capture