/usr/include/gpiv/gpiv-cam.h is in libgpiv3-dev 0.6.1-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
/*-----------------------------------------------------------------------------
libgpiv - library for Particle Image Velocimetry
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Gerber van der Graaf
<gerber_graaf@users.sourceforge.net>
This file is part of libgpiv.
Libgpiv is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-------------------------------------------------------------------------------
LIBRARY: libgpiv
FILENAME: cam.h
SOURCE: cam.c
EXTERNAL FUNCTIONS:
gpiv_cam_get_camvar
gpiv_cam_free_camvar
gpiv_cam_default_parameters
gpiv_cam_read_parameters
gpiv_cam_check_parameters_read
gpiv_cam_parameters_set
gpiv_cam_test_parameter
gpiv_cam_fprint_parameters
---------------------------------------------------------------------------- */
/*!
\file gpiv-cam.h
\brief module for IEEE1394 camera control
SOURCES: lib/cam.c, cam_par.c
LAST MODIFICATION DATE: $Id: gpiv-cam.h,v 1.2 2008-04-09 06:10:27 gerber Exp $
*/
#ifndef __LIBGPIV_CAM_H__
#define __LIBGPIV_CAM_H__
/*
* Default values of CamPar
*/
#define GPIV_CAMPAR_DEFAULT__MODE 1 /**< Default camera mode */
#define GPIV_CAMPAR_DEFAULT__CYCLES 1 /**< Default number of cycles */
#define GPIV_CAMPAR_DEFAULT__FNAME "gpiv_img" /**< Default output image name */
#define GPIV_CAMPAR_CYCLES_MIN 1 /**< */
#define GPIV_CAMPAR_CYCLES_MAX 1 /**< */
/*
* Keys of CamPar to read values from configuration files
*/
#define GPIV_CAMPAR_KEY "CAM" /**< Key of camera parameters */
#define GPIV_CAMPAR_KEY__MODE "Mode" /**< Parameter key for camera mode */
#define GPIV_CAMPAR_KEY__CYCLES "Cycles" /**< Parameter key for number of cycles */
#define GPIV_CAMPAR_KEY__FNAME "Fname" /**< Parameter key for output image name */
#define GPIV_CAMPAR_CYCLES_MIN 1
#define GPIV_CAMPAR_CYCLES_MAX 1
/**
* Camera modes
*/
enum GpivCamMode {
GPIV_CAM_MODE__PERIODIC = 1,/**< periodic */
GPIV_CAM_MODE__DURATION, /**< continuoulsy */
GPIV_CAM_MODE__ONE_SHOT_IRQ,/**< single image pair */
GPIV_CAM_MODE__TRIGGER_IRQ, /**< on wxternal trigger signals */
GPIV_CAM_MODE__INCREMENT, /**< ? */
GPIV_CAM_MODE__DOUBLE, /**< ? */
};
typedef struct __GpivCamPar GpivCamPar;
/*!
* \brief Parameters for camera settings
*
* The parameters might be loaded from the configuration resources,
* with gpiv_scan_resourcefiles() or with gpiv_scan_parameter().
*/
struct __GpivCamPar {
enum GpivCamMode mode; /**< operating mode (indefinite/interrupt/definite) */
guint cycles; /**< If GpivTrigPar not used. Number of cycles (equal to number of images to be recorded?) */
gchar fname[GPIV_MAX_CHARS];/**< image file name */
gboolean mode__set; /**< flag if mode has been defined */
gboolean cycles__set; /**< flag if cycles has been defined */
gboolean fname__set; /**< flag if fname has been defined */
};
typedef struct __GpivCamVar GpivCamVar;
/*!
* \brief Camera variables
*
* These variables are determined by the camera when connecting to the appliacation.
*/
struct __GpivCamVar {
guint numNodes; /**< number of nodes available */
guint numCameras; /**< number of cameras available */
guint maxspeed; /**< maximum frame rate speed */
guint port; /**< port number */
raw1394handle_t handle; /**< handle */
nodeid_t *camera_nodes; /**< camera node */
dc1394_cameracapture *capture;
dc1394_camerainfo *camera;
dc1394_feature_info *feature_info;
dc1394_feature_set *feature_set;
dc1394_miscinfo *misc_info;
};
/**
* Get varaiables of connected cameras using firewire
*
* @param[in] verbose prints camera info to stdout
* @return GpivCamVar or NULL on failure
*/
GpivCamVar *
gpiv_cam_get_camvar (const gboolean verbose
);
/**
* Free memory variables of connected cameras using firewire
*
* @param[out] cam_var structure of camera variables
* @return NULL on success or error message on failure
*/
gchar *
gpiv_cam_free_camvar (GpivCamVar *cam_var
);
/**
* Sets default GpivCamPar parameter values
*
* @param[out] cam_par_default structure of camera parameters
* @param[out] force forces to set to default, even if already defined
* @return NULL on success or error message on failure
*/
void
gpiv_cam_default_parameters (GpivCamPar *cam_par_default,
const gboolean force
);
/**
* Read all GpivCamPar parameters
*
* @param[in] fp_par file pointer to parameter file
* @param[in] verbose flag to print parametrs to stdout
* @param[out] cam_par parameters of camera parameters
* @return void
*/
void
gpiv_cam_read_parameters (FILE *fp_par,
GpivCamPar *cam_par,
const gboolean verbose
);
/**
* Checks if all GpivCamPar parameters have been read.
* If a parameter has not been read, it will be set to *cam_par_default or to
* its hard-coded default value in case *cam_par_default is NULL.
*
* @param[in] cam_par_default default parameters. If NULL, library
* default values are used
* @param[out] cam_par parameters of camera parameters
* @return NULL on success or error message on failure
*/
gchar *
gpiv_cam_check_parameters_read (GpivCamPar *cam_par,
const GpivCamPar *cam_par_default
);
/**
* Sets flags for __set variables of GpivCamPar
*
* @param[in] flag flag representing __set value
* @param[out] cam_par parameters for recording images
* @return void
*/
void
gpiv_cam_parameters__set (GpivCamPar *cam_par,
const gboolean flag
);
/**
* Testing GpivCamPar parameters on valid values and initializing derived
* variables
*
* @param[in] cam_par parameters for camera
* @return NULL on success or error message on failure
*/
gchar *
gpiv_cam_test_parameter (const GpivCamPar *cam_par
);
/**
* Prints GpivCamPar parameters to fp_par_out
*
* @param[in] fp_par_out output file
* @param[in] cam_par parameters for camera
* @return void
*/
void
gpiv_cam_print_parameters (FILE *fp_par_out,
const GpivCamPar *cam_par
);
#endif /*__LIBGPIV_CAM_H__ */
|