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/file/uca-file-camera.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugins/file/uca-file-camera.c') diff --git a/plugins/file/uca-file-camera.c b/plugins/file/uca-file-camera.c index 5c7b5cb..632b8e8 100644 --- a/plugins/file/uca-file-camera.c +++ b/plugins/file/uca-file-camera.c @@ -221,7 +221,13 @@ uca_file_camera_set_property (GObject *object, guint property_id, const GValue * static void uca_file_camera_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { - UcaFileCameraPrivate *priv = UCA_FILE_CAMERA_GET_PRIVATE(object); + g_return_if_fail (UCA_IS_FILE_CAMERA (object)); + UcaFileCameraPrivate *priv = UCA_FILE_CAMERA_GET_PRIVATE (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) { case PROP_NAME: -- cgit v1.2.3