[{"id":12833,"web_url":"https://patchwork.libcamera.org/comment/12833/","msgid":"<20200928224647.GV23539@pendragon.ideasonboard.com>","date":"2020-09-28T22:46:47","subject":"Re: [libcamera-devel] [PATCH v3 19/22] libcamera: pipeline: rkisp1:\n\tMove start and stop of path to RkISP1Path","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Fri, Sep 25, 2020 at 03:42:04AM +0200, Niklas Söderlund wrote:\n> Move the start and stop of a path to RkISP1Path. This allows the\n> importing of buffers to be moved closer the path start/stop simplifying\n> the code. Also by adding a simple running tracker the error logic in\n> PipelineHandlerRkISP1 can be simplified as stop() can always be called.\n> \n> This also removes all external users of RkISP1Path::video_ so it can be\n> made private.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp     | 53 ++------------------\n>  src/libcamera/pipeline/rkisp1/rkisp1path.cpp | 42 +++++++++++++++-\n>  src/libcamera/pipeline/rkisp1/rkisp1path.h   |  8 +--\n>  3 files changed, 50 insertions(+), 53 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 7dd4fb11c39dd811..6158fbee41339c32 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -770,20 +770,6 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n>  \t\tdata->selfPathStream_.configuration().bufferCount,\n>  \t});\n>  \n> -\tif (data->mainPathActive_) {\n> -\t\tret = mainPath_.video_->importBuffers(\n> -\t\t\tdata->mainPathStream_.configuration().bufferCount);\n> -\t\tif (ret < 0)\n> -\t\t\tgoto error;\n> -\t}\n> -\n> -\tif (data->selfPathActive_) {\n> -\t\tret = selfPath_.video_->importBuffers(\n> -\t\t\tdata->selfPathStream_.configuration().bufferCount);\n> -\t\tif (ret < 0)\n> -\t\t\tgoto error;\n> -\t}\n> -\n>  \tret = param_->allocateBuffers(maxCount, &paramBuffers_);\n>  \tif (ret < 0)\n>  \t\tgoto error;\n> @@ -813,8 +799,6 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n>  error:\n>  \tparamBuffers_.clear();\n>  \tstatBuffers_.clear();\n> -\tmainPath_.video_->releaseBuffers();\n> -\tselfPath_.video_->releaseBuffers();\n>  \n>  \treturn ret;\n>  }\n> @@ -845,12 +829,6 @@ int PipelineHandlerRkISP1::freeBuffers(Camera *camera)\n>  \tif (stat_->releaseBuffers())\n>  \t\tLOG(RkISP1, Error) << \"Failed to release stat buffers\";\n>  \n> -\tif (mainPath_.video_->releaseBuffers())\n> -\t\tLOG(RkISP1, Error) << \"Failed to release main path buffers\";\n> -\n> -\tif (selfPath_.video_->releaseBuffers())\n> -\t\tLOG(RkISP1, Error) << \"Failed to release self path buffers\";\n> -\n>  \treturn 0;\n>  }\n>  \n> @@ -896,15 +874,12 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n>  \tstd::map<unsigned int, IPAStream> streamConfig;\n>  \n>  \tif (data->mainPathActive_) {\n> -\t\tret = mainPath_.video_->streamOn();\n> +\t\tret = mainPath_.start();\n>  \t\tif (ret) {\n>  \t\t\tparam_->streamOff();\n>  \t\t\tstat_->streamOff();\n>  \t\t\tdata->ipa_->stop();\n>  \t\t\tfreeBuffers(camera);\n> -\n> -\t\t\tLOG(RkISP1, Error)\n> -\t\t\t\t<< \"Failed to start main path \" << camera->id();\n>  \t\t\treturn ret;\n>  \t\t}\n>  \n> @@ -915,18 +890,13 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n>  \t}\n>  \n>  \tif (data->selfPathActive_) {\n> -\t\tret = selfPath_.video_->streamOn();\n> +\t\tret = selfPath_.start();\n>  \t\tif (ret) {\n> -\t\t\tif (data->mainPathActive_)\n> -\t\t\t\tmainPath_.video_->streamOff();\n> -\n> +\t\t\tmainPath_.stop();\n>  \t\t\tparam_->streamOff();\n>  \t\t\tstat_->streamOff();\n>  \t\t\tdata->ipa_->stop();\n>  \t\t\tfreeBuffers(camera);\n> -\n> -\t\t\tLOG(RkISP1, Error)\n> -\t\t\t\t<< \"Failed to start self path \" << camera->id();\n>  \t\t\treturn ret;\n>  \t\t}\n>  \n> @@ -963,21 +933,8 @@ void PipelineHandlerRkISP1::stop(Camera *camera)\n>  \tRkISP1CameraData *data = cameraData(camera);\n>  \tint ret;\n>  \n> -\tif (data->selfPathActive_) {\n> -\t\tret = selfPath_.video_->streamOff();\n> -\t\tif (ret)\n> -\t\t\tLOG(RkISP1, Warning)\n> -\t\t\t\t<< \"Failed to stop self path for \"\n> -\t\t\t\t<< camera->id();\n> -\t}\n> -\n> -\tif (data->mainPathActive_) {\n> -\t\tret = mainPath_.video_->streamOff();\n> -\t\tif (ret)\n> -\t\t\tLOG(RkISP1, Warning)\n> -\t\t\t\t<< \"Failed to stop main path for \"\n> -\t\t\t\t<< camera->id();\n> -\t}\n> +\tselfPath_.stop();\n> +\tmainPath_.stop();\n>  \n>  \tret = stat_->streamOff();\n>  \tif (ret)\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1path.cpp\n> index 74eaa5d32388184b..b2dd669f4caf3269 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1path.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1path.cpp\n> @@ -20,9 +20,9 @@ LOG_DECLARE_CATEGORY(RkISP1)\n>  \n>  RkISP1Path::RkISP1Path(const char *name, const std::vector<PixelFormat> &formats,\n>  \t\t       const Size &minResolution, const Size &maxResolution)\n> -\t: video_(nullptr), name_(name), formats_(formats),\n> +\t: name_(name), running_(false), formats_(formats),\n>  \t  minResolution_(minResolution), maxResolution_(maxResolution),\n> -\t  resizer_(nullptr)\n> +\t  resizer_(nullptr), video_(nullptr)\n>  {\n>  }\n>  \n> @@ -155,6 +155,44 @@ int RkISP1Path::exportBuffers(unsigned int bufferCount,\n>  \treturn video_->exportBuffers(bufferCount, buffers);\n>  }\n>  \n> +int RkISP1Path::start()\n> +{\n> +\tint ret;\n> +\n> +\tif (running_)\n> +\t\treturn -EBUSY;\n> +\n> +\tret = video_->importBuffers(RKISP1_BUFFER_COUNT);\n\nThis is a functional change that needs to be documented in the commit\nmessage (the number of buffers is now hardcoded). Is it right ?\n\n> +\tif (ret)\n> +\t\treturn ret;\n> +\n> +\tret = video_->streamOn();\n> +\tif (ret) {\n> +\t\tLOG(RkISP1, Error)\n> +\t\t\t<< \"Failed to start \" << name_ << \"path\";\n\nShould it be \" path\" ? Same below.\n\n> +\n> +\t\tvideo_->releaseBuffers();\n> +\t\treturn ret;\n> +\t}\n> +\n> +\trunning_ = true;\n> +\n> +\treturn 0;\n> +}\n> +\n> +void RkISP1Path::stop()\n> +{\n> +\tif (!running_)\n> +\t\treturn;\n> +\n> +\tif (video_->streamOff())\n> +\t\tLOG(RkISP1, Warning) << \"Failed to stop \" << name_ << \"path\";\n> +\n> +\tvideo_->releaseBuffers();\n> +\n> +\trunning_ = false;\n> +}\n> +\n>  RkISP1MainPath::RkISP1MainPath()\n>  \t: RkISP1Path(\"main\",\n>  \t\t     {\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1path.h b/src/libcamera/pipeline/rkisp1/rkisp1path.h\n> index 1315b2c64feac681..9c2ecb620375683b 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1path.h\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1path.h\n> @@ -41,22 +41,24 @@ public:\n>  \tint exportBuffers(unsigned int bufferCount,\n>  \t\t\t  std::vector<std::unique_ptr<FrameBuffer>> *buffers);\n>  \n> +\tint start();\n> +\tvoid stop();\n> +\n>  \tint queueBuffer(FrameBuffer *buffer) { return video_->queueBuffer(buffer); }\n>  \tSignal<FrameBuffer *> &bufferReady() { return video_->bufferReady; }\n>  \n> -\t/* \\todo Make video private. */\n> -\tV4L2VideoDevice *video_;\n> -\n>  private:\n>  \tstatic constexpr unsigned int RKISP1_BUFFER_COUNT = 4;\n>  \n>  \tconst char *name_;\n> +\tbool running_;\n>  \n>  \tconst std::vector<PixelFormat> formats_;\n>  \tconst Size minResolution_;\n>  \tconst Size maxResolution_;\n>  \n>  \tV4L2Subdevice *resizer_;\n> +\tV4L2VideoDevice *video_;\n>  };\n>  \n>  class RkISP1MainPath : public RkISP1Path","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 76248C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Sep 2020 22:47:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 46A5B60BF7;\n\tTue, 29 Sep 2020 00:47:24 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 93BB760394\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Sep 2020 00:47:22 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2C1B7A58;\n\tTue, 29 Sep 2020 00:47:22 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"gZO330ke\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1601333242;\n\tbh=A5WI9yl50lK2BYbw8V26QCMdjqri97O6XqnLTfbWdjs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=gZO330keb45maLAa2m9386IhxHfmDNjlT4ljkC7KxK40iHhNJQLyo7AgDvQmIieH8\n\t4fq/fM6YIOcgSZ4Hvd1QBQkreWmk+yvQbXRHTEo58rv09LDVBhrw6KreiHGUwDrOGy\n\tG0FBKrSIf7XI1lmKZlFw/PiQ3RyDp6HoaxUyYe6o=","Date":"Tue, 29 Sep 2020 01:46:47 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200928224647.GV23539@pendragon.ideasonboard.com>","References":"<20200925014207.1455796-1-niklas.soderlund@ragnatech.se>\n\t<20200925014207.1455796-20-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200925014207.1455796-20-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v3 19/22] libcamera: pipeline: rkisp1:\n\tMove start and stop of path to RkISP1Path","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":12837,"web_url":"https://patchwork.libcamera.org/comment/12837/","msgid":"<20200928225753.GC1052036@oden.dyn.berto.se>","date":"2020-09-28T22:57:53","subject":"Re: [libcamera-devel] [PATCH v3 19/22] libcamera: pipeline: rkisp1:\n\tMove start and stop of path to RkISP1Path","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 feedback.\n\nOn 2020-09-29 01:46:47 +0300, Laurent Pinchart wrote:\n> Hi Niklas,\n> \n> Thank you for the patch.\n> \n> On Fri, Sep 25, 2020 at 03:42:04AM +0200, Niklas Söderlund wrote:\n> > Move the start and stop of a path to RkISP1Path. This allows the\n> > importing of buffers to be moved closer the path start/stop simplifying\n> > the code. Also by adding a simple running tracker the error logic in\n> > PipelineHandlerRkISP1 can be simplified as stop() can always be called.\n> > \n> > This also removes all external users of RkISP1Path::video_ so it can be\n> > made private.\n> > \n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > ---\n> >  src/libcamera/pipeline/rkisp1/rkisp1.cpp     | 53 ++------------------\n> >  src/libcamera/pipeline/rkisp1/rkisp1path.cpp | 42 +++++++++++++++-\n> >  src/libcamera/pipeline/rkisp1/rkisp1path.h   |  8 +--\n> >  3 files changed, 50 insertions(+), 53 deletions(-)\n> > \n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > index 7dd4fb11c39dd811..6158fbee41339c32 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > @@ -770,20 +770,6 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n> >  \t\tdata->selfPathStream_.configuration().bufferCount,\n> >  \t});\n> >  \n> > -\tif (data->mainPathActive_) {\n> > -\t\tret = mainPath_.video_->importBuffers(\n> > -\t\t\tdata->mainPathStream_.configuration().bufferCount);\n> > -\t\tif (ret < 0)\n> > -\t\t\tgoto error;\n> > -\t}\n> > -\n> > -\tif (data->selfPathActive_) {\n> > -\t\tret = selfPath_.video_->importBuffers(\n> > -\t\t\tdata->selfPathStream_.configuration().bufferCount);\n> > -\t\tif (ret < 0)\n> > -\t\t\tgoto error;\n> > -\t}\n> > -\n> >  \tret = param_->allocateBuffers(maxCount, &paramBuffers_);\n> >  \tif (ret < 0)\n> >  \t\tgoto error;\n> > @@ -813,8 +799,6 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n> >  error:\n> >  \tparamBuffers_.clear();\n> >  \tstatBuffers_.clear();\n> > -\tmainPath_.video_->releaseBuffers();\n> > -\tselfPath_.video_->releaseBuffers();\n> >  \n> >  \treturn ret;\n> >  }\n> > @@ -845,12 +829,6 @@ int PipelineHandlerRkISP1::freeBuffers(Camera *camera)\n> >  \tif (stat_->releaseBuffers())\n> >  \t\tLOG(RkISP1, Error) << \"Failed to release stat buffers\";\n> >  \n> > -\tif (mainPath_.video_->releaseBuffers())\n> > -\t\tLOG(RkISP1, Error) << \"Failed to release main path buffers\";\n> > -\n> > -\tif (selfPath_.video_->releaseBuffers())\n> > -\t\tLOG(RkISP1, Error) << \"Failed to release self path buffers\";\n> > -\n> >  \treturn 0;\n> >  }\n> >  \n> > @@ -896,15 +874,12 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n> >  \tstd::map<unsigned int, IPAStream> streamConfig;\n> >  \n> >  \tif (data->mainPathActive_) {\n> > -\t\tret = mainPath_.video_->streamOn();\n> > +\t\tret = mainPath_.start();\n> >  \t\tif (ret) {\n> >  \t\t\tparam_->streamOff();\n> >  \t\t\tstat_->streamOff();\n> >  \t\t\tdata->ipa_->stop();\n> >  \t\t\tfreeBuffers(camera);\n> > -\n> > -\t\t\tLOG(RkISP1, Error)\n> > -\t\t\t\t<< \"Failed to start main path \" << camera->id();\n> >  \t\t\treturn ret;\n> >  \t\t}\n> >  \n> > @@ -915,18 +890,13 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n> >  \t}\n> >  \n> >  \tif (data->selfPathActive_) {\n> > -\t\tret = selfPath_.video_->streamOn();\n> > +\t\tret = selfPath_.start();\n> >  \t\tif (ret) {\n> > -\t\t\tif (data->mainPathActive_)\n> > -\t\t\t\tmainPath_.video_->streamOff();\n> > -\n> > +\t\t\tmainPath_.stop();\n> >  \t\t\tparam_->streamOff();\n> >  \t\t\tstat_->streamOff();\n> >  \t\t\tdata->ipa_->stop();\n> >  \t\t\tfreeBuffers(camera);\n> > -\n> > -\t\t\tLOG(RkISP1, Error)\n> > -\t\t\t\t<< \"Failed to start self path \" << camera->id();\n> >  \t\t\treturn ret;\n> >  \t\t}\n> >  \n> > @@ -963,21 +933,8 @@ void PipelineHandlerRkISP1::stop(Camera *camera)\n> >  \tRkISP1CameraData *data = cameraData(camera);\n> >  \tint ret;\n> >  \n> > -\tif (data->selfPathActive_) {\n> > -\t\tret = selfPath_.video_->streamOff();\n> > -\t\tif (ret)\n> > -\t\t\tLOG(RkISP1, Warning)\n> > -\t\t\t\t<< \"Failed to stop self path for \"\n> > -\t\t\t\t<< camera->id();\n> > -\t}\n> > -\n> > -\tif (data->mainPathActive_) {\n> > -\t\tret = mainPath_.video_->streamOff();\n> > -\t\tif (ret)\n> > -\t\t\tLOG(RkISP1, Warning)\n> > -\t\t\t\t<< \"Failed to stop main path for \"\n> > -\t\t\t\t<< camera->id();\n> > -\t}\n> > +\tselfPath_.stop();\n> > +\tmainPath_.stop();\n> >  \n> >  \tret = stat_->streamOff();\n> >  \tif (ret)\n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1path.cpp\n> > index 74eaa5d32388184b..b2dd669f4caf3269 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1path.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1path.cpp\n> > @@ -20,9 +20,9 @@ LOG_DECLARE_CATEGORY(RkISP1)\n> >  \n> >  RkISP1Path::RkISP1Path(const char *name, const std::vector<PixelFormat> &formats,\n> >  \t\t       const Size &minResolution, const Size &maxResolution)\n> > -\t: video_(nullptr), name_(name), formats_(formats),\n> > +\t: name_(name), running_(false), formats_(formats),\n> >  \t  minResolution_(minResolution), maxResolution_(maxResolution),\n> > -\t  resizer_(nullptr)\n> > +\t  resizer_(nullptr), video_(nullptr)\n> >  {\n> >  }\n> >  \n> > @@ -155,6 +155,44 @@ int RkISP1Path::exportBuffers(unsigned int bufferCount,\n> >  \treturn video_->exportBuffers(bufferCount, buffers);\n> >  }\n> >  \n> > +int RkISP1Path::start()\n> > +{\n> > +\tint ret;\n> > +\n> > +\tif (running_)\n> > +\t\treturn -EBUSY;\n> > +\n> > +\tret = video_->importBuffers(RKISP1_BUFFER_COUNT);\n> \n> This is a functional change that needs to be documented in the commit\n> message (the number of buffers is now hardcoded). Is it right ?\n\nNo it's not the validate() function have always forced the number of \nbuffers 4 or at other parts in the code to RKISP1_BUFFER_COUNT (which is \ndefined as 4). This change only makes this more explicit.\n\nI agree this is not the optimum behavior and we should rework the \npipeline to accept a configurable number of buffers from the \napplication. I wanted to keep the changes to a minimum as this series is \nalready too large, but I have noted this in my todo file.\n\n> \n> > +\tif (ret)\n> > +\t\treturn ret;\n> > +\n> > +\tret = video_->streamOn();\n> > +\tif (ret) {\n> > +\t\tLOG(RkISP1, Error)\n> > +\t\t\t<< \"Failed to start \" << name_ << \"path\";\n> \n> Should it be \" path\" ? Same below.\n\nYes, thanks good catch.\n\n> \n> > +\n> > +\t\tvideo_->releaseBuffers();\n> > +\t\treturn ret;\n> > +\t}\n> > +\n> > +\trunning_ = true;\n> > +\n> > +\treturn 0;\n> > +}\n> > +\n> > +void RkISP1Path::stop()\n> > +{\n> > +\tif (!running_)\n> > +\t\treturn;\n> > +\n> > +\tif (video_->streamOff())\n> > +\t\tLOG(RkISP1, Warning) << \"Failed to stop \" << name_ << \"path\";\n> > +\n> > +\tvideo_->releaseBuffers();\n> > +\n> > +\trunning_ = false;\n> > +}\n> > +\n> >  RkISP1MainPath::RkISP1MainPath()\n> >  \t: RkISP1Path(\"main\",\n> >  \t\t     {\n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1path.h b/src/libcamera/pipeline/rkisp1/rkisp1path.h\n> > index 1315b2c64feac681..9c2ecb620375683b 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1path.h\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1path.h\n> > @@ -41,22 +41,24 @@ public:\n> >  \tint exportBuffers(unsigned int bufferCount,\n> >  \t\t\t  std::vector<std::unique_ptr<FrameBuffer>> *buffers);\n> >  \n> > +\tint start();\n> > +\tvoid stop();\n> > +\n> >  \tint queueBuffer(FrameBuffer *buffer) { return video_->queueBuffer(buffer); }\n> >  \tSignal<FrameBuffer *> &bufferReady() { return video_->bufferReady; }\n> >  \n> > -\t/* \\todo Make video private. */\n> > -\tV4L2VideoDevice *video_;\n> > -\n> >  private:\n> >  \tstatic constexpr unsigned int RKISP1_BUFFER_COUNT = 4;\n> >  \n> >  \tconst char *name_;\n> > +\tbool running_;\n> >  \n> >  \tconst std::vector<PixelFormat> formats_;\n> >  \tconst Size minResolution_;\n> >  \tconst Size maxResolution_;\n> >  \n> >  \tV4L2Subdevice *resizer_;\n> > +\tV4L2VideoDevice *video_;\n> >  };\n> >  \n> >  class RkISP1MainPath : public RkISP1Path\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3C683C3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Sep 2020 22:57:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0887460BF7;\n\tTue, 29 Sep 2020 00:57:57 +0200 (CEST)","from mail-lj1-x243.google.com (mail-lj1-x243.google.com\n\t[IPv6:2a00:1450:4864:20::243])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 40F2560394\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Sep 2020 00:57:55 +0200 (CEST)","by mail-lj1-x243.google.com with SMTP id r24so2410854ljm.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Sep 2020 15:57:55 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tb27sm2990981lfq.133.2020.09.28.15.57.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 28 Sep 2020 15:57:54 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"XSBXAxTp\"; dkim-atps=neutral","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\tbh=URAW61NmFmf7kNOiMyH1QqKUxbDaP5wzDfcIn7m5uhk=;\n\tb=XSBXAxTp7UxiMMhOglHhpoxKha9Ppn+fwl8Cg8P8ItkKRZVP3v5x8fkHn+8XeUJhPt\n\tEm5XbGPtlT43Xf/pSE9scpNxO+3B/ZckwIv4MhroIao16fGDT3aOIAWmbvWhfRKLJp/g\n\tOkh5kAzKlcIdEUuMaS1DL0fFXQZmP0MSb16raa+XcdpIR5DvPsdz8RE3ZcCsU6oZQGPr\n\tne3RBRsOHZjzZjj1aWnQesdufcaF+xoaZiBd3hpQLaGjFvKqGOjMMzf76ORdXJVx18Qn\n\tjvlIK4coX6uPUZ4ssJtR+pgrrq2INZFRdwVpjKxRro/FrOMhMm9kd3gNW/FvsN2G0HW9\n\tVj6Q==","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;\n\tbh=URAW61NmFmf7kNOiMyH1QqKUxbDaP5wzDfcIn7m5uhk=;\n\tb=rhlC7mAy2+iRa8XpFe3sUwrJHGbl+XHULSBkeI48ynxD+uKVFErDYGXhguz7R7LGwk\n\tJllVnW1C89yZnszb8USZZzc41aNlmh/GjaPMNwbKCnnwov8kFrHpISUNhusk/00rXFjR\n\tWzflOLA94JCXIqHm9EywVFeaFvPRGchfBXAjDpXIoAeKVoyOduHIjHH2C/Kblu6cNEe+\n\tHaURaI09/Dw8GJHCqAg3Pc8FRaOqAFhXxJnh86K1oxEGzVoSZxqQEFFcDxtXv0CaIc+P\n\tK7BWVgzHd9I553pUD6iJq9zzNp3WpYrpM/yPrPfN8ZwYzcR8uF/Y27t1MFbwGtInqxgI\n\tKIhA==","X-Gm-Message-State":"AOAM530u5/gkhy0173uTi7fXzaNbuAGoaTST5l3wAXa5QWqWDyprNV+y\n\tWHQk0+eRmuleJEK89K6bi2El8aeR23dixg==","X-Google-Smtp-Source":"ABdhPJxNj6FOcjFPoQoJ5fmb4yKqL854aPjx1Z9DIqpk8lccXWZ06U3rUJMtin/vcugCgOwxKN4D4A==","X-Received":"by 2002:a2e:7d0e:: with SMTP id y14mr228754ljc.254.1601333874463;\n\tMon, 28 Sep 2020 15:57:54 -0700 (PDT)","Date":"Tue, 29 Sep 2020 00:57:53 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20200928225753.GC1052036@oden.dyn.berto.se>","References":"<20200925014207.1455796-1-niklas.soderlund@ragnatech.se>\n\t<20200925014207.1455796-20-niklas.soderlund@ragnatech.se>\n\t<20200928224647.GV23539@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200928224647.GV23539@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3 19/22] libcamera: pipeline: rkisp1:\n\tMove start and stop of path to RkISP1Path","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]