⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dc1394_control.h

📁 This library provides functionality to control any camera that conforms to the 1394-Based Digital C
💻 H
📖 第 1 页 / 共 3 页
字号:
  DC1394_INVALID_FRAMERATE,  DC1394_INVALID_TRIGGER_MODE,  DC1394_INVALID_TRIGGER_SOURCE,  DC1394_INVALID_ISO_SPEED,  DC1394_INVALID_IIDC_VERSION,  DC1394_INVALID_COLOR_CODING,  DC1394_INVALID_COLOR_FILTER,  DC1394_INVALID_CAPTURE_MODE,  DC1394_REQ_VALUE_OUTSIDE_RANGE,  DC1394_INVALID_ERROR_CODE,  DC1394_MEMORY_ALLOCATION_FAILURE,  DC1394_TAGGED_REGISTER_NOT_FOUND,  DC1394_FORMAT7_ERROR_FLAG_1,  DC1394_FORMAT7_ERROR_FLAG_2,  DC1394_INVALID_BAYER_METHOD,  DC1394_INVALID_ARGUMENT_VALUE,  DC1394_INVALID_VIDEO1394_DEVICE,  DC1394_NO_ISO_CHANNEL,  DC1394_NO_BANDWIDTH,  DC1394_IOCTL_FAILURE,  DC1394_CAPTURE_IS_NOT_SET = -30,  DC1394_RAW1394_CAPTURE_FAILURE = 31,  DC1394_CAPTURE_IS_RUNNING,  DC1394_RAW1394_FAILURE} dc1394error_t;#define DC1394_ERROR_NUM DC1394_RAW1394_FAILURE+1/* Parameter flags for dc1394_setup_format7_capture() */#define DC1394_QUERY_FROM_CAMERA -1#define DC1394_USE_MAX_AVAIL     -2#define DC1394_USE_RECOMMENDED   -3/* The video1394 policy: blocking (wait for a frame forever)   or polling (returns if no frames in buffer) */typedef enum {   DC1394_VIDEO1394_WAIT=0,  DC1394_VIDEO1394_POLL} dc1394video_policy_t;/* Using this policy you can choose between two ring buffer behaviour:  1. FIFO: the function returns the next frame received  2. LIFO: the buffer always returns the last frame  The first one is good if you don't want to drop frames, the second  one is better if you want to limit latency.*/typedef enum {   DC1394_RING_BUFFER_NEXT=0,  DC1394_RING_BUFFER_LAST} dc1394ring_buffer_policy_t;/* Yet another boolean data type */typedef enum {  DC1394_FALSE= 0,  DC1394_TRUE} dc1394bool_t;/* Yet another boolean data type */typedef enum {  DC1394_OFF= 0,  DC1394_ON} dc1394switch_t;typedef enum {  DC1394_TRIGGER_ACTIVE_LOW= 0,  DC1394_TRIGGER_ACTIVE_HIGH} dc1394trigger_polarity_t;typedef enum {  DC1394_FEATURE_MODE_MANUAL= 0,  DC1394_FEATURE_MODE_AUTO,  DC1394_FEATURE_MODE_ONE_PUSH_AUTO} dc1394feature_mode_t;/* Camera capture structure. Do not access directly from your application.   Use dc1394_video_get_buffer and dc1394_video_get_fill_time instead. */typedef struct{  uint_t                  num;  dc1394color_coding_t    codings[DC1394_COLOR_CODING_NUM];} dc1394color_codings_t;typedef struct{  uint_t                  num;  dc1394video_mode_t      modes[DC1394_VIDEO_MODE_NUM];} dc1394video_modes_t;typedef struct{  uint_t                  num;  dc1394framerate_t       framerates[DC1394_FRAMERATE_NUM];} dc1394framerates_t;typedef struct{  uint_t                  num;  dc1394trigger_mode_t    modes[DC1394_TRIGGER_MODE_NUM];} dc1394trigger_modes_t;typedef struct{  uint_t                    num;  dc1394trigger_source_t    sources[DC1394_TRIGGER_SOURCE_NUM];} dc1394trigger_sources_t;/* Camera structure */typedef struct __dc1394_camera{  // system/firmware information  int                port;  nodeid_t           node;  uint64_t           euid_64;  quadlet_t          ud_reg_tag_12;  quadlet_t          ud_reg_tag_13;  octlet_t           command_registers_base;  octlet_t           unit_directory;  octlet_t           unit_dependent_directory;  octlet_t           advanced_features_csr;  octlet_t           absolute_control_csr;  octlet_t           PIO_control_csr; // future use  octlet_t           SIO_control_csr; // future use  octlet_t           strobe_control_csr; // future use  octlet_t           format7_csr[DC1394_VIDEO_MODE_FORMAT7_NUM];  dc1394iidc_version_t iidc_version;  char               vendor[MAX_CHARS + 1];  char               model[MAX_CHARS + 1];  quadlet_t          vendor_id;  quadlet_t          model_id;  dc1394bool_t       bmode_capable;  dc1394bool_t       one_shot_capable;  dc1394bool_t       multi_shot_capable;  dc1394bool_t       adv_features_capable;  dc1394bool_t       can_switch_on_off;  // some current values  dc1394video_mode_t video_mode;  dc1394framerate_t  framerate;  dc1394switch_t     is_iso_on;  int                iso_channel; // this variable contains the iso channel requests or the current iso channel  int                iso_channel_is_set; // >0 if the iso_channel above has been allocated within libraw1394  uint_t             iso_bandwidth;  dc1394speed_t      iso_speed;  uint_t             mem_channel_number;  uint_t             save_channel;  uint_t             load_channel;  int                capture_is_set; // 0 for not set, 1 for RAW1394 and 2 for DMA  // for broadcast:  dc1394bool_t       broadcast;  nodeid_t           node_id_backup;} dc1394camera_t;typedef struct __dc1394feature_info_t_struct {  dc1394feature_t    id;  dc1394bool_t       available;  dc1394bool_t       one_push;  dc1394bool_t       absolute_capable;  dc1394bool_t       readout_capable;  dc1394bool_t       on_off_capable;  dc1394bool_t       auto_capable;  dc1394bool_t       manual_capable;  dc1394bool_t       polarity_capable;  dc1394switch_t     one_push_active;  dc1394switch_t     is_on;  dc1394bool_t       auto_active;  dc1394trigger_modes_t    trigger_modes;  dc1394trigger_mode_t     trigger_mode;  dc1394trigger_polarity_t trigger_polarity;  dc1394trigger_sources_t  trigger_sources;  dc1394trigger_source_t   trigger_source;  uint_t             min;  uint_t             max;  uint_t             value;  uint_t             BU_value;  uint_t             RV_value;  uint_t             B_value;  uint_t             R_value;  uint_t             G_value;  uint_t             target_value;    dc1394switch_t     abs_control;  float              abs_value;  float              abs_max;  float              abs_min;  } dc1394feature_info_t;typedef struct __dc1394featureset_t{  dc1394feature_info_t    feature[DC1394_FEATURE_NUM];} dc1394featureset_t;typedef struct __dc1394format7mode_t{  dc1394bool_t present;  unsigned int size_x;  unsigned int size_y;  unsigned int max_size_x;  unsigned int max_size_y;  unsigned int pos_x;  unsigned int pos_y;  unsigned int unit_size_x;  unsigned int unit_size_y;  unsigned int unit_pos_x;  unsigned int unit_pos_y;  dc1394color_codings_t color_codings;  dc1394color_coding_t color_coding;  unsigned int pixnum;  unsigned int bpp; // bpp is byte_per_packet, not bit per pixel.  unsigned int min_bpp;  unsigned int max_bpp;  unsigned long long int total_bytes;  dc1394color_filter_t color_filter;} dc1394format7mode_t;typedef struct __dc1394format7modeset_t{  dc1394format7mode_t mode[DC1394_VIDEO_MODE_FORMAT7_NUM];} dc1394format7modeset_t;/* Feature descriptions */extern const char *dc1394_feature_desc[DC1394_FEATURE_NUM];extern const char *dc1394_error_strings[DC1394_ERROR_NUM];/* Error checking function. displays an error string on stderr and exit current function   if error is positive. Neg errors are messages and are thus ignored */#define DC1394_WRN(err, err_string...)                       \    {                                                        \    if ((err<0)||(err>DC1394_ERROR_NUM))                     \      err=DC1394_INVALID_ERROR_CODE;                         \                                                             \    if (err>DC1394_SUCCESS) {                                \      fprintf(stderr,"Libdc1394 warning (%s:%s:%d): %s : ",  \	      __FILE__, __FUNCTION__, __LINE__,              \	      dc1394_error_strings[err]);                    \      fprintf(stderr, err_string);                           \      fprintf(stderr,"\n");                                  \    }                                                        \    }#define DC1394_ERR(err, err_string...)                       \    {                                                        \    if ((err<0)||(err>DC1394_ERROR_NUM))                     \      err=DC1394_INVALID_ERROR_CODE;                         \                                                             \    if (err>DC1394_SUCCESS) {                                \      fprintf(stderr,"Libdc1394 error (%s:%s:%d): %s : ",    \	      __FILE__, __FUNCTION__, __LINE__,              \	      dc1394_error_strings[err]);                    \      fprintf(stderr, err_string);                           \      fprintf(stderr,"\n");                                  \      return;                                                \    }                                                        \    }#define DC1394_ERR_RTN(err, err_string...)                   \    {                                                        \    if ((err<0)||(err>DC1394_ERROR_NUM))                     \      err=DC1394_INVALID_ERROR_CODE;                         \                                                             \

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -