mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-22 08:05:06 +03:00
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:
parent
5f2f9406ce
commit
a7b9277e45
2 changed files with 10 additions and 1 deletions
|
@ -16,11 +16,12 @@
|
|||
#include <libcamera/request.h>
|
||||
#include <libcamera/stream.h>
|
||||
|
||||
#include "libcamera/internal/log.h"
|
||||
#include "libcamera/internal/message.h"
|
||||
|
||||
class CameraMetadata;
|
||||
|
||||
class CameraDevice
|
||||
class CameraDevice : protected libcamera::Loggable
|
||||
{
|
||||
public:
|
||||
CameraDevice(unsigned int id, const std::shared_ptr<libcamera::Camera> &camera);
|
||||
|
@ -39,6 +40,9 @@ public:
|
|||
int processCaptureRequest(camera3_capture_request_t *request);
|
||||
void requestComplete(libcamera::Request *request);
|
||||
|
||||
protected:
|
||||
std::string logPrefix() const override;
|
||||
|
||||
private:
|
||||
struct Camera3RequestDescriptor {
|
||||
Camera3RequestDescriptor(unsigned int frameNumber,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue