[{"id":1617,"web_url":"https://patchwork.libcamera.org/comment/1617/","msgid":"<20190518164641.GH25081@bigcity.dyn.berto.se>","date":"2019-05-18T16:46:42","subject":"Re: [libcamera-devel] [PATCH/RFC 06/12] libcamera: pipeline: Move\n\tcamera data classes to the top level scope","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your work.\n\nOn 2019-05-18 02:06:15 +0300, Laurent Pinchart wrote:\n> Move the pipeline handler camera data classes, defined in the scope of\n> the respective pipeline handler class, to the top level of the libcamera\n> namespace. This prepares for the introduction of other classes that will\n> make use of them in the IPU3 and RkISP1 pipeline handlers. The UVC and\n> VIMC pipeline handlers are updated as well for consistency.\n\nNit-pick/future work:\nWhat do we think about not splitting class definition and function \nimplementations for the CameraData implementations? The classes are \ndefined in a cpp file so are there any compelling reason to split the \ntwo for small to mid size classes?\n\nIf we think a pipeline will grow to span multiple files I can see the \npoint of keeping them split, but for uvc and vimc that will be a single \nfile pipeline I think we could do without the split.\n\nWith or without this addressed,\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp     | 44 ++++++++++++------------\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 34 +++++++++---------\n>  src/libcamera/pipeline/uvcvideo.cpp      | 40 ++++++++++-----------\n>  src/libcamera/pipeline/vimc.cpp          | 40 ++++++++++-----------\n>  4 files changed, 79 insertions(+), 79 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 7c6f2d4a23be..8430e0591a41 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -145,6 +145,25 @@ public:\n>  \tImgUDevice::ImgUOutput *device_;\n>  };\n>  \n> +class IPU3CameraData : public CameraData\n> +{\n> +public:\n> +\tIPU3CameraData(PipelineHandler *pipe)\n> +\t\t: CameraData(pipe)\n> +\t{\n> +\t}\n> +\n> +\tvoid imguOutputBufferReady(Buffer *buffer);\n> +\tvoid imguInputBufferReady(Buffer *buffer);\n> +\tvoid cio2BufferReady(Buffer *buffer);\n> +\n> +\tCIO2Device cio2_;\n> +\tImgUDevice *imgu_;\n> +\n> +\tIPU3Stream outStream_;\n> +\tIPU3Stream vfStream_;\n> +};\n> +\n>  class PipelineHandlerIPU3 : public PipelineHandler\n>  {\n>  public:\n> @@ -167,25 +186,6 @@ public:\n>  \tbool match(DeviceEnumerator *enumerator) override;\n>  \n>  private:\n> -\tclass IPU3CameraData : public CameraData\n> -\t{\n> -\tpublic:\n> -\t\tIPU3CameraData(PipelineHandler *pipe)\n> -\t\t\t: CameraData(pipe)\n> -\t\t{\n> -\t\t}\n> -\n> -\t\tvoid imguOutputBufferReady(Buffer *buffer);\n> -\t\tvoid imguInputBufferReady(Buffer *buffer);\n> -\t\tvoid cio2BufferReady(Buffer *buffer);\n> -\n> -\t\tCIO2Device cio2_;\n> -\t\tImgUDevice *imgu_;\n> -\n> -\t\tIPU3Stream outStream_;\n> -\t\tIPU3Stream vfStream_;\n> -\t};\n> -\n>  \tstatic constexpr unsigned int IPU3_BUFFER_COUNT = 4;\n>  \n>  \tIPU3CameraData *cameraData(const Camera *camera)\n> @@ -749,7 +749,7 @@ int PipelineHandlerIPU3::registerCameras()\n>   * Buffers completed from the ImgU input are immediately queued back to the\n>   * CIO2 unit to continue frame capture.\n>   */\n> -void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer)\n> +void IPU3CameraData::imguInputBufferReady(Buffer *buffer)\n>  {\n>  \tcio2_.output_->queueBuffer(buffer);\n>  }\n> @@ -760,7 +760,7 @@ void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer)\n>   *\n>   * Buffers completed from the ImgU output are directed to the application.\n>   */\n> -void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer)\n> +void IPU3CameraData::imguOutputBufferReady(Buffer *buffer)\n>  {\n>  \tRequest *request = buffer->request();\n>  \n> @@ -785,7 +785,7 @@ void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer)\n>   * Buffers completed from the CIO2 are immediately queued to the ImgU unit\n>   * for further processing.\n>   */\n> -void PipelineHandlerIPU3::IPU3CameraData::cio2BufferReady(Buffer *buffer)\n> +void IPU3CameraData::cio2BufferReady(Buffer *buffer)\n>  {\n>  \timgu_->input_->queueBuffer(buffer);\n>  }\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index c3b3912c96f3..ec590a382751 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -28,6 +28,23 @@ namespace libcamera {\n>  \n>  LOG_DEFINE_CATEGORY(RkISP1)\n>  \n> +class RkISP1CameraData : public CameraData\n> +{\n> +public:\n> +\tRkISP1CameraData(PipelineHandler *pipe)\n> +\t\t: CameraData(pipe), sensor_(nullptr)\n> +\t{\n> +\t}\n> +\n> +\t~RkISP1CameraData()\n> +\t{\n> +\t\tdelete sensor_;\n> +\t}\n> +\n> +\tStream stream_;\n> +\tCameraSensor *sensor_;\n> +};\n> +\n>  class PipelineHandlerRkISP1 : public PipelineHandler\n>  {\n>  public:\n> @@ -51,23 +68,6 @@ public:\n>  \tbool match(DeviceEnumerator *enumerator) override;\n>  \n>  private:\n> -\tclass RkISP1CameraData : public CameraData\n> -\t{\n> -\tpublic:\n> -\t\tRkISP1CameraData(PipelineHandler *pipe)\n> -\t\t\t: CameraData(pipe), sensor_(nullptr)\n> -\t\t{\n> -\t\t}\n> -\n> -\t\t~RkISP1CameraData()\n> -\t\t{\n> -\t\t\tdelete sensor_;\n> -\t\t}\n> -\n> -\t\tStream stream_;\n> -\t\tCameraSensor *sensor_;\n> -\t};\n> -\n>  \tstatic constexpr unsigned int RKISP1_BUFFER_COUNT = 4;\n>  \n>  \tRkISP1CameraData *cameraData(const Camera *camera)\n> diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n> index 5c061ca61016..c20467766ed0 100644\n> --- a/src/libcamera/pipeline/uvcvideo.cpp\n> +++ b/src/libcamera/pipeline/uvcvideo.cpp\n> @@ -20,6 +20,25 @@ namespace libcamera {\n>  \n>  LOG_DEFINE_CATEGORY(UVC)\n>  \n> +class UVCCameraData : public CameraData\n> +{\n> +public:\n> +\tUVCCameraData(PipelineHandler *pipe)\n> +\t\t: CameraData(pipe), video_(nullptr)\n> +\t{\n> +\t}\n> +\n> +\t~UVCCameraData()\n> +\t{\n> +\t\tdelete video_;\n> +\t}\n> +\n> +\tvoid bufferReady(Buffer *buffer);\n> +\n> +\tV4L2Device *video_;\n> +\tStream stream_;\n> +};\n> +\n>  class PipelineHandlerUVC : public PipelineHandler\n>  {\n>  public:\n> @@ -42,25 +61,6 @@ public:\n>  \tbool match(DeviceEnumerator *enumerator) override;\n>  \n>  private:\n> -\tclass UVCCameraData : public CameraData\n> -\t{\n> -\tpublic:\n> -\t\tUVCCameraData(PipelineHandler *pipe)\n> -\t\t\t: CameraData(pipe), video_(nullptr)\n> -\t\t{\n> -\t\t}\n> -\n> -\t\t~UVCCameraData()\n> -\t\t{\n> -\t\t\tdelete video_;\n> -\t\t}\n> -\n> -\t\tvoid bufferReady(Buffer *buffer);\n> -\n> -\t\tV4L2Device *video_;\n> -\t\tStream stream_;\n> -\t};\n> -\n>  \tUVCCameraData *cameraData(const Camera *camera)\n>  \t{\n>  \t\treturn static_cast<UVCCameraData *>(\n> @@ -206,7 +206,7 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)\n>  \treturn true;\n>  }\n>  \n> -void PipelineHandlerUVC::UVCCameraData::bufferReady(Buffer *buffer)\n> +void UVCCameraData::bufferReady(Buffer *buffer)\n>  {\n>  \tRequest *request = queuedRequests_.front();\n>  \n> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> index 0ece97f09e7e..5575880cdbdf 100644\n> --- a/src/libcamera/pipeline/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc.cpp\n> @@ -20,6 +20,25 @@ namespace libcamera {\n>  \n>  LOG_DEFINE_CATEGORY(VIMC)\n>  \n> +class VimcCameraData : public CameraData\n> +{\n> +public:\n> +\tVimcCameraData(PipelineHandler *pipe)\n> +\t\t: CameraData(pipe)\n> +\t{\n> +\t}\n> +\n> +\t~VimcCameraData()\n> +\t{\n> +\t\tdelete video_;\n> +\t}\n> +\n> +\tvoid bufferReady(Buffer *buffer);\n> +\n> +\tV4L2Device *video_;\n> +\tStream stream_;\n> +};\n> +\n>  class PipelineHandlerVimc : public PipelineHandler\n>  {\n>  public:\n> @@ -42,25 +61,6 @@ public:\n>  \tbool match(DeviceEnumerator *enumerator) override;\n>  \n>  private:\n> -\tclass VimcCameraData : public CameraData\n> -\t{\n> -\tpublic:\n> -\t\tVimcCameraData(PipelineHandler *pipe)\n> -\t\t\t: CameraData(pipe)\n> -\t\t{\n> -\t\t}\n> -\n> -\t\t~VimcCameraData()\n> -\t\t{\n> -\t\t\tdelete video_;\n> -\t\t}\n> -\n> -\t\tvoid bufferReady(Buffer *buffer);\n> -\n> -\t\tV4L2Device *video_;\n> -\t\tStream stream_;\n> -\t};\n> -\n>  \tVimcCameraData *cameraData(const Camera *camera)\n>  \t{\n>  \t\treturn static_cast<VimcCameraData *>(\n> @@ -202,7 +202,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)\n>  \treturn true;\n>  }\n>  \n> -void PipelineHandlerVimc::VimcCameraData::bufferReady(Buffer *buffer)\n> +void VimcCameraData::bufferReady(Buffer *buffer)\n>  {\n>  \tRequest *request = queuedRequests_.front();\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x242.google.com (mail-lj1-x242.google.com\n\t[IPv6:2a00:1450:4864:20::242])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 153C360C02\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 18 May 2019 18:46:44 +0200 (CEST)","by mail-lj1-x242.google.com with SMTP id w1so8949450ljw.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 18 May 2019 09:46:44 -0700 (PDT)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\tp16sm2040767lfp.2.2019.05.18.09.46.42\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSat, 18 May 2019 09:46:42 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=u2qzzQjkmVqnegdLLmDx+58/vFbH/gEu2rjZyZNOl38=;\n\tb=XyiY/WJHl3kb1wAodtpATI9809Hy8vqGgkv6bcdMHX78b+74UmHDDMW1jLEgxx00y0\n\tdAdbOhcPFipBwjzsdUy5+ydRnowdqRqe89w+J6jPDRcSHyW5J5N4TFHrEgU5rUux2o2K\n\tC3w4XWzs2FCENb0CRqBvF5ZZwVAMctjwaZS6Obc+7EgpqEfmRPmRBrHm9UWim+gTrJB7\n\tfAhuLKCtjtJJ8Cv8TN1Zlah6pCnKRy4UQuwsXNVD/9vtT1yTYXX1eWkTzvkj19cdWnmw\n\tAR5Sz6ShVIdjiQKf8+NWksK/ACv5ahfvIUsv9khv/AbfGvRUEsYk+K7vSmW5hxZLWk/I\n\tA4bA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=u2qzzQjkmVqnegdLLmDx+58/vFbH/gEu2rjZyZNOl38=;\n\tb=MIC6z2/9vmiKDhimHI+dXL+SH2obsYhggvFd7ErsSloV9DPGNrkxu0Rz3C/PT9ZThY\n\tILM6AO21uWWEfBRn1yU117TNc0ref3agyghecV/iudmh+nu6lYIWm44gci/diGuYUWHN\n\tN3EEwXnUI2qSGxif4N+XYzwWhVQ6CP1cXrNFBGvs9s9uae81H8fydRBLZjGnmvlHzsCV\n\tpzNPaoBAON+XJzgrYvJpBlmmR9UmK8BTO1dyYJS909WnGxJOs0iHfic+3YQDS2pZwiZq\n\teyvyihRRIn7bhGjHLXLmKWs6jXiCXfvWT2gBN1JBUnEQDX7O7We2vfLv2oBZuIP0rMHs\n\tZOgg==","X-Gm-Message-State":"APjAAAUpHB92ad9jq/WP8IKK5Vzg6928mke2bSG6vY8khElNyim6NrPm\n\tdVNr7t8WulCCP95QpxoZhW1caQ==","X-Google-Smtp-Source":"APXvYqyMWAKVn0p+oc7BPapamVfWKlgJ9PsNpYzY5e+fZoC9SfKGtrYehX928ZNeo/PVYiFHavo+Sg==","X-Received":"by 2002:a2e:5d4f:: with SMTP id\n\tr76mr16291328ljb.49.1558198003418; \n\tSat, 18 May 2019 09:46:43 -0700 (PDT)","Date":"Sat, 18 May 2019 18:46:42 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190518164641.GH25081@bigcity.dyn.berto.se>","References":"<20190517230621.24668-1-laurent.pinchart@ideasonboard.com>\n\t<20190517230621.24668-7-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190517230621.24668-7-laurent.pinchart@ideasonboard.com>","User-Agent":"Mutt/1.11.3 (2019-02-01)","Subject":"Re: [libcamera-devel] [PATCH/RFC 06/12] libcamera: pipeline: Move\n\tcamera data classes to the top level scope","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sat, 18 May 2019 16:46:44 -0000"}},{"id":1620,"web_url":"https://patchwork.libcamera.org/comment/1620/","msgid":"<20190518172745.GC4995@pendragon.ideasonboard.com>","date":"2019-05-18T17:27:45","subject":"Re: [libcamera-devel] [PATCH/RFC 06/12] libcamera: pipeline: Move\n\tcamera data classes to the top level scope","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nOn Sat, May 18, 2019 at 06:46:42PM +0200, Niklas Söderlund wrote:\n> On 2019-05-18 02:06:15 +0300, Laurent Pinchart wrote:\n> > Move the pipeline handler camera data classes, defined in the scope of\n> > the respective pipeline handler class, to the top level of the libcamera\n> > namespace. This prepares for the introduction of other classes that will\n> > make use of them in the IPU3 and RkISP1 pipeline handlers. The UVC and\n> > VIMC pipeline handlers are updated as well for consistency.\n> \n> Nit-pick/future work:\n> What do we think about not splitting class definition and function \n> implementations for the CameraData implementations? The classes are \n> defined in a cpp file so are there any compelling reason to split the \n> two for small to mid size classes?\n\nWhen you inline the implementation inside the class definition, the\nmethod becomes an inline from a C point of view, which means it could\nget duplicated in every call site. Furthermore, especially for the IPU3\nand RkISP1 pipeline handlers, I foresee a need to split the code in\nmultiple files at some point, so we would need to move the class\ndefinition to a header.\n\n> If we think a pipeline will grow to span multiple files I can see the \n> point of keeping them split, but for uvc and vimc that will be a single \n> file pipeline I think we could do without the split.\n\nIt's mostly the inline part that makes me prefer not inlining the\ndefinition of methods, even for UVC and VIMC.\n\n> With or without this addressed,\n> \n> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  src/libcamera/pipeline/ipu3/ipu3.cpp     | 44 ++++++++++++------------\n> >  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 34 +++++++++---------\n> >  src/libcamera/pipeline/uvcvideo.cpp      | 40 ++++++++++-----------\n> >  src/libcamera/pipeline/vimc.cpp          | 40 ++++++++++-----------\n> >  4 files changed, 79 insertions(+), 79 deletions(-)\n> > \n> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > index 7c6f2d4a23be..8430e0591a41 100644\n> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > @@ -145,6 +145,25 @@ public:\n> >  \tImgUDevice::ImgUOutput *device_;\n> >  };\n> >  \n> > +class IPU3CameraData : public CameraData\n> > +{\n> > +public:\n> > +\tIPU3CameraData(PipelineHandler *pipe)\n> > +\t\t: CameraData(pipe)\n> > +\t{\n> > +\t}\n> > +\n> > +\tvoid imguOutputBufferReady(Buffer *buffer);\n> > +\tvoid imguInputBufferReady(Buffer *buffer);\n> > +\tvoid cio2BufferReady(Buffer *buffer);\n> > +\n> > +\tCIO2Device cio2_;\n> > +\tImgUDevice *imgu_;\n> > +\n> > +\tIPU3Stream outStream_;\n> > +\tIPU3Stream vfStream_;\n> > +};\n> > +\n> >  class PipelineHandlerIPU3 : public PipelineHandler\n> >  {\n> >  public:\n> > @@ -167,25 +186,6 @@ public:\n> >  \tbool match(DeviceEnumerator *enumerator) override;\n> >  \n> >  private:\n> > -\tclass IPU3CameraData : public CameraData\n> > -\t{\n> > -\tpublic:\n> > -\t\tIPU3CameraData(PipelineHandler *pipe)\n> > -\t\t\t: CameraData(pipe)\n> > -\t\t{\n> > -\t\t}\n> > -\n> > -\t\tvoid imguOutputBufferReady(Buffer *buffer);\n> > -\t\tvoid imguInputBufferReady(Buffer *buffer);\n> > -\t\tvoid cio2BufferReady(Buffer *buffer);\n> > -\n> > -\t\tCIO2Device cio2_;\n> > -\t\tImgUDevice *imgu_;\n> > -\n> > -\t\tIPU3Stream outStream_;\n> > -\t\tIPU3Stream vfStream_;\n> > -\t};\n> > -\n> >  \tstatic constexpr unsigned int IPU3_BUFFER_COUNT = 4;\n> >  \n> >  \tIPU3CameraData *cameraData(const Camera *camera)\n> > @@ -749,7 +749,7 @@ int PipelineHandlerIPU3::registerCameras()\n> >   * Buffers completed from the ImgU input are immediately queued back to the\n> >   * CIO2 unit to continue frame capture.\n> >   */\n> > -void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer)\n> > +void IPU3CameraData::imguInputBufferReady(Buffer *buffer)\n> >  {\n> >  \tcio2_.output_->queueBuffer(buffer);\n> >  }\n> > @@ -760,7 +760,7 @@ void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer)\n> >   *\n> >   * Buffers completed from the ImgU output are directed to the application.\n> >   */\n> > -void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer)\n> > +void IPU3CameraData::imguOutputBufferReady(Buffer *buffer)\n> >  {\n> >  \tRequest *request = buffer->request();\n> >  \n> > @@ -785,7 +785,7 @@ void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer)\n> >   * Buffers completed from the CIO2 are immediately queued to the ImgU unit\n> >   * for further processing.\n> >   */\n> > -void PipelineHandlerIPU3::IPU3CameraData::cio2BufferReady(Buffer *buffer)\n> > +void IPU3CameraData::cio2BufferReady(Buffer *buffer)\n> >  {\n> >  \timgu_->input_->queueBuffer(buffer);\n> >  }\n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > index c3b3912c96f3..ec590a382751 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > @@ -28,6 +28,23 @@ namespace libcamera {\n> >  \n> >  LOG_DEFINE_CATEGORY(RkISP1)\n> >  \n> > +class RkISP1CameraData : public CameraData\n> > +{\n> > +public:\n> > +\tRkISP1CameraData(PipelineHandler *pipe)\n> > +\t\t: CameraData(pipe), sensor_(nullptr)\n> > +\t{\n> > +\t}\n> > +\n> > +\t~RkISP1CameraData()\n> > +\t{\n> > +\t\tdelete sensor_;\n> > +\t}\n> > +\n> > +\tStream stream_;\n> > +\tCameraSensor *sensor_;\n> > +};\n> > +\n> >  class PipelineHandlerRkISP1 : public PipelineHandler\n> >  {\n> >  public:\n> > @@ -51,23 +68,6 @@ public:\n> >  \tbool match(DeviceEnumerator *enumerator) override;\n> >  \n> >  private:\n> > -\tclass RkISP1CameraData : public CameraData\n> > -\t{\n> > -\tpublic:\n> > -\t\tRkISP1CameraData(PipelineHandler *pipe)\n> > -\t\t\t: CameraData(pipe), sensor_(nullptr)\n> > -\t\t{\n> > -\t\t}\n> > -\n> > -\t\t~RkISP1CameraData()\n> > -\t\t{\n> > -\t\t\tdelete sensor_;\n> > -\t\t}\n> > -\n> > -\t\tStream stream_;\n> > -\t\tCameraSensor *sensor_;\n> > -\t};\n> > -\n> >  \tstatic constexpr unsigned int RKISP1_BUFFER_COUNT = 4;\n> >  \n> >  \tRkISP1CameraData *cameraData(const Camera *camera)\n> > diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n> > index 5c061ca61016..c20467766ed0 100644\n> > --- a/src/libcamera/pipeline/uvcvideo.cpp\n> > +++ b/src/libcamera/pipeline/uvcvideo.cpp\n> > @@ -20,6 +20,25 @@ namespace libcamera {\n> >  \n> >  LOG_DEFINE_CATEGORY(UVC)\n> >  \n> > +class UVCCameraData : public CameraData\n> > +{\n> > +public:\n> > +\tUVCCameraData(PipelineHandler *pipe)\n> > +\t\t: CameraData(pipe), video_(nullptr)\n> > +\t{\n> > +\t}\n> > +\n> > +\t~UVCCameraData()\n> > +\t{\n> > +\t\tdelete video_;\n> > +\t}\n> > +\n> > +\tvoid bufferReady(Buffer *buffer);\n> > +\n> > +\tV4L2Device *video_;\n> > +\tStream stream_;\n> > +};\n> > +\n> >  class PipelineHandlerUVC : public PipelineHandler\n> >  {\n> >  public:\n> > @@ -42,25 +61,6 @@ public:\n> >  \tbool match(DeviceEnumerator *enumerator) override;\n> >  \n> >  private:\n> > -\tclass UVCCameraData : public CameraData\n> > -\t{\n> > -\tpublic:\n> > -\t\tUVCCameraData(PipelineHandler *pipe)\n> > -\t\t\t: CameraData(pipe), video_(nullptr)\n> > -\t\t{\n> > -\t\t}\n> > -\n> > -\t\t~UVCCameraData()\n> > -\t\t{\n> > -\t\t\tdelete video_;\n> > -\t\t}\n> > -\n> > -\t\tvoid bufferReady(Buffer *buffer);\n> > -\n> > -\t\tV4L2Device *video_;\n> > -\t\tStream stream_;\n> > -\t};\n> > -\n> >  \tUVCCameraData *cameraData(const Camera *camera)\n> >  \t{\n> >  \t\treturn static_cast<UVCCameraData *>(\n> > @@ -206,7 +206,7 @@ bool PipelineHandlerUVC::match(DeviceEnumerator *enumerator)\n> >  \treturn true;\n> >  }\n> >  \n> > -void PipelineHandlerUVC::UVCCameraData::bufferReady(Buffer *buffer)\n> > +void UVCCameraData::bufferReady(Buffer *buffer)\n> >  {\n> >  \tRequest *request = queuedRequests_.front();\n> >  \n> > diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> > index 0ece97f09e7e..5575880cdbdf 100644\n> > --- a/src/libcamera/pipeline/vimc.cpp\n> > +++ b/src/libcamera/pipeline/vimc.cpp\n> > @@ -20,6 +20,25 @@ namespace libcamera {\n> >  \n> >  LOG_DEFINE_CATEGORY(VIMC)\n> >  \n> > +class VimcCameraData : public CameraData\n> > +{\n> > +public:\n> > +\tVimcCameraData(PipelineHandler *pipe)\n> > +\t\t: CameraData(pipe)\n> > +\t{\n> > +\t}\n> > +\n> > +\t~VimcCameraData()\n> > +\t{\n> > +\t\tdelete video_;\n> > +\t}\n> > +\n> > +\tvoid bufferReady(Buffer *buffer);\n> > +\n> > +\tV4L2Device *video_;\n> > +\tStream stream_;\n> > +};\n> > +\n> >  class PipelineHandlerVimc : public PipelineHandler\n> >  {\n> >  public:\n> > @@ -42,25 +61,6 @@ public:\n> >  \tbool match(DeviceEnumerator *enumerator) override;\n> >  \n> >  private:\n> > -\tclass VimcCameraData : public CameraData\n> > -\t{\n> > -\tpublic:\n> > -\t\tVimcCameraData(PipelineHandler *pipe)\n> > -\t\t\t: CameraData(pipe)\n> > -\t\t{\n> > -\t\t}\n> > -\n> > -\t\t~VimcCameraData()\n> > -\t\t{\n> > -\t\t\tdelete video_;\n> > -\t\t}\n> > -\n> > -\t\tvoid bufferReady(Buffer *buffer);\n> > -\n> > -\t\tV4L2Device *video_;\n> > -\t\tStream stream_;\n> > -\t};\n> > -\n> >  \tVimcCameraData *cameraData(const Camera *camera)\n> >  \t{\n> >  \t\treturn static_cast<VimcCameraData *>(\n> > @@ -202,7 +202,7 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)\n> >  \treturn true;\n> >  }\n> >  \n> > -void PipelineHandlerVimc::VimcCameraData::bufferReady(Buffer *buffer)\n> > +void VimcCameraData::bufferReady(Buffer *buffer)\n> >  {\n> >  \tRequest *request = queuedRequests_.front();\n> >  \n> > -- \n> > Regards,\n> > \n> > Laurent Pinchart\n> > \n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel\n> \n> -- \n> Regards,\n> Niklas Söderlund","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1BC7C60C02\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 18 May 2019 19:28:02 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 20B11D5;\n\tSat, 18 May 2019 19:28:01 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1558200481;\n\tbh=iGiWkUzO26TuOF+5aGjkKo1R1c8wV4jq/m1ipHlQ2a8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=cIjZ1SLipxFwStPPlsCk1oIazmbv3SCOZGjDTk9XDv5tsza0CBRrRA+YrjiIGfKcI\n\trlpniwbHXmQwByQmwy5qI84fyvGFld42f8bXSxl4qepaoAMWjwlSVClsXxVBsyhQSj\n\tqlDvdz9GCl9bm2jLNmn+WYd77y/WBw5s2wTVT+Gs=","Date":"Sat, 18 May 2019 20:27:45 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190518172745.GC4995@pendragon.ideasonboard.com>","References":"<20190517230621.24668-1-laurent.pinchart@ideasonboard.com>\n\t<20190517230621.24668-7-laurent.pinchart@ideasonboard.com>\n\t<20190518164641.GH25081@bigcity.dyn.berto.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190518164641.GH25081@bigcity.dyn.berto.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH/RFC 06/12] libcamera: pipeline: Move\n\tcamera data classes to the top level scope","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sat, 18 May 2019 17:28:02 -0000"}}]