[libcamera-devel] [PATCH v3 3/4] android: post_processor_jpeg: Make |cameraDevice_| constant
Hirokazu Honda
hiroh at chromium.org
Wed Oct 21 03:39:54 CEST 2020
PostProcessorJpeg doesn't have the ownership of CameraDevice given
in the constructor. To clarify it, this makes the member variable
constant.
Signed-off-by: Hirokazu Honda <hiroh at chromium.org>
Reviewed-by: Umang Jain <email at uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/android/jpeg/post_processor_jpeg.cpp | 2 +-
src/android/jpeg/post_processor_jpeg.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/android/jpeg/post_processor_jpeg.cpp b/src/android/jpeg/post_processor_jpeg.cpp
index 8b01bd6..fd1c7be 100644
--- a/src/android/jpeg/post_processor_jpeg.cpp
+++ b/src/android/jpeg/post_processor_jpeg.cpp
@@ -20,7 +20,7 @@ using namespace libcamera;
LOG_DEFINE_CATEGORY(JPEG)
-PostProcessorJpeg::PostProcessorJpeg(CameraDevice *device)
+PostProcessorJpeg::PostProcessorJpeg(CameraDevice *const device)
: cameraDevice_(device)
{
}
diff --git a/src/android/jpeg/post_processor_jpeg.h b/src/android/jpeg/post_processor_jpeg.h
index ae636ff..3706cec 100644
--- a/src/android/jpeg/post_processor_jpeg.h
+++ b/src/android/jpeg/post_processor_jpeg.h
@@ -19,7 +19,7 @@ class CameraDevice;
class PostProcessorJpeg : public PostProcessor
{
public:
- PostProcessorJpeg(CameraDevice *device);
+ PostProcessorJpeg(CameraDevice *const device);
int configure(const libcamera::StreamConfiguration &incfg,
const libcamera::StreamConfiguration &outcfg) override;
@@ -28,7 +28,7 @@ public:
CameraMetadata *metadata) override;
private:
- CameraDevice *cameraDevice_;
+ CameraDevice *const cameraDevice_;
std::unique_ptr<Encoder> encoder_;
libcamera::Size streamSize_;
};
--
2.29.0.rc1.297.gfa9743e501-goog
More information about the libcamera-devel
mailing list