From f2394f593a552f1c3d29ce894b5cd28914b884b7 Mon Sep 17 00:00:00 2001 From: Mihael Koep Date: Tue, 7 Oct 2014 12:22:52 +0200 Subject: Implement auto exposure property for pylon plugin Conflicts: plugins/pylon/CMakeLists.txt plugins/pylon/changelog.txt plugins/pylon/uca-pylon-camera.c --- plugins/pylon/uca-pylon-camera.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'plugins/pylon/uca-pylon-camera.c') 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); -- cgit v1.2.3