forked from AravisProject/aravis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharvcamera.h
223 lines (172 loc) · 12.9 KB
/
arvcamera.h
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
/* Aravis - Digital camera library
*
* Copyright © 2009-2019 Emmanuel Pacaud
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* Author: Emmanuel Pacaud <[email protected]>
*/
#ifndef ARV_CAMERA_H
#define ARV_CAMERA_H
#if !defined (ARV_H_INSIDE) && !defined (ARAVIS_COMPILATION)
#error "Only <arv.h> can be included directly."
#endif
#include <arvapi.h>
#include <arvtypes.h>
#include <arvstream.h>
#include <arvgvstream.h>
#include <arvgvdevice.h>
#if ARAVIS_HAS_USB
#include <arvuvdevice.h>
#endif
G_BEGIN_DECLS
#define ARV_TYPE_CAMERA (arv_camera_get_type ())
ARV_API G_DECLARE_DERIVABLE_TYPE (ArvCamera, arv_camera, ARV, CAMERA, GObject)
struct _ArvCameraClass {
GObjectClass parent_class;
};
ARV_API ArvCamera * arv_camera_new (const char *name, GError **error);
ARV_API ArvCamera * arv_camera_new_with_device (ArvDevice *device, GError **error);
ARV_API ArvDevice * arv_camera_get_device (ArvCamera *camera);
ARV_API ArvStream * arv_camera_create_stream (ArvCamera *camera, ArvStreamCallback callback, void *user_data, GError **error);
/* Device informations */
ARV_API const char * arv_camera_get_vendor_name (ArvCamera *camera, GError **error);
ARV_API const char * arv_camera_get_model_name (ArvCamera *camera, GError **error);
ARV_API const char * arv_camera_get_device_serial_number (ArvCamera *camera, GError **error);
ARV_API const char * arv_camera_get_device_id (ArvCamera *camera, GError **error);
/* Image format control */
ARV_API void arv_camera_get_sensor_size (ArvCamera *camera, gint *width, gint *height, GError **error);
ARV_API void arv_camera_set_region (ArvCamera *camera, gint x, gint y, gint width, gint height, GError **error);
ARV_API void arv_camera_get_region (ArvCamera *camera, gint *x, gint *y, gint *width, gint *height, GError **error);
ARV_API void arv_camera_get_x_offset_bounds (ArvCamera *camera, gint *min, gint *max, GError **error);
ARV_API gint arv_camera_get_x_offset_increment (ArvCamera *camera, GError **error);
ARV_API void arv_camera_get_y_offset_bounds (ArvCamera *camera, gint *min, gint *max, GError **error);
ARV_API gint arv_camera_get_y_offset_increment (ArvCamera *camera, GError **error);
ARV_API void arv_camera_get_width_bounds (ArvCamera *camera, gint *min, gint *max, GError **error);
ARV_API gint arv_camera_get_width_increment (ArvCamera *camera, GError **error);
ARV_API void arv_camera_get_height_bounds (ArvCamera *camera, gint *min, gint *max, GError **error);
ARV_API gint arv_camera_get_height_increment (ArvCamera *camera, GError **error);
ARV_API void arv_camera_set_binning (ArvCamera *camera, gint dx, gint dy, GError **error);
ARV_API void arv_camera_get_binning (ArvCamera *camera, gint *dx, gint *dy, GError **error);
ARV_API void arv_camera_get_x_binning_bounds (ArvCamera *camera, gint *min, gint *max, GError **error);
ARV_API gint arv_camera_get_x_binning_increment (ArvCamera *camera, GError **error);
ARV_API void arv_camera_get_y_binning_bounds (ArvCamera *camera, gint *min, gint *max, GError **error);
ARV_API gint arv_camera_get_y_binning_increment (ArvCamera *camera, GError **error);
ARV_API gboolean arv_camera_is_binning_available (ArvCamera *camera, GError **error);
ARV_API void arv_camera_set_pixel_format (ArvCamera *camera, ArvPixelFormat format, GError **error);
ARV_API void arv_camera_set_pixel_format_from_string (ArvCamera *camera, const char * format, GError **error);
ARV_API ArvPixelFormat arv_camera_get_pixel_format (ArvCamera *camera, GError **error);
ARV_API const char * arv_camera_get_pixel_format_as_string (ArvCamera *camera, GError **error);
ARV_API gint64 * arv_camera_dup_available_pixel_formats (ArvCamera *camera, guint *n_pixel_formats, GError **error);
ARV_API const char ** arv_camera_dup_available_pixel_formats_as_strings (ArvCamera *camera, guint *n_pixel_formats, GError **error);
ARV_API const char ** arv_camera_dup_available_pixel_formats_as_display_names (ArvCamera *camera, guint *n_pixel_formats, GError **error);
/* Acquisition control */
ARV_API void arv_camera_start_acquisition (ArvCamera *camera, GError **error);
ARV_API void arv_camera_stop_acquisition (ArvCamera *camera, GError **error);
ARV_API void arv_camera_abort_acquisition (ArvCamera *camera, GError **error);
ARV_API ArvBuffer * arv_camera_acquisition (ArvCamera *camera, guint64 timeout, GError **error);
ARV_API void arv_camera_set_acquisition_mode (ArvCamera *camera, ArvAcquisitionMode value, GError **error);
ARV_API ArvAcquisitionMode arv_camera_get_acquisition_mode (ArvCamera *camera, GError **error);
ARV_API void arv_camera_set_frame_count (ArvCamera *camera, gint64 frame_count, GError **error);
ARV_API gint64 arv_camera_get_frame_count (ArvCamera *camera, GError **error);
ARV_API void arv_camera_get_frame_count_bounds (ArvCamera *camera, gint64 *min, gint64 *max, GError **error);
ARV_API gboolean arv_camera_is_frame_rate_available (ArvCamera *camera, GError **error);
ARV_API void arv_camera_set_frame_rate (ArvCamera *camera, double frame_rate, GError **error);
ARV_API double arv_camera_get_frame_rate (ArvCamera *camera, GError **error);
ARV_API void arv_camera_get_frame_rate_bounds (ArvCamera *camera, double *min, double *max, GError **error);
ARV_API void arv_camera_set_trigger (ArvCamera *camera, const char *source, GError **error);
ARV_API void arv_camera_set_trigger_source (ArvCamera *camera, const char *source, GError **error);
ARV_API const char * arv_camera_get_trigger_source (ArvCamera *camera, GError **error);
ARV_API const char ** arv_camera_dup_available_trigger_sources(ArvCamera *camera, guint *n_sources, GError **error);
ARV_API const char ** arv_camera_dup_available_triggers (ArvCamera *camera, guint *n_triggers, GError **error);
ARV_API void arv_camera_clear_triggers (ArvCamera *camera, GError **error);
ARV_API gboolean arv_camera_is_software_trigger_supported(ArvCamera *camera, GError **error);
ARV_API void arv_camera_software_trigger (ArvCamera *camera, GError **error);
ARV_API gboolean arv_camera_is_exposure_time_available (ArvCamera *camera, GError **error);
ARV_API gboolean arv_camera_is_exposure_auto_available (ArvCamera *camera, GError **error);
ARV_API void arv_camera_set_exposure_time (ArvCamera *camera, double exposure_time_us, GError **error);
ARV_API double arv_camera_get_exposure_time (ArvCamera *camera, GError **error);
ARV_API void arv_camera_get_exposure_time_bounds (ArvCamera *camera, double *min, double *max, GError **error);
ARV_API void arv_camera_set_exposure_time_auto (ArvCamera *camera, ArvAuto auto_mode, GError **error);
ARV_API ArvAuto arv_camera_get_exposure_time_auto (ArvCamera *camera, GError **error);
ARV_API void arv_camera_set_exposure_mode (ArvCamera *camera, ArvExposureMode mode, GError **error);
/* Analog control */
ARV_API gboolean arv_camera_is_gain_available (ArvCamera *camera, GError **error);
ARV_API gboolean arv_camera_is_gain_auto_available (ArvCamera *camera, GError **error);
ARV_API void arv_camera_set_gain (ArvCamera *camera, double gain, GError **error);
ARV_API double arv_camera_get_gain (ArvCamera *camera, GError **error);
ARV_API void arv_camera_get_gain_bounds (ArvCamera *camera, double *min, double *max, GError **error);
ARV_API void arv_camera_set_gain_auto (ArvCamera *camera, ArvAuto auto_mode, GError **error);
ARV_API ArvAuto arv_camera_get_gain_auto (ArvCamera *camera, GError **error);
/* Transport layer control */
ARV_API guint arv_camera_get_payload (ArvCamera *camera, GError **error);
/* Generic feature control */
ARV_API void arv_camera_execute_command (ArvCamera *camera, const char *feature, GError **error);
ARV_API void arv_camera_set_boolean (ArvCamera *camera, const char *feature, gboolean value, GError **error);
ARV_API gboolean arv_camera_get_boolean (ArvCamera *camera, const char *feature, GError **error);
ARV_API void arv_camera_get_boolean_gi (ArvCamera *camera, const char *feature, gboolean *value, GError **error);
ARV_API void arv_camera_set_string (ArvCamera *camera, const char *feature, const char *value, GError **error);
ARV_API const char * arv_camera_get_string (ArvCamera *camera, const char *feature, GError **error);
ARV_API void arv_camera_set_integer (ArvCamera *camera, const char *feature, gint64 value, GError **error);
ARV_API gint64 arv_camera_get_integer (ArvCamera *camera, const char *feature, GError **error);
ARV_API void arv_camera_get_integer_bounds (ArvCamera *camera, const char *feature, gint64 *min, gint64 *max, GError **error);
ARV_API gint64 arv_camera_get_integer_increment (ArvCamera *camera, const char *feature, GError **error);
ARV_API void arv_camera_set_float (ArvCamera *camera, const char *feature, double value, GError **error);
ARV_API double arv_camera_get_float (ArvCamera *camera, const char *feature, GError **error);
ARV_API void arv_camera_get_float_bounds (ArvCamera *camera, const char *feature, double *min, double *max, GError **error);
ARV_API double arv_camera_get_float_increment (ArvCamera *camera, const char *feature, GError **error);
ARV_API gint64 * arv_camera_dup_available_enumerations (ArvCamera *camera, const char *feature,
guint *n_values, GError **error);
ARV_API const char ** arv_camera_dup_available_enumerations_as_strings (ArvCamera *camera, const char *feature,
guint *n_values, GError **error);
ARV_API const char ** arv_camera_dup_available_enumerations_as_display_names (ArvCamera *camera, const char *feature,
guint *n_values, GError **error);
ARV_API gboolean arv_camera_is_enumeration_entry_available (ArvCamera *camera, const char *feature,
const char *entry, GError **error);
ARV_API gboolean arv_camera_is_feature_available (ArvCamera *camera, const char *feature, GError **error);
/* Runtime policies */
ARV_API void arv_camera_set_register_cache_policy (ArvCamera *camera, ArvRegisterCachePolicy policy);
ARV_API void arv_camera_set_range_check_policy (ArvCamera *camera, ArvRangeCheckPolicy policy);
/* GigEVision specific API */
ARV_API gboolean arv_camera_is_gv_device (ArvCamera *camera);
ARV_API gint arv_camera_gv_get_n_stream_channels (ArvCamera *camera, GError **error);
ARV_API void arv_camera_gv_select_stream_channel (ArvCamera *camera, gint channel_id, GError **error);
ARV_API int arv_camera_gv_get_current_stream_channel (ArvCamera *camera, GError **error);
ARV_API void arv_camera_gv_set_packet_delay (ArvCamera *camera, gint64 delay_ns, GError **error);
ARV_API gint64 arv_camera_gv_get_packet_delay (ArvCamera *camera, GError **error);
ARV_API void arv_camera_gv_set_packet_size (ArvCamera *camera, gint packet_size, GError **error);
ARV_API guint arv_camera_gv_get_packet_size (ArvCamera *camera, GError **error);
ARV_API guint arv_camera_gv_auto_packet_size (ArvCamera *camera, GError **error);
ARV_API void arv_camera_gv_set_packet_size_adjustment (ArvCamera *camera,
ArvGvPacketSizeAdjustment adjustment);
ARV_API void arv_camera_gv_set_stream_options (ArvCamera *camera, ArvGvStreamOption options);
/* USB3Vision specific API */
ARV_API gboolean arv_camera_is_uv_device (ArvCamera *camera);
ARV_API gboolean arv_camera_uv_is_bandwidth_control_available (ArvCamera *camera, GError **error);
ARV_API void arv_camera_uv_set_bandwidth (ArvCamera *camera, guint bandwidth, GError **error);
ARV_API guint arv_camera_uv_get_bandwidth (ArvCamera *camera, GError **error);
ARV_API void arv_camera_uv_get_bandwidth_bounds (ArvCamera *camera, guint *min, guint *max, GError **error);
ARV_API void arv_camera_uv_set_usb_mode (ArvCamera *camera, ArvUvUsbMode usb_mode);
/* Chunk data */
ARV_API gboolean arv_camera_are_chunks_available (ArvCamera *camera, GError **error);
ARV_API void arv_camera_set_chunk_mode (ArvCamera *camera, gboolean is_active, GError **error);
ARV_API gboolean arv_camera_get_chunk_mode (ArvCamera *camera, GError **error);
ARV_API void arv_camera_set_chunk_state (ArvCamera *camera, const char *chunk, gboolean is_enabled, GError **error);
ARV_API gboolean arv_camera_get_chunk_state (ArvCamera *camera, const char *chunk, GError **error);
ARV_API void arv_camera_set_chunks (ArvCamera *camera, const char *chunk_list, GError **error);
ARV_API ArvChunkParser * arv_camera_create_chunk_parser (ArvCamera *camera);
G_END_DECLS
#endif