[libcamera-devel,v2,2/3] libcamera: pipelines: add log category for each pipeline

Message ID 20190125143951.27992-3-niklas.soderlund@ragnatech.se
State Superseded
Delegated to: Niklas Söderlund
Headers show
Series
  • libcamera: pipeline: uvcvideo: attach to a V4L2Device
Related show

Commit Message

Niklas Söderlund Jan. 25, 2019, 2:39 p.m. UTC
The VIMC and UVC pipeline handlers lacked a dedicated log category.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 src/libcamera/pipeline/uvcvideo.cpp | 3 +++
 src/libcamera/pipeline/vimc.cpp     | 3 +++
 2 files changed, 6 insertions(+)

Comments

Laurent Pinchart Jan. 25, 2019, 2:48 p.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Fri, Jan 25, 2019 at 03:39:50PM +0100, Niklas Söderlund wrote:
> The VIMC and UVC pipeline handlers lacked a dedicated log category.

This doesn't really require a separate patch, you can define the
categories in the first patch that makes use of them.

> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> ---
>  src/libcamera/pipeline/uvcvideo.cpp | 3 +++
>  src/libcamera/pipeline/vimc.cpp     | 3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp
> index 5de8a0cb9c3406a8..1a445edfa8df777c 100644
> --- a/src/libcamera/pipeline/uvcvideo.cpp
> +++ b/src/libcamera/pipeline/uvcvideo.cpp
> @@ -8,11 +8,14 @@
>  #include <libcamera/camera.h>
>  
>  #include "device_enumerator.h"
> +#include "log.h"
>  #include "media_device.h"
>  #include "pipeline_handler.h"
>  
>  namespace libcamera {
>  
> +LOG_DEFINE_CATEGORY(UVC)
> +
>  class PipelineHandlerUVC : public PipelineHandler
>  {
>  public:
> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
> index f58a97d51619515d..32b35626306bbce9 100644
> --- a/src/libcamera/pipeline/vimc.cpp
> +++ b/src/libcamera/pipeline/vimc.cpp
> @@ -8,11 +8,14 @@
>  #include <libcamera/camera.h>
>  
>  #include "device_enumerator.h"
> +#include "log.h"
>  #include "media_device.h"
>  #include "pipeline_handler.h"
>  
>  namespace libcamera {
>  
> +LOG_DEFINE_CATEGORY(VIMC)
> +
>  class PipeHandlerVimc : public PipelineHandler
>  {
>  public:

Patch

diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp
index 5de8a0cb9c3406a8..1a445edfa8df777c 100644
--- a/src/libcamera/pipeline/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo.cpp
@@ -8,11 +8,14 @@ 
 #include <libcamera/camera.h>
 
 #include "device_enumerator.h"
+#include "log.h"
 #include "media_device.h"
 #include "pipeline_handler.h"
 
 namespace libcamera {
 
+LOG_DEFINE_CATEGORY(UVC)
+
 class PipelineHandlerUVC : public PipelineHandler
 {
 public:
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
index f58a97d51619515d..32b35626306bbce9 100644
--- a/src/libcamera/pipeline/vimc.cpp
+++ b/src/libcamera/pipeline/vimc.cpp
@@ -8,11 +8,14 @@ 
 #include <libcamera/camera.h>
 
 #include "device_enumerator.h"
+#include "log.h"
 #include "media_device.h"
 #include "pipeline_handler.h"
 
 namespace libcamera {
 
+LOG_DEFINE_CATEGORY(VIMC)
+
 class PipeHandlerVimc : public PipelineHandler
 {
 public: