summaryrefslogtreecommitdiffstats
path: root/src/uca-camera.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-05 11:41:43 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-05 11:41:43 +0100
commit8f7201721a823e1daaabbddd20833e5e84baecee (patch)
tree50a2594d6097a9d4aecb87c189396ce3239d022f /src/uca-camera.c
parent881abcb70c5ac2f8e65b2d892b7bde3f5311e8b3 (diff)
downloaduca-8f7201721a823e1daaabbddd20833e5e84baecee.tar.gz
uca-8f7201721a823e1daaabbddd20833e5e84baecee.tar.bz2
uca-8f7201721a823e1daaabbddd20833e5e84baecee.tar.xz
uca-8f7201721a823e1daaabbddd20833e5e84baecee.zip
Change recording property only on success
Diffstat (limited to 'src/uca-camera.c')
-rw-r--r--src/uca-camera.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/uca-camera.c b/src/uca-camera.c
index d06a570..f517d87 100644
--- a/src/uca-camera.c
+++ b/src/uca-camera.c
@@ -211,9 +211,12 @@ void uca_camera_start_recording(UcaCamera *camera, GError **error)
return;
}
- camera->priv->recording = TRUE;
(*klass->start_recording)(camera, error);
- g_object_notify_by_pspec(G_OBJECT(camera), camera_properties[PROP_IS_RECORDING]);
+
+ if (error == NULL) {
+ camera->priv->recording = TRUE;
+ g_object_notify_by_pspec(G_OBJECT(camera), camera_properties[PROP_IS_RECORDING]);
+ }
}
void uca_camera_stop_recording(UcaCamera *camera, GError **error)
@@ -231,9 +234,12 @@ void uca_camera_stop_recording(UcaCamera *camera, GError **error)
return;
}
- camera->priv->recording = FALSE;
(*klass->stop_recording)(camera, error);
- g_object_notify_by_pspec(G_OBJECT(camera), camera_properties[PROP_IS_RECORDING]);
+
+ if (error == NULL) {
+ camera->priv->recording = FALSE;
+ g_object_notify_by_pspec(G_OBJECT(camera), camera_properties[PROP_IS_RECORDING]);
+ }
}
void uca_camera_set_grab_func(UcaCamera *camera, UcaCameraGrabFunc func)