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

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

parent dffbc0d5
......@@ -19,7 +19,15 @@ QString structureValue(GstStructure* device, const char* key)
QString objectIdFromProperties(GstStructure* st)
{
return structureValue(st, "object.id");
// The value returned here is later used to identify
// the camera device we are dealing with.
QString objectId = structureValue(st, "object.id");
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:
......
Markdown is supported
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