aboutsummaryrefslogtreecommitdiffstats
path: root/utils/common/media-info.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2018-11-26 11:49:52 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2018-11-26 11:51:32 +0100
commitdce0945e8220735174667cdc57e887cc11f720ee (patch)
tree4a19de7d6e71ca9723c894215f1203f0c8a1795c /utils/common/media-info.cpp
parent8a9e93cf22fc3b657bfa75939c0e7fbae7745b5d (diff)
media-info: use hex to log IDs, fix radio interface check
In two places an object ID was printed in decimal instead of hex. Change this to hex to consistency. The interface check was also wrong: radio devices do not have a link to an entity since the actual audio signal goes via alsa or an external loopback cable. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/common/media-info.cpp')
-rw-r--r--utils/common/media-info.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/common/media-info.cpp b/utils/common/media-info.cpp
index c1b78684..eab93f60 100644
--- a/utils/common/media-info.cpp
+++ b/utils/common/media-info.cpp
@@ -438,7 +438,7 @@ static __u32 read_topology(int media_fd, __u32 major, __u32 minor,
v2_ifaces[i].devnode.minor == minor)
break;
if (i == topology.num_interfaces) {
- fprintf(stderr, "FAIL: could not find %d:%d device in topology\n",
+ fprintf(stderr, "FAIL: could not find device %d:%d in topology\n",
major, minor);
if (is_invalid)
*is_invalid = true;
@@ -453,10 +453,10 @@ static __u32 read_topology(int media_fd, __u32 major, __u32 minor,
if (v2_links[i].source_id == iface.id)
break;
}
- if (i == topology.num_links) {
+ if (i == topology.num_links && iface.intf_type != MEDIA_INTF_T_V4L_RADIO) {
if (is_invalid)
*is_invalid = true;
- fprintf(stderr, "FAIL: could not find link for interface %u in topology\n",
+ fprintf(stderr, "FAIL: could not find link for interface 0x%08x in topology\n",
iface.id);
return MEDIA_ENT_F_UNKNOWN;
}
@@ -468,7 +468,7 @@ static __u32 read_topology(int media_fd, __u32 major, __u32 minor,
if (i == topology.num_entities) {
if (is_invalid)
*is_invalid = true;
- fprintf(stderr, "FAIL: could not find entity %u in topology\n",
+ fprintf(stderr, "FAIL: could not find entity 0x%08x in topology\n",
ent_id);
return MEDIA_ENT_F_UNKNOWN;
}

Privacy Policy