guides: pipeline-handler: Fix controlInfo_ initialization
diff mbox series

Message ID 20240301101135.18822-1-jacopo.mondi@ideasonboard.com
State Accepted
Commit 1bf2d707e4becb51fc04ccdb0a8032290ec81fdb
Headers show
Series
  • guides: pipeline-handler: Fix controlInfo_ initialization
Related show

Commit Message

Jacopo Mondi March 1, 2024, 10:11 a.m. UTC
Since commit b48db3c489d3 ("libcamera: controls: Create ControlInfoMap
with ControlIdMap"), instances of the ControlInfoMap class need to be
created with an instance of an unordered_map of ControlId to ControlInfo
and with a ControlIdMap instance.

The pipeline handler developer guide was never updated to reflect the
change. Fix it.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
 Documentation/guides/pipeline-handler.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Umang Jain March 1, 2024, 10:39 a.m. UTC | #1
Hi Jacopo,

Thank you for the patch

On 01/03/24 3:41 pm, Jacopo Mondi wrote:
> Since commit b48db3c489d3 ("libcamera: controls: Create ControlInfoMap
> with ControlIdMap"), instances of the ControlInfoMap class need to be
> created with an instance of an unordered_map of ControlId to ControlInfo
> and with a ControlIdMap instance.
>
> The pipeline handler developer guide was never updated to reflect the
> change. Fix it.
>
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

LGTM,

Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>

> ---
>   Documentation/guides/pipeline-handler.rst | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
> index 10b9c75c2a7f..5396eb6d0c56 100644
> --- a/Documentation/guides/pipeline-handler.rst
> +++ b/Documentation/guides/pipeline-handler.rst
> @@ -651,7 +651,7 @@ inline in our VividCameraData init:
>              ctrls.emplace(id, info);
>      }
>   
> -   controlInfo_ = std::move(ctrls);
> +   controlInfo_ = ControlInfoMap(std::move(ctrls), controls::controls);
>   
>   The ``properties_`` field is  a list of ``ControlId`` instances
>   associated with immutable values, which represent static characteristics that can
Laurent Pinchart March 1, 2024, 10:48 a.m. UTC | #2
On Fri, Mar 01, 2024 at 11:11:35AM +0100, Jacopo Mondi wrote:
> Since commit b48db3c489d3 ("libcamera: controls: Create ControlInfoMap
> with ControlIdMap"), instances of the ControlInfoMap class need to be
> created with an instance of an unordered_map of ControlId to ControlInfo
> and with a ControlIdMap instance.
> 
> The pipeline handler developer guide was never updated to reflect the
> change. Fix it.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  Documentation/guides/pipeline-handler.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
> index 10b9c75c2a7f..5396eb6d0c56 100644
> --- a/Documentation/guides/pipeline-handler.rst
> +++ b/Documentation/guides/pipeline-handler.rst
> @@ -651,7 +651,7 @@ inline in our VividCameraData init:
>             ctrls.emplace(id, info);
>     }
>  
> -   controlInfo_ = std::move(ctrls);
> +   controlInfo_ = ControlInfoMap(std::move(ctrls), controls::controls);
>  
>  The ``properties_`` field is  a list of ``ControlId`` instances
>  associated with immutable values, which represent static characteristics that can

Patch
diff mbox series

diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
index 10b9c75c2a7f..5396eb6d0c56 100644
--- a/Documentation/guides/pipeline-handler.rst
+++ b/Documentation/guides/pipeline-handler.rst
@@ -651,7 +651,7 @@  inline in our VividCameraData init:
            ctrls.emplace(id, info);
    }
 
-   controlInfo_ = std::move(ctrls);
+   controlInfo_ = ControlInfoMap(std::move(ctrls), controls::controls);
 
 The ``properties_`` field is  a list of ``ControlId`` instances
 associated with immutable values, which represent static characteristics that can