summaryrefslogtreecommitdiff
path: root/src/android/camera_stream.h
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2020-10-21 10:39:55 +0900
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-21 11:18:12 +0100
commitbb27fbf253ecbcba9046bc69b94a2c0152137aad (patch)
tree0544a6f175e31d9064108bb4c47683329a89dcbe /src/android/camera_stream.h
parent79bca4300b6582fe018967e8483eb584583d2a96 (diff)
android: camera_stream: Make some member variables constant
CameraStream initializes several member variables in the initializer list. Some of them are unchanged after. This makes them constant. Especially, doing to |cameraDevice_| represents CameraStream doesn't have the ownership of it. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-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: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/android/camera_stream.h')
-rw-r--r--src/android/camera_stream.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h
index c367a5f9..cc9d5470 100644
--- a/src/android/camera_stream.h
+++ b/src/android/camera_stream.h
@@ -109,7 +109,7 @@ public:
Internal,
Mapped,
};
- CameraStream(CameraDevice *cameraDevice, Type type,
+ CameraStream(CameraDevice *const cameraDevice, Type type,
camera3_stream_t *camera3Stream, unsigned int index);
Type type() const { return type_; }
@@ -124,11 +124,11 @@ public:
void putBuffer(libcamera::FrameBuffer *buffer);
private:
- CameraDevice *cameraDevice_;
- libcamera::CameraConfiguration *config_;
- Type type_;
+ CameraDevice *const cameraDevice_;
+ const libcamera::CameraConfiguration *config_;
+ const Type type_;
camera3_stream_t *camera3Stream_;
- unsigned int index_;
+ const unsigned int index_;
std::unique_ptr<libcamera::FrameBufferAllocator> allocator_;
std::vector<libcamera::FrameBuffer *> buffers_;