Commit eb1cfbc5 authored by Joost VanDorp's avatar Joost VanDorp Committed by Aleix Pol Gonzalez
Browse files

update objectIdFromProperties, fallback to device.path when is empty str

parent dffbc0d5
......@@ -19,7 +19,15 @@ QString structureValue(GstStructure* device, const char* key)
QString objectIdFromProperties(GstStructure* st)
return structureValue(st, "");
// The value returned here is later used to identify
// the camera device we are dealing with.
QString objectId = structureValue(st, "");
if (!objectId.isEmpty()) {
return objectId;
} else {
// fallback value in-case the above returns empty string.
return structureValue(st, "device.path");
// for reference, the properties can be listed with:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment