diff options
author | Volker Kaiser <volker.kaiser@softwareschneiderei.de> | 2012-07-27 08:18:30 +0200 |
---|---|---|
committer | Volker Kaiser <volker.kaiser@softwareschneiderei.de> | 2012-07-27 08:18:30 +0200 |
commit | 7c5a0bdefd27180da32aaaf9b1331c69c66e1693 (patch) | |
tree | 73adca8c0cf61301ab93fcdb6bf6418533ccc08b /src/cameras/uca-pylon-camera.c | |
parent | 310c98755e0c8fe1d95d4e4e43b7d08c70d06353 (diff) | |
download | uca-7c5a0bdefd27180da32aaaf9b1331c69c66e1693.tar.gz uca-7c5a0bdefd27180da32aaaf9b1331c69c66e1693.tar.bz2 uca-7c5a0bdefd27180da32aaaf9b1331c69c66e1693.tar.xz uca-7c5a0bdefd27180da32aaaf9b1331c69c66e1693.zip |
SCHNEIDE-276
Diffstat (limited to 'src/cameras/uca-pylon-camera.c')
-rw-r--r-- | src/cameras/uca-pylon-camera.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/cameras/uca-pylon-camera.c b/src/cameras/uca-pylon-camera.c index 152ff01..23aa1a3 100644 --- a/src/cameras/uca-pylon-camera.c +++ b/src/cameras/uca-pylon-camera.c @@ -52,6 +52,7 @@ GQuark uca_pylon_camera_error_quark() enum { PROP_ROI_WIDTH_DEFAULT = N_BASE_PROPERTIES, PROP_ROI_HEIGHT_DEFAULT, + PROP_GAIN, N_PROPERTIES }; @@ -195,9 +196,11 @@ static void uca_pylon_camera_set_property(GObject *object, guint property_id, co break; case PROP_EXPOSURE_TIME: - { - pylon_camera_set_exposure_time(g_value_get_double(value), &error); - } + pylon_camera_set_exposure_time(g_value_get_double(value), &error); + break; + + case PROP_GAIN: + pylon_camera_set_gain(g_value_get_int(value), &error); break; default: @@ -302,6 +305,14 @@ static void uca_pylon_camera_get_property(GObject *object, guint property_id, GV g_value_set_uint(value, priv->height); break; + case PROP_GAIN: + { + gint gain=0; + pylon_camera_get_gain(&gain, &error); + g_value_set_int(value, gain); + } + break; + case PROP_ROI_WIDTH_MULTIPLIER: g_value_set_uint(value, 1); break; @@ -397,6 +408,12 @@ static void uca_pylon_camera_class_init(UcaPylonCameraClass *klass) "ROI height default value", 0, G_MAXUINT, 0, G_PARAM_READABLE); + pylon_properties[PROP_GAIN] = + g_param_spec_int("gain", + "gain", + "gain", + 0, G_MAXINT, 0, + G_PARAM_READWRITE); /*g_object_class_install_property(gobject_class, PROP_ROI_X, pylon_properties[PROP_ROI_X]); |