-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pylon Feature Duplicates #49
Conversation
Had a few minutes to test. I got an error when pixel format is left to "auto", setting to "Mono8" got past that. Got error setting BlackLevelRaw to 0.0 (had to set as Integer) // Configure black level
if (is_prop_implicit (src, PROP_BLACKLEVEL)) {
- const char *name =
- feature_alias_available (src, "BlackLevel", "BlackLevelRaw");
- if (name != NULL) {
- GST_DEBUG_OBJECT (src, "Setting black level to %0.2lf", src->blacklevel);
+ if (feature_available (src, "BlackLevel")) {
+ GST_DEBUG_OBJECT (src, "Setting BlackLevel to %0.2lf", src->blacklevel);
res =
- PylonDeviceSetFloatFeature (src->deviceHandle, name, src->blacklevel);
+ PylonDeviceSetFloatFeature (src->deviceHandle, "BlackLevel", src->blacklevel);
PYLONC_CHECK_ERROR (src, res);
+ } else if (feature_available(src, "BlackLevelRaw")) {
+ GST_DEBUG_OBJECT(src, "Setting BlackLevelRaw to %d", (int)src->blacklevel);
+ res =
+ PylonDeviceSetIntegerFeature(src->deviceHandle, "BlackLevelRaw", (int)src->blacklevel);
+ PYLONC_CHECK_ERROR(src, res);
}
reset_prop (src, PROP_BLACKLEVEL);
} I'll see what's up with the auto not working. |
@@ -3632,7 +3635,7 @@ gst_pylonsrc_start (GstBaseSrc * bsrc)
if (!gst_pylonsrc_select_device (src) ||
- !gst_pylonsrc_connect_device (src) || !gst_pylonsrc_set_properties (src))
+ !gst_pylonsrc_connect_device (src))
goto error;
src->caps = gst_pylonsrc_get_supported_caps (src); I get past that, but then width and height are set to zero, so then I have to manually set both width and height. I'll have to think of a way to fix the auto format issue, if fixed I should also set the width, height, and framerate from the negotiated caps. If you have insights for these fixes let me know, I can't look at it again until next week. Thanks for the PR! |
Found and fixed some more float features with integer aliases. Wonder how I've missed them at first time. |
Ok seems to work pretty now. @mrstecklo ready to merge then? |
@joshdoe sure |
This PR generally resolves issues #47 and #48. And property handling modifications I've mentioned here
I've tested it on acA720-290gm and acA2040-55uc. This pair is a fairly good example of feature name duplicates. However they do not cover all of the possible aliases.