summaryrefslogtreecommitdiffstats
path: root/plugins/pco/uca-pco-camera.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-10-18 16:07:00 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-10-18 16:07:00 +0200
commit184fc22ce23f8ab7c8127b5ac0657fc20ddea924 (patch)
tree1b8c71389cd4a1a25ecba5ad38e1b98441c8852f /plugins/pco/uca-pco-camera.c
parent2c3028f55ae1985315b8e350c1cdb26c9f7aa1a3 (diff)
downloaduca-184fc22ce23f8ab7c8127b5ac0657fc20ddea924.tar.gz
uca-184fc22ce23f8ab7c8127b5ac0657fc20ddea924.tar.bz2
uca-184fc22ce23f8ab7c8127b5ac0657fc20ddea924.tar.xz
uca-184fc22ce23f8ab7c8127b5ac0657fc20ddea924.zip
Add "recorded-frames" property
Diffstat (limited to 'plugins/pco/uca-pco-camera.c')
-rw-r--r--plugins/pco/uca-pco-camera.c9
1 files changed, 9 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);