@@ -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
@@ -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_;