mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-25 17:45:06 +03:00
Create a Exif object with various metadata tags set, just before the encoder starts to encode the frame. The object is passed directly as libcamera::Span<> to make sure EXIF tags can be set in a single place i.e. in CameraDevice and the encoder only has the job to write the data in the final output. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
25 lines
625 B
C++
25 lines
625 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Copyright (C) 2020, Google Inc.
|
|
*
|
|
* encoder.h - Image encoding interface
|
|
*/
|
|
#ifndef __ANDROID_JPEG_ENCODER_H__
|
|
#define __ANDROID_JPEG_ENCODER_H__
|
|
|
|
#include <libcamera/buffer.h>
|
|
#include <libcamera/span.h>
|
|
#include <libcamera/stream.h>
|
|
|
|
class Encoder
|
|
{
|
|
public:
|
|
virtual ~Encoder() {};
|
|
|
|
virtual int configure(const libcamera::StreamConfiguration &cfg) = 0;
|
|
virtual int encode(const libcamera::FrameBuffer *source,
|
|
const libcamera::Span<uint8_t> &destination,
|
|
const libcamera::Span<const uint8_t> &exifData) = 0;
|
|
};
|
|
|
|
#endif /* __ANDROID_JPEG_ENCODER_H__ */
|