diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-03-20 16:38:59 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2013-03-20 16:59:27 +0100 |
commit | e7358a83b3c229d4877daa6ed75cddb81523d62e (patch) | |
tree | 46fa8441d403e7f939b508178c568b8772f82296 /src | |
parent | cff0388efeca492c80271a1b50fd18bb860d5b68 (diff) | |
download | uca-e7358a83b3c229d4877daa6ed75cddb81523d62e.tar.gz uca-e7358a83b3c229d4877daa6ed75cddb81523d62e.tar.bz2 uca-e7358a83b3c229d4877daa6ed75cddb81523d62e.tar.xz uca-e7358a83b3c229d4877daa6ed75cddb81523d62e.zip |
Implement trigger logic in base camera
Diffstat (limited to 'src')
-rw-r--r-- | src/uca-camera.c | 8 |
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); |