From e7e074a9f7a101bde8a5f73e18adf0721c3442cf Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Fri, 16 Aug 2013 09:50:47 +0200 Subject: Set the storage mode for pco.4000 --- plugins/pco/uca-pco-camera.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'plugins/pco/uca-pco-camera.c') 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); -- cgit v1.2.3