diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2014-12-18 10:45:15 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2014-12-18 10:45:15 +0100 |
commit | ac4ee2d0c90cf9ef0ee1c3420b3a63b3e1869ffb (patch) | |
tree | 9f3bf6537c45c48037c9e989d0707d269cf2b571 | |
parent | 7ff9c59ceb7fd17a5dc7cf3cc3ad39d5c2ed2029 (diff) | |
download | uca-ac4ee2d0c90cf9ef0ee1c3420b3a63b3e1869ffb.tar.gz uca-ac4ee2d0c90cf9ef0ee1c3420b3a63b3e1869ffb.tar.bz2 uca-ac4ee2d0c90cf9ef0ee1c3420b3a63b3e1869ffb.tar.xz uca-ac4ee2d0c90cf9ef0ee1c3420b3a63b3e1869ffb.zip |
mock: Fake delay caused by exposure
-rw-r--r-- | plugins/mock/uca-mock-camera.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mock/uca-mock-camera.c b/plugins/mock/uca-mock-camera.c index e4fb872..eb41fcf 100644 --- a/plugins/mock/uca-mock-camera.c +++ b/plugins/mock/uca-mock-camera.c @@ -273,12 +273,18 @@ uca_mock_camera_trigger (UcaCamera *camera, GError **error) static gboolean uca_mock_camera_grab (UcaCamera *camera, gpointer data, GError **error) { + gdouble exposure_time; + g_return_val_if_fail (UCA_IS_MOCK_CAMERA(camera), FALSE); UcaMockCameraPrivate *priv = UCA_MOCK_CAMERA_GET_PRIVATE (camera); + g_object_get (G_OBJECT (camera), "exposure-time", &exposure_time, NULL); + g_usleep (G_USEC_PER_SEC * exposure_time); + print_current_frame (priv, priv->dummy_data); priv->current_frame++; + g_memmove (data, priv->dummy_data, priv->roi_width * priv->roi_height); return TRUE; |