summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2013-03-20 16:38:59 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2013-03-20 16:59:27 +0100
commite7358a83b3c229d4877daa6ed75cddb81523d62e (patch)
tree46fa8441d403e7f939b508178c568b8772f82296 /src
parentcff0388efeca492c80271a1b50fd18bb860d5b68 (diff)
downloadlibuca-e7358a83b3c229d4877daa6ed75cddb81523d62e.tar.gz
libuca-e7358a83b3c229d4877daa6ed75cddb81523d62e.tar.bz2
libuca-e7358a83b3c229d4877daa6ed75cddb81523d62e.tar.xz
libuca-e7358a83b3c229d4877daa6ed75cddb81523d62e.zip
Implement trigger logic in base camera
Diffstat (limited to 'src')
-rw-r--r--src/uca-camera.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/uca-camera.c b/src/uca-camera.c
index ec4b418..5073a57 100644
--- a/src/uca-camera.c
+++ b/src/uca-camera.c
@@ -116,6 +116,7 @@ struct _UcaCameraPrivate {
gboolean is_recording;
gboolean is_readout;
gboolean transfer_async;
+ UcaCameraTrigger trigger;
};
static void
@@ -148,6 +149,10 @@ uca_camera_set_property (GObject *object, guint property_id, const GValue *value
}
break;
+ case PROP_TRIGGER_MODE:
+ priv->trigger = g_value_get_enum (value);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
}
@@ -172,7 +177,7 @@ uca_camera_get_property(GObject *object, guint property_id, GValue *value, GPara
break;
case PROP_TRIGGER_MODE:
- g_value_set_enum (value, UCA_CAMERA_TRIGGER_AUTO);
+ g_value_set_enum (value, priv->trigger);
break;
case PROP_FRAMES_PER_SECOND:
@@ -403,6 +408,7 @@ uca_camera_init (UcaCamera *camera)
camera->priv->is_recording = FALSE;
camera->priv->is_readout = FALSE;
camera->priv->transfer_async = FALSE;
+ camera->priv->trigger = UCA_CAMERA_TRIGGER_AUTO;
uca_camera_set_property_unit (camera_properties[PROP_SENSOR_WIDTH], UCA_UNIT_PIXEL);
uca_camera_set_property_unit (camera_properties[PROP_SENSOR_HEIGHT], UCA_UNIT_PIXEL);