[libcamera-devel] [PATCH] fixup! android: post_processor: Make post processing async

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Oct 21 02:44:51 CEST 2021


Hi Umang,

Thank you for the patch.

On Wed, Oct 20, 2021 at 06:25:40PM +0530, Umang Jain wrote:
> Fix build with gcc 7
> error: missing initializer for member ‘Camera3RequestDescriptor::StreamBuffer::srcBuffer’ [-Werror=missing-field-initializers]
> error: missing initializer for member ‘Camera3RequestDescriptor::StreamBuffer::destBuffer’ [-Werror=missing-field-initializers]
> 
> Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
> ---
>  src/android/camera_request.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/android/camera_request.h b/src/android/camera_request.h
> index 85274414..2216781d 100644
> --- a/src/android/camera_request.h
> +++ b/src/android/camera_request.h
> @@ -40,8 +40,8 @@ public:
>  		int fence;
>  		Status status;
>  		libcamera::FrameBuffer *internalBuffer = nullptr;
> -		std::unique_ptr<CameraBuffer> destBuffer;
> -		const libcamera::FrameBuffer *srcBuffer;
> +		std::unique_ptr<CameraBuffer> destBuffer = nullptr;
> +		const libcamera::FrameBuffer *srcBuffer = nullptr;

I don't think that's the right fix. It only works because all the
members that are not explicitly initialized in
Camera3RequestDescriptor::Camera3RequestDescriptor() are at the end, if
that wasn't the case, you'd have to modify the buffers_.push_back() call
to add all members explicitly, so I think we should do so.

The other option would be to add a constructor to this structure, taking
as arguments only the members that we expect need to be set to
non-default values at construction time.

>  		Camera3RequestDescriptor *request = nullptr;
>  	};
>  

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list