Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kamoso
Commits
eb1cfbc5
Commit
eb1cfbc5
authored
Nov 25, 2021
by
Joost VanDorp
Committed by
Aleix Pol Gonzalez
Nov 25, 2021
Browse files
update objectIdFromProperties, fallback to device.path when object.id is empty str
parent
dffbc0d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/device.cpp
View file @
eb1cfbc5
...
...
@@ -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:
...
...
Joost VanDorp
@jvandorp
mentioned in commit
ae0bed1c
·
Nov 25, 2021
mentioned in commit
ae0bed1c
mentioned in commit ae0bed1cb1eb805a7b7127a2804bda3dd7ba661a
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment