summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/pco/uca-pco-camera.c9
-rw-r--r--src/uca-camera.c20
-rw-r--r--src/uca-camera.h1
3 files changed, 30 insertions, 0 deletions
diff --git a/plugins/pco/uca-pco-camera.c b/plugins/pco/uca-pco-camera.c
index 03a1a17..d34e0f4 100644
--- a/plugins/pco/uca-pco-camera.c
+++ b/plugins/pco/uca-pco-camera.c
@@ -139,6 +139,7 @@ static gint base_overrideables[] = {
PROP_ROI_HEIGHT_MULTIPLIER,
PROP_HAS_STREAMING,
PROP_HAS_CAMRAM_RECORDING,
+ PROP_RECORDED_FRAMES,
0
};
@@ -504,6 +505,9 @@ uca_pco_camera_stop_recording(UcaCamera *camera, GError **error)
err = Fg_setStatusEx(priv->fg, FG_UNBLOCK_ALL, 0, priv->fg_port, priv->fg_mem);
if (err == FG_INVALID_PARAMETER)
g_warning(" Unable to unblock all\n");
+
+ err = pco_get_num_images(priv->pco, priv->active_segment, &priv->num_recorded_images);
+ HANDLE_PCO_ERROR(err);
}
static void
@@ -1024,6 +1028,10 @@ uca_pco_camera_get_property(GObject *object, guint property_id, GValue *value, G
g_value_set_boolean(value, priv->camera_description->has_camram);
break;
+ case PROP_RECORDED_FRAMES:
+ g_value_set_uint(value, priv->num_recorded_images);
+ break;
+
case PROP_RECORD_MODE:
{
guint16 mode;
@@ -1440,6 +1448,7 @@ uca_camera_impl_new (GError **error)
priv->roi_y = roi[1] - 1;
priv->roi_width = roi[2] - roi[0] + 1;
priv->roi_height = roi[3] - roi[1] + 1;
+ priv->num_recorded_images = 0;
guint16 camera_type, camera_subtype;
pco_get_camera_type(priv->pco, &camera_type, &camera_subtype);
diff --git a/src/uca-camera.c b/src/uca-camera.c
index 053dcca..53b2d7a 100644
--- a/src/uca-camera.c
+++ b/src/uca-camera.c
@@ -103,6 +103,7 @@ const gchar *uca_camera_props[N_BASE_PROPERTIES] = {
"roi-height-multiplier",
"has-streaming",
"has-camram-recording",
+ "recorded-frames",
"transfer-asynchronously",
"is-recording",
"is-readout"
@@ -182,6 +183,10 @@ uca_camera_get_property(GObject *object, guint property_id, GValue *value, GPara
}
break;
+ case PROP_RECORDED_FRAMES:
+ g_value_set_uint (value, 0);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
}
@@ -350,6 +355,20 @@ uca_camera_class_init (UcaCameraClass *klass)
"Is the camera able to record the data in-camera",
FALSE, G_PARAM_READABLE);
+ /**
+ * UcaCamera:recorded-frames
+ *
+ * Number of frames that are recorded into internal camera memory.
+ *
+ * Since: 1.1
+ */
+ camera_properties[PROP_RECORDED_FRAMES] =
+ g_param_spec_uint(uca_camera_props[PROP_RECORDED_FRAMES],
+ "Number of frames recorded into internal camera memory",
+ "Number of frames recorded into internal camera memory",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READABLE);
+
camera_properties[PROP_TRANSFER_ASYNCHRONOUSLY] =
g_param_spec_boolean(uca_camera_props[PROP_TRANSFER_ASYNCHRONOUSLY],
"Specify whether data should be transfered asynchronously",
@@ -398,6 +417,7 @@ uca_camera_init (UcaCamera *camera)
uca_camera_set_property_unit (camera_properties[PROP_ROI_HEIGHT], UCA_UNIT_PIXEL);
uca_camera_set_property_unit (camera_properties[PROP_ROI_WIDTH_MULTIPLIER], UCA_UNIT_COUNT);
uca_camera_set_property_unit (camera_properties[PROP_ROI_HEIGHT_MULTIPLIER], UCA_UNIT_COUNT);
+ uca_camera_set_property_unit (camera_properties[PROP_RECORDED_FRAMES], UCA_UNIT_COUNT);
}
/**
diff --git a/src/uca-camera.h b/src/uca-camera.h
index 78edd95..87996c6 100644
--- a/src/uca-camera.h
+++ b/src/uca-camera.h
@@ -85,6 +85,7 @@ enum {
PROP_ROI_HEIGHT_MULTIPLIER,
PROP_HAS_STREAMING,
PROP_HAS_CAMRAM_RECORDING,
+ PROP_RECORDED_FRAMES,
/* These properties are handled internally */
PROP_TRANSFER_ASYNCHRONOUSLY,