libcamera: media_device: Use MediaLink string helper
Replace the two open-coded implementations of a link representation with the operator<< overload string representation to simplify the code and unify appearance of reporting MediaLinks. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
a783562a34
commit
4035f5754e
1 changed files with 2 additions and 10 deletions
|
@ -818,20 +818,12 @@ int MediaDevice::setupLink(const MediaLink *link, unsigned int flags)
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ret = -errno;
|
ret = -errno;
|
||||||
LOG(MediaDevice, Error)
|
LOG(MediaDevice, Error)
|
||||||
<< "Failed to setup link "
|
<< "Failed to setup link " << *link << ": "
|
||||||
<< source->entity()->name() << "["
|
|
||||||
<< source->index() << "] -> "
|
|
||||||
<< sink->entity()->name() << "["
|
|
||||||
<< sink->index() << "]: "
|
|
||||||
<< strerror(-ret);
|
<< strerror(-ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(MediaDevice, Debug)
|
LOG(MediaDevice, Debug) << *link << ": " << flags;
|
||||||
<< source->entity()->name() << "["
|
|
||||||
<< source->index() << "] -> "
|
|
||||||
<< sink->entity()->name() << "["
|
|
||||||
<< sink->index() << "]: " << flags;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue