[libcamera-devel] [PATCH 3/5] android: camera_device: Make abortRequest() take a const
Hirokazu Honda
hiroh at chromium.org
Mon Sep 6 16:27:58 CEST 2021
Hi Jacopo, thank you for the patch.
On Mon, Sep 6, 2021 at 11:01 PM Jacopo Mondi <jacopo at jmondi.org> wrote:
>
> The CameraDevice::abortRequest() function should operate on const
> pointers.
>
> Fix that.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
> src/android/camera_device.cpp | 2 +-
> src/android/camera_device.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 30c173a69720..a0ea138d9499 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -845,7 +845,7 @@ int CameraDevice::processControls(Camera3RequestDescriptor *descriptor)
> return 0;
> }
>
> -void CameraDevice::abortRequest(camera3_capture_request_t *request)
> +void CameraDevice::abortRequest(const camera3_capture_request_t *request)
> {
> notifyError(request->frame_number, nullptr, CAMERA3_MSG_ERROR_REQUEST);
Is it possible to make this const reference?
-Hiro
>
> diff --git a/src/android/camera_device.h b/src/android/camera_device.h
> index a55769272651..54c4cb9ab499 100644
> --- a/src/android/camera_device.h
> +++ b/src/android/camera_device.h
> @@ -96,7 +96,7 @@ private:
> libcamera::FrameBuffer *createFrameBuffer(const buffer_handle_t camera3buffer,
> libcamera::PixelFormat pixelFormat,
> const libcamera::Size &size);
> - void abortRequest(camera3_capture_request_t *request);
> + void abortRequest(const camera3_capture_request_t *request);
> bool isValidRequest(camera3_capture_request_t *request) const;
> void notifyShutter(uint32_t frameNumber, uint64_t timestamp);
> void notifyError(uint32_t frameNumber, camera3_stream_t *stream,
> --
> 2.32.0
>
More information about the libcamera-devel
mailing list