summaryrefslogtreecommitdiffstats
path: root/plugins/pco/uca-pco-camera.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2013-08-16 09:50:47 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2013-08-16 09:50:47 +0200
commite7e074a9f7a101bde8a5f73e18adf0721c3442cf (patch)
treed029fc667c89873a3784bbe3253c113a8ee7cdd0 /plugins/pco/uca-pco-camera.c
parentb5f04bdcaa7acac8cd5ca399761fbe3c0406c5c4 (diff)
downloaduca-e7e074a9f7a101bde8a5f73e18adf0721c3442cf.tar.gz
uca-e7e074a9f7a101bde8a5f73e18adf0721c3442cf.tar.bz2
uca-e7e074a9f7a101bde8a5f73e18adf0721c3442cf.tar.xz
uca-e7e074a9f7a101bde8a5f73e18adf0721c3442cf.zip
Set the storage mode for pco.4000
Diffstat (limited to 'plugins/pco/uca-pco-camera.c')
-rw-r--r--plugins/pco/uca-pco-camera.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/pco/uca-pco-camera.c b/plugins/pco/uca-pco-camera.c
index 137bddc..df2f705 100644
--- a/plugins/pco/uca-pco-camera.c
+++ b/plugins/pco/uca-pco-camera.c
@@ -404,6 +404,12 @@ check_pco_property_error (guint err, guint property_id)
}
}
+static gboolean
+is_type (UcaPcoCameraPrivate *priv, int type)
+{
+ return priv->description->type == type;
+}
+
static void
uca_pco_camera_start_recording (UcaCamera *camera, GError **error)
{
@@ -487,10 +493,16 @@ uca_pco_camera_start_recording (UcaCamera *camera, GError **error)
if (transfer_async)
setup_fg_callback(camera);
- if ((priv->description->type == CAMERATYPE_PCO_DIMAX_STD) ||
- (priv->description->type == CAMERATYPE_PCO4000))
+ if (is_type (priv, CAMERATYPE_PCO_DIMAX_STD) || is_type (priv, CAMERATYPE_PCO4000))
pco_clear_active_segment(priv->pco);
+ /*
+ * Set the storage mode to FIFO buffer otherwise pco.4000 skips
+ * frames that it is not able to send in time.
+ */
+ if (is_type (priv, CAMERATYPE_PCO4000))
+ pco_set_storage_mode (priv->pco, STORAGE_MODE_FIFO_BUFFER);
+
priv->last_frame = 0;
err = pco_arm_camera(priv->pco);