diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-10-18 12:44:40 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-10-18 13:38:41 +0200 |
commit | 983005dfbc3b07093145c0b964063e334b928d48 (patch) | |
tree | bcda1ab9dec89a08099de31b5cc4b5756d522d4e /tools/gui | |
parent | e16087fbe25df8901e9221602570c074ae887450 (diff) | |
download | libuca-983005dfbc3b07093145c0b964063e334b928d48.tar.gz libuca-983005dfbc3b07093145c0b964063e334b928d48.tar.bz2 libuca-983005dfbc3b07093145c0b964063e334b928d48.tar.xz libuca-983005dfbc3b07093145c0b964063e334b928d48.zip |
Fix download of in-camera frames
Diffstat (limited to 'tools/gui')
-rw-r--r-- | tools/gui/control.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/gui/control.c b/tools/gui/control.c index 930c4d0..aaeeb75 100644 --- a/tools/gui/control.c +++ b/tools/gui/control.c @@ -311,15 +311,19 @@ on_download_button_clicked (GtkWidget *widget, ThreadData *data) ring_buffer_proceed (data->buffer); } - if (error->code != UCA_CAMERA_ERROR_END_OF_STREAM) { + if (error->code == UCA_CAMERA_ERROR_END_OF_STREAM) { guint n_frames = ring_buffer_get_num_blocks (data->buffer); gtk_adjustment_set_upper (data->frame_slider, n_frames - 1); gtk_adjustment_set_value (data->frame_slider, n_frames - 1); } - else { + else g_printerr ("Error while reading out frames: %s\n", error->message); - } + + uca_camera_stop_readout (data->camera, &error); + + if (error != NULL) + g_printerr ("Failed to stop reading out of camera memory: %s\n", error->message); } static void |