Closed joshdoe closed 3 years ago
Surely a typo in propAutoFeature
.
As I said ExposureTimeAbs
and ExposureTime
are probably equivalent (AcquisitionFrameRate
and AcquisitionFrameRateAbs
too), while GainRaw
and Gain
are not. Names are related with cameras, not Pylon version. We need to find a generic way for these duplicates.
If set_string_prop_implicitly()
fixes setting exposure then it's a way to go. I'll take a closer look on why you could not set exposure with default auto exposure next week.
Probably you were unable to set Exposure
because of the typo.
gst_pylonsrc_set_auto_feature
resets flag for PROP_EXPOSURE
and corresponding section of gst_pylonsrc_set_manual_feature
is never invoked.
static _Bool
gst_pylonsrc_set_auto_feature (GstPylonSrc * src,
GST_PYLONSRC_AUTOFEATURE feature)
{
if (is_prop_implicit (src, propAutoFeature[feature])) {
// Enable/disable automatic feature
...
reset_prop (src, propAutoFeature[feature]);
}
return TRUE;
error:
return FALSE;
}
static _Bool
gst_pylonsrc_set_manual_feature (GstPylonSrc * src,
GST_PYLONSRC_AUTOFEATURE feature)
{
if (feature >= AUTOF_NUM_LIMITED) {
GST_WARNING_OBJECT (src,
"Trying to set manual value for unsupported autofeature: %d",
(int) feature);
} else {
// Configure exposure/gain
if (is_prop_implicit (src, propManualFeature[feature])) {
...
reset_prop (src, propManualFeature[feature]);
}
}
return TRUE;
error:
return FALSE;
}
set_string_prop_implicitly()
is still useful. As setting manual exposure/gain implies turning auto function off. Not sure about white balance though. There are plenty of manual features behind auto white balance. Those should all be adjusted before disabling auto. Better to leave as is
This should be handled by now.
As I commented on #46 here, I was having issues changing the exposure while the camera was connected. I needed to change three things to make this work in my application:
propAutoFeature
which causes the ExposureTime not to be set.The below diff fixes this for me, but I'd like to have the author of #46 comment (@mrstecklo).