summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-10-19 15:40:10 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-10-19 15:40:10 +0200
commit9e45cb5ffdea8592077ee42223caecda492326cd (patch)
tree51356d9604dc8214d726af7f4572f5faaade1c9c /plugins
parente4deaf621246d6e97950d56e244345c8e13a6044 (diff)
downloadlibuca-9e45cb5ffdea8592077ee42223caecda492326cd.tar.gz
libuca-9e45cb5ffdea8592077ee42223caecda492326cd.tar.bz2
libuca-9e45cb5ffdea8592077ee42223caecda492326cd.tar.xz
libuca-9e45cb5ffdea8592077ee42223caecda492326cd.zip
Always return correct number of recorded frames
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pco/uca-pco-camera.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/plugins/pco/uca-pco-camera.c b/plugins/pco/uca-pco-camera.c
index 5d08acf..2a5d034 100644
--- a/plugins/pco/uca-pco-camera.c
+++ b/plugins/pco/uca-pco-camera.c
@@ -506,11 +506,6 @@ uca_pco_camera_stop_recording(UcaCamera *camera, GError **error)
if (err == FG_INVALID_PARAMETER)
g_warning(" Unable to unblock all\n");
- err = pco_get_active_segment(priv->pco, &priv->active_segment);
- HANDLE_PCO_ERROR(err);
-
- err = pco_get_num_images(priv->pco, priv->active_segment, &priv->num_recorded_images);
- g_print ("images: %i\n", priv->num_recorded_images);
HANDLE_PCO_ERROR(err);
}
@@ -525,9 +520,6 @@ uca_pco_camera_start_readout(UcaCamera *camera, GError **error)
* edge.
*/
- guint err = pco_get_active_segment(priv->pco, &priv->active_segment);
- HANDLE_PCO_ERROR(err);
-
err = pco_get_num_images(priv->pco, priv->active_segment, &priv->num_recorded_images);
HANDLE_PCO_ERROR(err);
@@ -1033,6 +1025,7 @@ uca_pco_camera_get_property(GObject *object, guint property_id, GValue *value, G
break;
case PROP_RECORDED_FRAMES:
+ err = pco_get_num_images (priv->pco, priv->active_segment, &priv->num_recorded_images);
g_value_set_uint(value, priv->num_recorded_images);
break;
@@ -1439,6 +1432,7 @@ uca_camera_impl_new (GError **error)
UcaPcoCameraPrivate *priv = UCA_PCO_CAMERA_GET_PRIVATE(camera);
priv->pco = pco;
+ pco_get_active_segment(priv->pco, &priv->active_segment);
pco_get_resolution(priv->pco, &priv->width, &priv->height, &priv->width_ex, &priv->height_ex);
pco_get_binning(priv->pco, &priv->binning_h, &priv->binning_v);
pco_set_storage_mode(pco, STORAGE_MODE_RECORDER);