diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-06-14 10:54:09 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-06-14 11:07:00 +0200 |
commit | f6f1407d38e348e62199a8735b98beda18d3c976 (patch) | |
tree | 5742fd94ace8ffc32d9eb30d46e9ff3140c77936 /src | |
parent | 3e4783c72bf7d0c9b181d349c37708ffbebf183e (diff) | |
download | uca-f6f1407d38e348e62199a8735b98beda18d3c976.tar.gz uca-f6f1407d38e348e62199a8735b98beda18d3c976.tar.bz2 uca-f6f1407d38e348e62199a8735b98beda18d3c976.tar.xz uca-f6f1407d38e348e62199a8735b98beda18d3c976.zip |
Fix LU-4
The larger sensor area can now be used as a ROI.
Diffstat (limited to 'src')
-rw-r--r-- | src/cameras/uca-pco-camera.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/cameras/uca-pco-camera.c b/src/cameras/uca-pco-camera.c index 55a8f5d..27f5427 100644 --- a/src/cameras/uca-pco-camera.c +++ b/src/cameras/uca-pco-camera.c @@ -382,9 +382,22 @@ static void uca_pco_camera_start_recording(UcaCamera *camera, GError **error) guint err = PCO_NOERROR; UcaPcoCameraPrivate *priv = UCA_PCO_CAMERA_GET_PRIVATE(camera); + guint16 binned_width, binned_height; + gboolean use_extended = FALSE; - guint16 binned_width = priv->width / priv->binning_h; - guint16 binned_height = priv->height / priv->binning_v; + g_object_get (camera, "sensor-extended", &use_extended, NULL); + + if (use_extended) { + binned_width = priv->width_ex; + binned_height = priv->height_ex; + } + else { + binned_width = priv->width; + binned_height = priv->height; + } + + binned_width /= priv->binning_h; + binned_height /= priv->binning_v; if ((priv->roi_x + priv->roi_width > binned_width) || (priv->roi_y + priv->roi_height > binned_height)) { g_set_error(error, UCA_PCO_CAMERA_ERROR, UCA_PCO_CAMERA_ERROR_UNSUPPORTED, @@ -548,7 +561,7 @@ static void uca_pco_camera_set_property(GObject *object, guint property_id, cons switch (property_id) { case PROP_SENSOR_EXTENDED: { - guint16 format = g_value_get_boolean(value) ? SENSORFORMAT_EXTENDED : SENSORFORMAT_STANDARD; + guint16 format = g_value_get_boolean (value) ? SENSORFORMAT_EXTENDED : SENSORFORMAT_STANDARD; pco_set_sensor_format(priv->pco, format); } break; |