android: camera_device: Provide log prefix

Make the CameraDevice a Loggable subclass and provide a logPrefix()
method to identify which camera the log output refers to.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi 2020-05-26 15:41:41 +02:00
parent 5f2f9406ce
commit a7b9277e45
2 changed files with 10 additions and 1 deletions

View file

@ -863,6 +863,11 @@ void CameraDevice::requestComplete(Request *request)
delete buffer;
}
std::string CameraDevice::logPrefix() const
{
return "'" + camera_->name() + "'";
}
void CameraDevice::notifyShutter(uint32_t frameNumber, uint64_t timestamp)
{
camera3_notify_msg_t notify = {};