summaryrefslogtreecommitdiffstats
path: root/plugins/pf/uca-pf-camera.c
diff options
context:
space:
mode:
authorTimo Dritschler <timo.dritschler@kit.edu>2015-03-02 15:57:23 +0100
committerTimo Dritschler <timo.dritschler@kit.edu>2015-03-09 11:12:26 +0100
commit453701eddba38052a466e91d614fd999b52bca4a (patch)
tree2b0c346ab845f1b47f8d18aad675411cedef4673 /plugins/pf/uca-pf-camera.c
parent43a5d42eeaccb08b7703e01e326e397ed3cd4ac2 (diff)
downloaduca-453701eddba38052a466e91d614fd999b52bca4a.tar.gz
uca-453701eddba38052a466e91d614fd999b52bca4a.tar.bz2
uca-453701eddba38052a466e91d614fd999b52bca4a.tar.xz
uca-453701eddba38052a466e91d614fd999b52bca4a.zip
Added check for 'writable during acquisition' to all set_property calls
Diffstat (limited to 'plugins/pf/uca-pf-camera.c')
-rw-r--r--plugins/pf/uca-pf-camera.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/pf/uca-pf-camera.c b/plugins/pf/uca-pf-camera.c
index 6515700..26f8d0d 100644
--- a/plugins/pf/uca-pf-camera.c
+++ b/plugins/pf/uca-pf-camera.c
@@ -208,9 +208,16 @@ uca_pf_camera_trigger(UcaCamera *camera, GError **error)
static void
uca_pf_camera_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
+ g_return_if_fail (UCA_IS_PF_CAMERA (object));
+
+ if (uca_camera_is_recording (UCA_CAMERA (object)) && !uca_camera_is_writable_during_acquisition (UCA_CAMERA (object), pspec->name)) {
+ g_warning ("Property '%s' cant be changed during acquisition", pspec->name);
+ return;
+ }
+
switch (property_id) {
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
return;
}
}