summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2014-09-10 11:09:39 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2014-09-10 11:09:39 +0200
commit499a4716e19b115d68c39385a87f9bbe4b44bb4e (patch)
tree7d759e2332d3df0f9d3c8d0392fea28498269b5b
parentd4a7a6b344d89ba36963cfca60db5586b4597855 (diff)
downloaduca-499a4716e19b115d68c39385a87f9bbe4b44bb4e.tar.gz
uca-499a4716e19b115d68c39385a87f9bbe4b44bb4e.tar.bz2
uca-499a4716e19b115d68c39385a87f9bbe4b44bb4e.tar.xz
uca-499a4716e19b115d68c39385a87f9bbe4b44bb4e.zip
Fix #54: remove sensor-max-frame-rate
-rw-r--r--plugins/file/uca-file-camera.c4
-rw-r--r--plugins/mock/uca-mock-camera.c19
-rw-r--r--plugins/pco/uca-pco-camera.c5
-rw-r--r--plugins/xkit/uca-xkit-camera.c4
-rw-r--r--src/uca-camera.c27
-rw-r--r--src/uca-camera.h1
6 files changed, 4 insertions, 56 deletions
diff --git a/plugins/file/uca-file-camera.c b/plugins/file/uca-file-camera.c
index 5f7414c..5c7b5cb 100644
--- a/plugins/file/uca-file-camera.c
+++ b/plugins/file/uca-file-camera.c
@@ -39,7 +39,6 @@ static const gint file_overrideables[] = {
PROP_SENSOR_WIDTH,
PROP_SENSOR_HEIGHT,
PROP_SENSOR_BITDEPTH,
- PROP_SENSOR_MAX_FRAME_RATE,
PROP_EXPOSURE_TIME,
PROP_ROI_X,
PROP_ROI_Y,
@@ -237,9 +236,6 @@ uca_file_camera_get_property(GObject *object, guint property_id, GValue *value,
case PROP_SENSOR_BITDEPTH:
g_value_set_uint (value, priv->bitdepth);
break;
- case PROP_SENSOR_MAX_FRAME_RATE:
- g_value_set_float (value, 100.0f);
- break;
case PROP_ROI_X:
g_value_set_uint (value, 0);
break;
diff --git a/plugins/mock/uca-mock-camera.c b/plugins/mock/uca-mock-camera.c
index 4ae4077..e4fb872 100644
--- a/plugins/mock/uca-mock-camera.c
+++ b/plugins/mock/uca-mock-camera.c
@@ -44,7 +44,6 @@ static const gint mock_overrideables[] = {
PROP_ROI_Y,
PROP_ROI_WIDTH,
PROP_ROI_HEIGHT,
- PROP_SENSOR_MAX_FRAME_RATE,
PROP_HAS_STREAMING,
PROP_HAS_CAMRAM_RECORDING,
0,
@@ -293,20 +292,7 @@ uca_mock_camera_set_property (GObject *object, guint property_id, const GValue *
switch (property_id) {
case PROP_EXPOSURE_TIME:
- {
- gdouble exp_t;
- exp_t = g_value_get_double(value);
-
- gfloat max_framerate;
- g_object_get (object, "sensor-max-frame-rate", &max_framerate, NULL);
-
- gdouble min_exposure_time = 1. / max_framerate;
-
- if (exp_t < min_exposure_time)
- exp_t = min_exposure_time;
-
- priv->exposure_time = exp_t;
- }
+ priv->exposure_time = g_value_get_double (value);
break;
case PROP_ROI_X:
priv->roi_x = g_value_get_uint(value);
@@ -359,9 +345,6 @@ uca_mock_camera_get_property(GObject *object, guint property_id, GValue *value,
case PROP_ROI_HEIGHT:
g_value_set_uint(value, priv->roi_height);
break;
- case PROP_SENSOR_MAX_FRAME_RATE:
- g_value_set_float(value, priv->max_frame_rate);
- break;
case PROP_HAS_STREAMING:
g_value_set_boolean(value, TRUE);
break;
diff --git a/plugins/pco/uca-pco-camera.c b/plugins/pco/uca-pco-camera.c
index 71b973c..07f8115 100644
--- a/plugins/pco/uca-pco-camera.c
+++ b/plugins/pco/uca-pco-camera.c
@@ -150,7 +150,6 @@ static gint base_overrideables[] = {
PROP_SENSOR_HORIZONTAL_BINNINGS,
PROP_SENSOR_VERTICAL_BINNING,
PROP_SENSOR_VERTICAL_BINNINGS,
- PROP_SENSOR_MAX_FRAME_RATE,
PROP_EXPOSURE_TIME,
PROP_FRAMES_PER_SECOND,
PROP_TRIGGER_MODE,
@@ -1025,10 +1024,6 @@ uca_pco_camera_get_property (GObject *object, guint property_id, GValue *value,
g_value_set_boxed(value, priv->vertical_binnings);
break;
- case PROP_SENSOR_MAX_FRAME_RATE:
- g_value_set_float(value, priv->description->max_frame_rate);
- break;
-
case PROP_SENSOR_BITDEPTH:
switch (priv->description->type) {
case CAMERATYPE_PCO4000:
diff --git a/plugins/xkit/uca-xkit-camera.c b/plugins/xkit/uca-xkit-camera.c
index 2386dff..a3c6f64 100644
--- a/plugins/xkit/uca-xkit-camera.c
+++ b/plugins/xkit/uca-xkit-camera.c
@@ -71,7 +71,6 @@ static gint base_overrideables[] = {
PROP_NAME,
PROP_SENSOR_WIDTH,
PROP_SENSOR_HEIGHT,
- PROP_SENSOR_MAX_FRAME_RATE,
PROP_SENSOR_BITDEPTH,
PROP_EXPOSURE_TIME,
PROP_ROI_X,
@@ -419,9 +418,6 @@ uca_xkit_camera_get_property (GObject *object,
case PROP_NAME:
g_value_set_string (value, "xkit");
break;
- case PROP_SENSOR_MAX_FRAME_RATE:
- g_value_set_float (value, 150.0f);
- break;
case PROP_SENSOR_WIDTH:
g_value_set_uint (value, CHIPS_PER_ROW * MEDIPIX_SENSOR_SIZE);
break;
diff --git a/src/uca-camera.c b/src/uca-camera.c
index fce3d12..fbd251f 100644
--- a/src/uca-camera.c
+++ b/src/uca-camera.c
@@ -101,7 +101,6 @@ const gchar *uca_camera_props[N_BASE_PROPERTIES] = {
"sensor-horizontal-binnings",
"sensor-vertical-binning",
"sensor-vertical-binnings",
- "sensor-max-frame-rate",
"trigger-mode",
"exposure-time",
"frames-per-second",
@@ -169,13 +168,6 @@ uca_camera_set_property (GObject *object, guint property_id, const GValue *value
{
gdouble frames_per_second;
frames_per_second = g_value_get_double (value);
-
- gfloat max_framerate;
- g_object_get (object, "sensor-max-frame-rate", &max_framerate, NULL);
-
- if (max_framerate < frames_per_second)
- frames_per_second = max_framerate;
-
g_object_set (object, "exposure-time", 1. / frames_per_second, NULL);
}
break;
@@ -224,16 +216,11 @@ uca_camera_get_property(GObject *object, guint property_id, GValue *value, GPara
gdouble exposure_time;
g_object_get (object, "exposure-time", &exposure_time, NULL);
- if (exposure_time > 0)
- {
+
+ if (exposure_time > 0.0)
g_value_set_double (value, 1. / exposure_time);
- }
else
- {
- gfloat max_framerate;
- g_object_get (object, "sensor-max-frame-rate", &max_framerate, NULL);
- g_value_set_double (value, max_framerate);
- }
+ g_warning ("Invalid `::exposure-time' set");
}
break;
@@ -424,13 +411,6 @@ uca_camera_class_init (UcaCameraClass *klass)
1, G_MAXUINT, 1,
G_PARAM_READABLE), G_PARAM_READABLE);
- camera_properties[PROP_SENSOR_MAX_FRAME_RATE] =
- g_param_spec_float(uca_camera_props[PROP_SENSOR_MAX_FRAME_RATE],
- "Maximum frame rate",
- "Maximum frame rate at full frame resolution",
- 0.0f, G_MAXFLOAT, 1.0f,
- G_PARAM_READABLE);
-
camera_properties[PROP_TRIGGER_MODE] =
g_param_spec_enum("trigger-mode",
"Trigger mode",
@@ -587,7 +567,6 @@ uca_camera_init (UcaCamera *camera)
uca_camera_set_property_unit (camera_properties[PROP_SENSOR_BITDEPTH], UCA_UNIT_COUNT);
uca_camera_set_property_unit (camera_properties[PROP_SENSOR_HORIZONTAL_BINNING], UCA_UNIT_PIXEL);
uca_camera_set_property_unit (camera_properties[PROP_SENSOR_VERTICAL_BINNING], UCA_UNIT_PIXEL);
- uca_camera_set_property_unit (camera_properties[PROP_SENSOR_MAX_FRAME_RATE], UCA_UNIT_COUNT);
uca_camera_set_property_unit (camera_properties[PROP_EXPOSURE_TIME], UCA_UNIT_SECOND);
uca_camera_set_property_unit (camera_properties[PROP_FRAMES_PER_SECOND], UCA_UNIT_COUNT);
uca_camera_set_property_unit (camera_properties[PROP_ROI_X], UCA_UNIT_PIXEL);
diff --git a/src/uca-camera.h b/src/uca-camera.h
index d958870..62a6c89 100644
--- a/src/uca-camera.h
+++ b/src/uca-camera.h
@@ -77,7 +77,6 @@ enum {
PROP_SENSOR_HORIZONTAL_BINNINGS,
PROP_SENSOR_VERTICAL_BINNING,
PROP_SENSOR_VERTICAL_BINNINGS,
- PROP_SENSOR_MAX_FRAME_RATE,
PROP_TRIGGER_MODE,
PROP_EXPOSURE_TIME,
PROP_FRAMES_PER_SECOND,