mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 07:19:45 +03:00
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) {
|
||||
ret = -errno;
|
||||
LOG(MediaDevice, Error)
|
||||
<< "Failed to setup link "
|
||||
<< source->entity()->name() << "["
|
||||
<< source->index() << "] -> "
|
||||
<< sink->entity()->name() << "["
|
||||
<< sink->index() << "]: "
|
||||
<< "Failed to setup link " << *link << ": "
|
||||
<< strerror(-ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
LOG(MediaDevice, Debug)
|
||||
<< source->entity()->name() << "["
|
||||
<< source->index() << "] -> "
|
||||
<< sink->entity()->name() << "["
|
||||
<< sink->index() << "]: " << flags;
|
||||
LOG(MediaDevice, Debug) << *link << ": " << flags;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue