summaryrefslogtreecommitdiffstats
path: root/plugins/pylon/uca-pylon-camera.c
diff options
context:
space:
mode:
authorMihael Koep <koep@schneide.com>2014-10-07 12:22:52 +0200
committerMihael Koep <koep@schneide.com>2014-10-07 13:08:08 +0200
commitf2394f593a552f1c3d29ce894b5cd28914b884b7 (patch)
tree69535ada9e98ed40bb3e0578356847f130836708 /plugins/pylon/uca-pylon-camera.c
parent8e98707648406e2c7a6831c2f3366a2c34eba617 (diff)
downloaduca-f2394f593a552f1c3d29ce894b5cd28914b884b7.tar.gz
uca-f2394f593a552f1c3d29ce894b5cd28914b884b7.tar.bz2
uca-f2394f593a552f1c3d29ce894b5cd28914b884b7.tar.xz
uca-f2394f593a552f1c3d29ce894b5cd28914b884b7.zip
Implement auto exposure property for pylon plugin
Conflicts: plugins/pylon/CMakeLists.txt plugins/pylon/changelog.txt plugins/pylon/uca-pylon-camera.c
Diffstat (limited to 'plugins/pylon/uca-pylon-camera.c')
-rw-r--r--plugins/pylon/uca-pylon-camera.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/pylon/uca-pylon-camera.c b/plugins/pylon/uca-pylon-camera.c
index 1c3a759..f8c284a 100644
--- a/plugins/pylon/uca-pylon-camera.c
+++ b/plugins/pylon/uca-pylon-camera.c
@@ -55,6 +55,7 @@ enum {
PROP_ROI_HEIGHT_DEFAULT,
PROP_GAIN,
PROP_BALANCE_WHITE_AUTO,
+ PROP_EXPOSURE_AUTO,
N_PROPERTIES
};
@@ -149,6 +150,11 @@ static void uca_pylon_camera_set_property(GObject *object, guint property_id, co
pylon_camera_set_int_attribute("BalanceWhiteAuto", g_value_get_enum(value), &error);
break;
}
+ case PROP_EXPOSURE_AUTO:
+ {
+ pylon_camera_set_int_attribute("ExposureAuto", g_value_get_enum(value), &error);
+ break;
+ }
case PROP_ROI_X:
{
priv->roi_x = g_value_get_uint(value);
@@ -211,6 +217,14 @@ static void uca_pylon_camera_get_property(GObject *object, guint property_id, GV
g_value_set_enum(value, mode);
break;
}
+ case PROP_EXPOSURE_AUTO:
+ {
+ gint enum_value = UCA_CAMERA_EXPOSURE_AUTO_OFF;
+ pylon_camera_get_int_attribute("ExposureAuto", &enum_value, &error);
+ UcaCameraExposureAuto mode = enum_value;
+ g_value_set_enum(value, mode);
+ break;
+ }
case PROP_SENSOR_WIDTH:
pylon_camera_get_sensor_size(&priv->width, &priv->height, &error);
g_value_set_uint(value, priv->width);