diff options
author | Hirokazu Honda <hiroh@chromium.org> | 2020-10-21 10:39:55 +0900 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-10-21 11:18:12 +0100 |
commit | bb27fbf253ecbcba9046bc69b94a2c0152137aad (patch) | |
tree | 0544a6f175e31d9064108bb4c47683329a89dcbe /src/android/camera_stream.cpp | |
parent | 79bca4300b6582fe018967e8483eb584583d2a96 (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.cpp')
-rw-r--r-- | src/android/camera_stream.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp index 3e5d6bef..dba351a4 100644 --- a/src/android/camera_stream.cpp +++ b/src/android/camera_stream.cpp @@ -38,13 +38,12 @@ LOG_DECLARE_CATEGORY(HAL) * and buffer allocation. */ -CameraStream::CameraStream(CameraDevice *cameraDevice, Type type, +CameraStream::CameraStream(CameraDevice *const cameraDevice, Type type, camera3_stream_t *camera3Stream, unsigned int index) - : cameraDevice_(cameraDevice), type_(type), + : cameraDevice_(cameraDevice), + config_(cameraDevice->cameraConfiguration()), type_(type), camera3Stream_(camera3Stream), index_(index) { - config_ = cameraDevice_->cameraConfiguration(); - if (type_ == Type::Internal || type_ == Type::Mapped) { /* * \todo There might be multiple post-processors. The logic |