libdc1394  2.2.6
Macros | Typedefs | Enumerations | Functions
capture.h File Reference

Capture functions. More...

#include <dc1394/log.h>
#include <dc1394/video.h>

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)
 

Detailed Description

Capture functions.

Author
Damien Douxchamps: coding
Peter Antoniac: documentation maintainer

More details soon

Macro Definition Documentation

◆ DC1394_CAPTURE_FLAGS_CHANNEL_ALLOC

#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 Documentation

◆ dc1394capture_callback_t

typedef void(* dc1394capture_callback_t) (dc1394camera_t *, void *)

typedef for the callback param for dc1394_capture_set_callback

Enumeration Type Documentation

◆ dc1394capture_policy_t

The capture policy.

Can be blocking (wait for a frame forever) or polling (returns if no frames is in the ring buffer)

Function Documentation

◆ dc1394_capture_dequeue()

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.

◆ dc1394_capture_enqueue()

dc1394error_t dc1394_capture_enqueue ( dc1394camera_t camera,
dc1394video_frame_t frame 
)

Returns a frame to the ring buffer once it has been used.

◆ dc1394_capture_get_fileno()

int dc1394_capture_get_fileno ( dc1394camera_t camera)

Gets a file descriptor to be used for select(). Must be called after dc1394_capture_setup().

◆ dc1394_capture_is_frame_corrupt()

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.

◆ dc1394_capture_set_callback()

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).

◆ dc1394_capture_setup()

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)

◆ dc1394_capture_stop()

dc1394error_t dc1394_capture_stop ( dc1394camera_t camera)

Stop the capture