Files
external_libcamera/src/android/jpeg/encoder.h
Umang Jain c430d39d20 android: jpeg: encoder: Use pass-by-value for Exif parameter
Following the reasoning of pass-by-value for libcamera::Span
parameters from 90c193f2a700("android: Modify Encoder interface") i.e.
they are easy to copy/move/construct, align the Exif parameter passing
to the encoder interface in this consistent way.

Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-10-23 22:53:17 +03:00

26 lines
619 B
C++

/* SPDX-License-Identifier: LGPL-2.1-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() = default;
virtual int configure(const libcamera::StreamConfiguration &cfg) = 0;
virtual int encode(const libcamera::FrameBuffer &source,
libcamera::Span<uint8_t> destination,
libcamera::Span<const uint8_t> exifData) = 0;
};
#endif /* __ANDROID_JPEG_ENCODER_H__ */