From 453701eddba38052a466e91d614fd999b52bca4a Mon Sep 17 00:00:00 2001 From: Timo Dritschler Date: Mon, 2 Mar 2015 15:57:23 +0100 Subject: Added check for 'writable during acquisition' to all set_property calls --- plugins/pf/uca-pf-camera.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'plugins/pf') 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; } } -- cgit v1.2.3