[aravis] camera: integration of RICOH camera
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] camera: integration of RICOH camera
- Date: Tue, 6 Oct 2015 08:50:47 +0000 (UTC)
commit fc1b622f2c31a006b5203a3a19fd8750324fe083
Author: Anil <anil r castalialabs com>
Date: Fri Sep 18 12:40:54 2015 +0530
camera: integration of RICOH camera
src/arvcamera.c | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/src/arvcamera.c b/src/arvcamera.c
index a3635a5..57d99c9 100644
--- a/src/arvcamera.c
+++ b/src/arvcamera.c
@@ -67,7 +67,8 @@ typedef enum {
ARV_CAMERA_VENDOR_DALSA,
ARV_CAMERA_VENDOR_PROSILICA,
ARV_CAMERA_VENDOR_TIS,
- ARV_CAMERA_VENDOR_POINT_GREY
+ ARV_CAMERA_VENDOR_POINT_GREY,
+ ARV_CAMERA_VENDOR_RICOH
} ArvCameraVendor;
typedef enum {
@@ -78,7 +79,8 @@ typedef enum {
ARV_CAMERA_SERIES_DALSA,
ARV_CAMERA_SERIES_PROSILICA,
ARV_CAMERA_SERIES_TIS,
- ARV_CAMERA_SERIES_POINT_GREY
+ ARV_CAMERA_SERIES_POINT_GREY,
+ ARV_CAMERA_SERIES_RICOH
} ArvCameraSeries;
static GObjectClass *parent_class = NULL;
@@ -695,6 +697,7 @@ arv_camera_set_frame_rate (ArvCamera *camera, double frame_rate)
arv_device_set_float_feature_value (camera->priv->device, "AcquisitionFrameRate",
frame_rate);
break;
case ARV_CAMERA_VENDOR_DALSA:
+ case ARV_CAMERA_VENDOR_RICOH:
case ARV_CAMERA_VENDOR_UNKNOWN:
arv_device_set_string_feature_value (camera->priv->device, "TriggerSelector",
"FrameStart");
arv_device_set_string_feature_value (camera->priv->device, "TriggerMode", "Off");
@@ -741,6 +744,7 @@ arv_camera_get_frame_rate (ArvCamera *camera)
return arv_device_get_float_feature_value (camera->priv->device, "FPS");
case ARV_CAMERA_VENDOR_POINT_GREY:
case ARV_CAMERA_VENDOR_DALSA:
+ case ARV_CAMERA_VENDOR_RICOH:
case ARV_CAMERA_VENDOR_UNKNOWN:
return arv_device_get_float_feature_value (camera->priv->device,
camera->priv->use_acquisition_frame_rate_abs ?
@@ -806,6 +810,7 @@ arv_camera_get_frame_rate_bounds (ArvCamera *camera, double *min, double *max)
break;
case ARV_CAMERA_VENDOR_POINT_GREY:
case ARV_CAMERA_VENDOR_DALSA:
+ case ARV_CAMERA_VENDOR_RICOH:
case ARV_CAMERA_VENDOR_UNKNOWN:
arv_device_get_float_feature_bounds (camera->priv->device,
camera->priv->use_exposure_time_abs ?
@@ -939,6 +944,10 @@ arv_camera_set_exposure_time (ArvCamera *camera, double exposure_time_us)
exposure_time_us);
arv_device_set_integer_feature_value (camera->priv->device, "ExposureTimeRaw", 1);
break;
+ case ARV_CAMERA_SERIES_RICOH:
+ arv_device_set_integer_feature_value (camera->priv->device, "ExposureTimeRaw",
+ exposure_time_us);
+ break;
case ARV_CAMERA_SERIES_BASLER_ACE:
default:
arv_device_set_float_feature_value (camera->priv->device,
@@ -962,11 +971,16 @@ double
arv_camera_get_exposure_time (ArvCamera *camera)
{
g_return_val_if_fail (ARV_IS_CAMERA (camera), 0.0);
-
- return arv_device_get_float_feature_value (camera->priv->device,
+
+ switch (camera->priv->series) {
+ case ARV_CAMERA_SERIES_RICOH:
+ return arv_device_get_integer_feature_value (camera->priv->device,"ExposureTimeRaw");
+ default:
+ return arv_device_get_float_feature_value (camera->priv->device,
camera->priv->use_exposure_time_abs ?
"ExposureTimeAbs" :
"ExposureTime");
+ }
}
/**
@@ -1221,6 +1235,7 @@ arv_camera_is_frame_rate_available (ArvCamera *camera)
return arv_device_get_feature (camera->priv->device, "FPS") != NULL;
case ARV_CAMERA_VENDOR_POINT_GREY:
case ARV_CAMERA_VENDOR_DALSA:
+ case ARV_CAMERA_VENDOR_RICOH:
case ARV_CAMERA_VENDOR_UNKNOWN:
return arv_device_get_feature (camera->priv->device,
camera->priv->use_acquisition_frame_rate_abs ?
@@ -1721,6 +1736,9 @@ arv_camera_constructor (GType gtype, guint n_properties, GObjectConstructParam *
} else if (g_strcmp0 (vendor_name, "Point Grey Research") == 0) {
vendor = ARV_CAMERA_VENDOR_POINT_GREY;
series = ARV_CAMERA_SERIES_POINT_GREY;
+ } else if (g_strcmp0 (vendor_name, "Ricoh Company, Ltd.") == 0) {
+ vendor = ARV_CAMERA_VENDOR_RICOH;
+ series = ARV_CAMERA_SERIES_RICOH;
} else {
vendor = ARV_CAMERA_VENDOR_UNKNOWN;
series = ARV_CAMERA_SERIES_UNKNOWN;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]