diff options
author | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-04-27 11:46:59 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-04-27 12:25:53 +0200 |
commit | a46c29e25a42191149a426a58f83c17c5cd60397 (patch) | |
tree | 964af1794bcf54de265a9f0e5784b1d3db49cab6 /src/cameras | |
parent | 0c9f4799c630c5b26bb866b9074c5a973f0eb92f (diff) | |
download | libuca-a46c29e25a42191149a426a58f83c17c5cd60397.tar.gz libuca-a46c29e25a42191149a426a58f83c17c5cd60397.tar.bz2 libuca-a46c29e25a42191149a426a58f83c17c5cd60397.tar.xz libuca-a46c29e25a42191149a426a58f83c17c5cd60397.zip |
pco: add noise filter
Diffstat (limited to 'src/cameras')
-rw-r--r-- | src/cameras/uca-pco-camera.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/cameras/uca-pco-camera.c b/src/cameras/uca-pco-camera.c index 76664cc..7bdd5cf 100644 --- a/src/cameras/uca-pco-camera.c +++ b/src/cameras/uca-pco-camera.c @@ -79,6 +79,7 @@ enum { PROP_OFFSET_MODE, PROP_RECORD_MODE, PROP_COOLING_POINT, + PROP_NOISE_FILTER, N_PROPERTIES }; @@ -566,6 +567,7 @@ static void uca_pco_camera_set_property(GObject *object, guint property_id, cons case PROP_RECORD_MODE: { + /* TODO: setting this is not possible for the edge */ UcaPcoCameraRecordMode mode = (UcaPcoCameraRecordMode) g_value_get_enum(value); if (mode == UCA_PCO_CAMERA_RECORD_MODE_SEQUENCE) @@ -595,6 +597,13 @@ static void uca_pco_camera_set_property(GObject *object, guint property_id, cons } break; + case PROP_NOISE_FILTER: + { + guint16 filter_mode = g_value_get_boolean(value) ? NOISE_FILTER_MODE_ON : NOISE_FILTER_MODE_OFF; + pco_set_noise_filter_mode(priv->pco, filter_mode); + } + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); return; @@ -806,6 +815,14 @@ static void uca_pco_camera_get_property(GObject *object, guint property_id, GVal } break; + case PROP_NOISE_FILTER: + { + guint16 filter_mode; + pco_get_noise_filter_mode(priv->pco, &filter_mode); + g_value_set_boolean(value, filter_mode != NOISE_FILTER_MODE_OFF); + } + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); break; @@ -904,6 +921,12 @@ static void uca_pco_camera_class_init(UcaPcoCameraClass *klass) 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE); + pco_properties[PROP_NOISE_FILTER] = + g_param_spec_boolean("noise-filter", + "Noise filter", + "Noise filter", + FALSE, G_PARAM_READWRITE); + /* * The default values here are set arbitrarily, because we are not yet * connected to the camera and just don't know the cooling range. We |