summaryrefslogtreecommitdiffstats
path: root/plugins/pco
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2014-09-30 21:39:50 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2014-09-30 21:41:24 +0200
commit0570957a002d6f660a17135cc136a053018035c6 (patch)
treefecfbefebceaafe44a203d088e573db1f09dd8fe /plugins/pco
parent1fe54d437f1a11f5ff402dfb0d19d5de37f4b005 (diff)
downloadlibuca-0570957a002d6f660a17135cc136a053018035c6.tar.gz
libuca-0570957a002d6f660a17135cc136a053018035c6.tar.bz2
libuca-0570957a002d6f660a17135cc136a053018035c6.tar.xz
libuca-0570957a002d6f660a17135cc136a053018035c6.zip
pco: add "global-shutter" property
Diffstat (limited to 'plugins/pco')
-rw-r--r--plugins/pco/uca-pco-camera.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/pco/uca-pco-camera.c b/plugins/pco/uca-pco-camera.c
index bdd5e8d..52fded5 100644
--- a/plugins/pco/uca-pco-camera.c
+++ b/plugins/pco/uca-pco-camera.c
@@ -137,6 +137,7 @@ enum {
PROP_NOISE_FILTER,
PROP_TIMESTAMP_MODE,
PROP_VERSION,
+ PROP_EDGE_GLOBAL_SHUTTER,
N_PROPERTIES
};
@@ -944,6 +945,15 @@ uca_pco_camera_set_property(GObject *object, guint property_id, const GValue *va
}
break;
+ case PROP_EDGE_GLOBAL_SHUTTER:
+ {
+ pco_edge_shutter shutter;
+
+ shutter = g_value_get_boolean (value) ? PCO_EDGE_GLOBAL_SHUTTER : PCO_EDGE_ROLLING_SHUTTER;
+ err = pco_edge_set_shutter (priv->pco, shutter);
+ }
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
return;
@@ -1329,6 +1339,14 @@ uca_pco_camera_get_property (GObject *object, guint property_id, GValue *value,
g_value_set_string (value, priv->version);
break;
+ case PROP_EDGE_GLOBAL_SHUTTER:
+ {
+ pco_edge_shutter shutter;
+ err = pco_edge_get_shutter (priv->pco, &shutter);
+ g_value_set_boolean (value, shutter == PCO_EDGE_GLOBAL_SHUTTER);
+ }
+ break;
+
case PROP_IS_RECORDING:
{
bool is_recording;
@@ -1608,6 +1626,12 @@ uca_pco_camera_class_init(UcaPcoCameraClass *klass)
DEFAULT_VERSION,
G_PARAM_READABLE);
+ pco_properties[PROP_EDGE_GLOBAL_SHUTTER] =
+ g_param_spec_boolean("global-shutter",
+ "Global shutter enabled",
+ "Global shutter enabled",
+ FALSE, G_PARAM_READWRITE);
+
for (guint id = N_BASE_PROPERTIES; id < N_PROPERTIES; id++)
g_object_class_install_property(gobject_class, id, pco_properties[id]);