[libcamera-devel] [PATCH v2 2/8] utils: ipc: proxy: Process pending messages

Jacopo Mondi jacopo at jmondi.org
Sat Mar 13 10:28:01 CET 2021


Hi Kieran

On Fri, Mar 12, 2021 at 05:47:21AM +0000, Kieran Bingham wrote:
> From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> Events may be queued to the pipeline handler between the pipeline
> handler entering the ::stop() function, and before the call to stop the
> IPA has completed.
>
> Handle these events by dispatching all pending messages at the proxy
> after the IPA has fully stopped.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>

Thanks
  j

> ---
>  utils/ipc/generators/libcamera_templates/proxy_functions.tmpl | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl b/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl
> index 13dc8fdcab6e..8addc2fad0a8 100644
> --- a/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl
> +++ b/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl
> @@ -31,6 +31,8 @@
>  	thread_.exit();
>  	thread_.wait();
>
> +	Thread::current()->dispatchMessages(Message::Type::InvokeMessage);
> +
>  	running_ = false;
>  {%- endmacro -%}
>
> --
> 2.25.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list