[libcamera-devel,4/5] Documentation: guides: pipeline-handler: Update code, commands and logs
diff mbox series

Message ID 20210317192831.359014-5-nfraprado@collabora.com
State Accepted
Headers show
Series
  • Minor improvements to the documentation
Related show

Commit Message

Nícolas F. R. A. Prado March 17, 2021, 7:28 p.m. UTC
The pipeline-handler guide is a bit outdated:
- ControlList* in start() is now const.
- Registered pipeline handler log now comes from Camera log and the message is different.

Update the pipeline-handler guide to reflect these changes.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
 Documentation/guides/pipeline-handler.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Sebastian Fricke March 18, 2021, 5:33 a.m. UTC | #1
Hello Nícolas,

Thank you for the patch.

Reviewed-by: Sebastian Fricke <sebastian.fricke@posteo.net>

On 17.03.2021 16:28, Nícolas F. R. A. Prado wrote:
>The pipeline-handler guide is a bit outdated:
>- ControlList* in start() is now const.
>- Registered pipeline handler log now comes from Camera log and the message is different.
>
>Update the pipeline-handler guide to reflect these changes.
>
>Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>---
> Documentation/guides/pipeline-handler.rst | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
>index 43783ec32afa..bcce86793ccd 100644
>--- a/Documentation/guides/pipeline-handler.rst
>+++ b/Documentation/guides/pipeline-handler.rst
>@@ -209,7 +209,7 @@ methods for the overridden class members.
>           int exportFrameBuffers(Camera *camera, Stream *stream,
>           std::vector<std::unique_ptr<FrameBuffer>> *buffers) override;
>
>-          int start(Camera *camera, ControlList *controls) override;
>+          int start(Camera *camera, const ControlList *controls) override;
>           void stop(Camera *camera) override;
>
>           int queueRequestDevice(Camera *camera, Request *request) override;
>@@ -239,7 +239,7 @@ methods for the overridden class members.
>           return -1;
>    }
>
>-   int PipelineHandlerVivid::start(Camera *camera, ControlList *controls)
>+   int PipelineHandlerVivid::start(Camera *camera, const ControlList *controls)
>    {
>           return -1;
>    }
>@@ -303,13 +303,13 @@ new pipeline handler by running:
>
> .. code-block:: shell
>
>-   LIBCAMERA_LOG_LEVELS=Pipeline:0 ./build/src/cam/cam -l
>+   LIBCAMERA_LOG_LEVELS=Camera:0 ./build/src/cam/cam -l
>
> And you should see output like the below:
>
> .. code-block:: shell
>
>-    DEBUG Pipeline pipeline_handler.cpp:680 Registered pipeline handler "PipelineHandlerVivid"
>+    DEBUG Camera camera_manager.cpp:148 Found registered pipeline handler 'PipelineHandlerVivid'
>
> Matching devices
> ~~~~~~~~~~~~~~~~
>-- 
>2.30.2
>
>_______________________________________________
>libcamera-devel mailing list
>libcamera-devel@lists.libcamera.org
>https://lists.libcamera.org/listinfo/libcamera-devel
Laurent Pinchart March 18, 2021, 11:59 p.m. UTC | #2
Hi Nicolas,

Thank you for the patch.

On Wed, Mar 17, 2021 at 04:28:30PM -0300, Nícolas F. R. A. Prado wrote:
> The pipeline-handler guide is a bit outdated:

This was bound to happen. I wonder if there could be away to detect this
kind of issue faster, ideally in an automated way.

> - ControlList* in start() is now const.
> - Registered pipeline handler log now comes from Camera log and the message is different.
> 
> Update the pipeline-handler guide to reflect these changes.
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

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

> ---
>  Documentation/guides/pipeline-handler.rst | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
> index 43783ec32afa..bcce86793ccd 100644
> --- a/Documentation/guides/pipeline-handler.rst
> +++ b/Documentation/guides/pipeline-handler.rst
> @@ -209,7 +209,7 @@ methods for the overridden class members.
>            int exportFrameBuffers(Camera *camera, Stream *stream,
>            std::vector<std::unique_ptr<FrameBuffer>> *buffers) override;
>  
> -          int start(Camera *camera, ControlList *controls) override;
> +          int start(Camera *camera, const ControlList *controls) override;
>            void stop(Camera *camera) override;
>  
>            int queueRequestDevice(Camera *camera, Request *request) override;
> @@ -239,7 +239,7 @@ methods for the overridden class members.
>            return -1;
>     }
>  
> -   int PipelineHandlerVivid::start(Camera *camera, ControlList *controls)
> +   int PipelineHandlerVivid::start(Camera *camera, const ControlList *controls)
>     {
>            return -1;
>     }
> @@ -303,13 +303,13 @@ new pipeline handler by running:
>  
>  .. code-block:: shell
>  
> -   LIBCAMERA_LOG_LEVELS=Pipeline:0 ./build/src/cam/cam -l
> +   LIBCAMERA_LOG_LEVELS=Camera:0 ./build/src/cam/cam -l
>  
>  And you should see output like the below:
>  
>  .. code-block:: shell
>  
> -    DEBUG Pipeline pipeline_handler.cpp:680 Registered pipeline handler "PipelineHandlerVivid"
> +    DEBUG Camera camera_manager.cpp:148 Found registered pipeline handler 'PipelineHandlerVivid'
>  
>  Matching devices
>  ~~~~~~~~~~~~~~~~

Patch
diff mbox series

diff --git a/Documentation/guides/pipeline-handler.rst b/Documentation/guides/pipeline-handler.rst
index 43783ec32afa..bcce86793ccd 100644
--- a/Documentation/guides/pipeline-handler.rst
+++ b/Documentation/guides/pipeline-handler.rst
@@ -209,7 +209,7 @@  methods for the overridden class members.
           int exportFrameBuffers(Camera *camera, Stream *stream,
           std::vector<std::unique_ptr<FrameBuffer>> *buffers) override;
 
-          int start(Camera *camera, ControlList *controls) override;
+          int start(Camera *camera, const ControlList *controls) override;
           void stop(Camera *camera) override;
 
           int queueRequestDevice(Camera *camera, Request *request) override;
@@ -239,7 +239,7 @@  methods for the overridden class members.
           return -1;
    }
 
-   int PipelineHandlerVivid::start(Camera *camera, ControlList *controls)
+   int PipelineHandlerVivid::start(Camera *camera, const ControlList *controls)
    {
           return -1;
    }
@@ -303,13 +303,13 @@  new pipeline handler by running:
 
 .. code-block:: shell
 
-   LIBCAMERA_LOG_LEVELS=Pipeline:0 ./build/src/cam/cam -l
+   LIBCAMERA_LOG_LEVELS=Camera:0 ./build/src/cam/cam -l
 
 And you should see output like the below:
 
 .. code-block:: shell
 
-    DEBUG Pipeline pipeline_handler.cpp:680 Registered pipeline handler "PipelineHandlerVivid"
+    DEBUG Camera camera_manager.cpp:148 Found registered pipeline handler 'PipelineHandlerVivid'
 
 Matching devices
 ~~~~~~~~~~~~~~~~