[{"id":12063,"web_url":"https://patchwork.libcamera.org/comment/12063/","msgid":"<20200820090116.zavavgntn3k2lcg2@uno.localdomain>","date":"2020-08-20T09:01:16","subject":"Re: [libcamera-devel] [PATCH 08/13] libcamera: pipeline: rkisp1:\n\tPrefix main path video and resizer","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Niklas,\n\nOn Thu, Aug 13, 2020 at 02:52:41AM +0200, Niklas Söderlund wrote:\n> In preparation of supporting both the main and self path prefix the main\n> path specific variables with mainPath.\n\nWouldn't it be better to use 'self' and 'main' and omit 'path' ?\n\n>\n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 82 ++++++++++++------------\n>  1 file changed, 41 insertions(+), 41 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 59614a9f470b7802..60179a1151f18491 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -66,7 +66,7 @@ struct RkISP1FrameInfo {\n>\n>  \tFrameBuffer *paramBuffer;\n>  \tFrameBuffer *statBuffer;\n> -\tFrameBuffer *videoBuffer;\n> +\tFrameBuffer *mainPathBuffer;\n>\n>  \tbool paramFilled;\n>  \tbool paramDequeued;\n> @@ -131,7 +131,7 @@ class RkISP1CameraData : public CameraData\n>  public:\n>  \tRkISP1CameraData(PipelineHandler *pipe, V4L2VideoDevice *video)\n>  \t\t: CameraData(pipe), sensor_(nullptr), frame_(0),\n> -\t\t  frameInfo_(pipe), video_(video)\n> +\t\t  frameInfo_(pipe), mainPathVideo_(video)\n>  \t{\n>  \t}\n>\n> @@ -142,14 +142,14 @@ public:\n>\n>  \tint loadIPA();\n>\n> -\tStream stream_;\n> +\tStream mainPathStream_;\n>  \tCameraSensor *sensor_;\n>  \tunsigned int frame_;\n>  \tstd::vector<IPABuffer> ipaBuffers_;\n>  \tRkISP1Frames frameInfo_;\n>  \tRkISP1Timeline timeline_;\n>\n> -\tV4L2VideoDevice *video_;\n> +\tV4L2VideoDevice *mainPathVideo_;\n>\n>  private:\n>  \tvoid queueFrameAction(unsigned int frame,\n> @@ -225,8 +225,8 @@ private:\n>\n>  \tMediaDevice *media_;\n>  \tV4L2Subdevice *isp_;\n> -\tV4L2Subdevice *resizer_;\n> -\tV4L2VideoDevice *video_;\n> +\tV4L2Subdevice *mainPathResizer_;\n> +\tV4L2VideoDevice *mainPathVideo_;\n>  \tV4L2VideoDevice *param_;\n>  \tV4L2VideoDevice *stat_;\n>\n> @@ -259,8 +259,8 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n>  \t}\n>  \tFrameBuffer *statBuffer = pipe_->availableStatBuffers_.front();\n>\n> -\tFrameBuffer *videoBuffer = request->findBuffer(&data->stream_);\n> -\tif (!videoBuffer) {\n> +\tFrameBuffer *mainPathBuffer = request->findBuffer(&data->mainPathStream_);\n> +\tif (!mainPathBuffer) {\n>  \t\tLOG(RkISP1, Error)\n>  \t\t\t<< \"Attempt to queue request with invalid stream\";\n>  \t\treturn nullptr;\n> @@ -274,7 +274,7 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n>  \tinfo->frame = frame;\n>  \tinfo->request = request;\n>  \tinfo->paramBuffer = paramBuffer;\n> -\tinfo->videoBuffer = videoBuffer;\n> +\tinfo->mainPathBuffer = mainPathBuffer;\n>  \tinfo->statBuffer = statBuffer;\n>  \tinfo->paramFilled = false;\n>  \tinfo->paramDequeued = false;\n> @@ -333,7 +333,7 @@ RkISP1FrameInfo *RkISP1Frames::find(FrameBuffer *buffer)\n>\n>  \t\tif (info->paramBuffer == buffer ||\n>  \t\t    info->statBuffer == buffer ||\n> -\t\t    info->videoBuffer == buffer)\n> +\t\t    info->mainPathBuffer == buffer)\n>  \t\t\treturn info;\n>  \t}\n>\n> @@ -405,7 +405,7 @@ protected:\n>\n>  \t\tpipe_->param_->queueBuffer(info->paramBuffer);\n>  \t\tpipe_->stat_->queueBuffer(info->statBuffer);\n> -\t\tpipe_->video_->queueBuffer(info->videoBuffer);\n> +\t\tpipe_->mainPathVideo_->queueBuffer(info->mainPathBuffer);\n>  \t}\n>\n>  private:\n> @@ -544,10 +544,10 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n>  \tcfg.bufferCount = RKISP1_BUFFER_COUNT;\n>\n>  \tV4L2DeviceFormat format = {};\n> -\tformat.fourcc = data_->video_->toV4L2PixelFormat(cfg.pixelFormat);\n> +\tformat.fourcc = data_->mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat);\n>  \tformat.size = cfg.size;\n>\n> -\tint ret = data_->video_->tryFormat(&format);\n> +\tint ret = data_->mainPathVideo_->tryFormat(&format);\n>  \tif (ret)\n>  \t\treturn Invalid;\n>\n> @@ -558,8 +558,8 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n>  }\n>\n>  PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)\n> -\t: PipelineHandler(manager), isp_(nullptr), resizer_(nullptr),\n> -\t  video_(nullptr), param_(nullptr), stat_(nullptr)\n> +\t: PipelineHandler(manager), isp_(nullptr), mainPathResizer_(nullptr),\n> +\t  mainPathVideo_(nullptr), param_(nullptr), stat_(nullptr)\n>  {\n>  }\n>\n> @@ -567,8 +567,8 @@ PipelineHandlerRkISP1::~PipelineHandlerRkISP1()\n>  {\n>  \tdelete param_;\n>  \tdelete stat_;\n> -\tdelete video_;\n> -\tdelete resizer_;\n> +\tdelete mainPathVideo_;\n> +\tdelete mainPathResizer_;\n>  \tdelete isp_;\n>  }\n>\n> @@ -649,7 +649,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n>\n>  \tLOG(RkISP1, Debug) << \"ISP output pad configured with \" << format.toString();\n>\n> -\tret = resizer_->setFormat(0, &format);\n> +\tret = mainPathResizer_->setFormat(0, &format);\n>  \tif (ret < 0)\n>  \t\treturn ret;\n>\n> @@ -659,23 +659,23 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n>\n>  \tLOG(RkISP1, Debug) << \"Configuring resizer output pad with \" << format.toString();\n>\n> -\tret = resizer_->setFormat(1, &format);\n> +\tret = mainPathResizer_->setFormat(1, &format);\n>  \tif (ret < 0)\n>  \t\treturn ret;\n>\n>  \tLOG(RkISP1, Debug) << \"Resizer output pad configured with \" << format.toString();\n>\n>  \tV4L2DeviceFormat outputFormat = {};\n> -\toutputFormat.fourcc = video_->toV4L2PixelFormat(cfg.pixelFormat);\n> +\toutputFormat.fourcc = mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat);\n>  \toutputFormat.size = cfg.size;\n>  \toutputFormat.planesCount = 2;\n>\n> -\tret = video_->setFormat(&outputFormat);\n> +\tret = mainPathVideo_->setFormat(&outputFormat);\n>  \tif (ret)\n>  \t\treturn ret;\n>\n>  \tif (outputFormat.size != cfg.size ||\n> -\t    outputFormat.fourcc != video_->toV4L2PixelFormat(cfg.pixelFormat)) {\n> +\t    outputFormat.fourcc != mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat)) {\n>  \t\tLOG(RkISP1, Error)\n>  \t\t\t<< \"Unable to configure capture in \" << cfg.toString();\n>  \t\treturn -EINVAL;\n> @@ -693,7 +693,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n>  \tif (ret)\n>  \t\treturn ret;\n>\n> -\tcfg.setStream(&data->stream_);\n> +\tcfg.setStream(&data->mainPathStream_);\n>\n>  \treturn 0;\n>  }\n> @@ -702,17 +702,17 @@ int PipelineHandlerRkISP1::exportFrameBuffers(Camera *camera, Stream *stream,\n>  \t\t\t\t\t      std::vector<std::unique_ptr<FrameBuffer>> *buffers)\n>  {\n>  \tunsigned int count = stream->configuration().bufferCount;\n> -\treturn video_->exportBuffers(count, buffers);\n> +\treturn mainPathVideo_->exportBuffers(count, buffers);\n>  }\n>\n>  int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n>  {\n>  \tRkISP1CameraData *data = cameraData(camera);\n> -\tunsigned int count = data->stream_.configuration().bufferCount;\n> +\tunsigned int count = data->mainPathStream_.configuration().bufferCount;\n>  \tunsigned int ipaBufferId = 1;\n>  \tint ret;\n>\n> -\tret = video_->importBuffers(count);\n> +\tret = mainPathVideo_->importBuffers(count);\n>  \tif (ret < 0)\n>  \t\tgoto error;\n>\n> @@ -745,7 +745,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n>  error:\n>  \tparamBuffers_.clear();\n>  \tstatBuffers_.clear();\n> -\tvideo_->releaseBuffers();\n> +\tmainPathVideo_->releaseBuffers();\n>\n>  \treturn ret;\n>  }\n> @@ -776,8 +776,8 @@ int PipelineHandlerRkISP1::freeBuffers(Camera *camera)\n>  \tif (stat_->releaseBuffers())\n>  \t\tLOG(RkISP1, Error) << \"Failed to release stat buffers\";\n>\n> -\tif (video_->releaseBuffers())\n> -\t\tLOG(RkISP1, Error) << \"Failed to release video buffers\";\n> +\tif (mainPathVideo_->releaseBuffers())\n> +\t\tLOG(RkISP1, Error) << \"Failed to release main path buffers\";\n>\n>  \treturn 0;\n>  }\n> @@ -821,7 +821,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n>  \t\treturn ret;\n>  \t}\n>\n> -\tret = video_->streamOn();\n> +\tret = mainPathVideo_->streamOn();\n>  \tif (ret) {\n>  \t\tparam_->streamOff();\n>  \t\tstat_->streamOff();\n> @@ -846,8 +846,8 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n>\n>  \tstd::map<unsigned int, IPAStream> streamConfig;\n>  \tstreamConfig[0] = {\n> -\t\t.pixelFormat = data->stream_.configuration().pixelFormat,\n> -\t\t.size = data->stream_.configuration().size,\n> +\t\t.pixelFormat = data->mainPathStream_.configuration().pixelFormat,\n> +\t\t.size = data->mainPathStream_.configuration().size,\n>  \t};\n>\n>  \tstd::map<unsigned int, const ControlInfoMap &> entityControls;\n> @@ -865,7 +865,7 @@ void PipelineHandlerRkISP1::stop(Camera *camera)\n>  \tRkISP1CameraData *data = cameraData(camera);\n>  \tint ret;\n>\n> -\tret = video_->streamOff();\n> +\tret = mainPathVideo_->streamOff();\n>  \tif (ret)\n>  \t\tLOG(RkISP1, Warning)\n>  \t\t\t<< \"Failed to stop camera \" << camera->id();\n> @@ -950,7 +950,7 @@ int PipelineHandlerRkISP1::initLinks(const Camera *camera,\n>\n>  \tfor (const StreamConfiguration &cfg : config) {\n>  \t\tstd::string resizer;\n> -\t\tif (cfg.stream() == &data->stream_)\n> +\t\tif (cfg.stream() == &data->mainPathStream_)\n>  \t\t\tresizer = \"rkisp1_resizer_mainpath\";\n>  \t\telse\n>  \t\t\treturn -EINVAL;\n> @@ -972,7 +972,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n>  \tint ret;\n>\n>  \tstd::unique_ptr<RkISP1CameraData> data =\n> -\t\tstd::make_unique<RkISP1CameraData>(this, video_);\n> +\t\tstd::make_unique<RkISP1CameraData>(this, mainPathVideo_);\n>\n>  \tControlInfoMap::Map ctrls;\n>  \tctrls.emplace(std::piecewise_construct,\n> @@ -993,7 +993,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n>  \tif (ret)\n>  \t\treturn ret;\n>\n> -\tstd::set<Stream *> streams{ &data->stream_ };\n> +\tstd::set<Stream *> streams{ &data->mainPathStream_ };\n>  \tstd::shared_ptr<Camera> camera =\n>  \t\tCamera::create(this, data->sensor_->id(), streams);\n>  \tregisterCamera(std::move(camera), std::move(data));\n> @@ -1023,13 +1023,13 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n>  \tif (isp_->open() < 0)\n>  \t\treturn false;\n>\n> -\tresizer_ = V4L2Subdevice::fromEntityName(media_, \"rkisp1_resizer_mainpath\");\n> -\tif (resizer_->open() < 0)\n> +\tmainPathResizer_ = V4L2Subdevice::fromEntityName(media_, \"rkisp1_resizer_mainpath\");\n> +\tif (mainPathResizer_->open() < 0)\n>  \t\treturn false;\n>\n>  \t/* Locate and open the capture video node. */\n> -\tvideo_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_mainpath\");\n> -\tif (video_->open() < 0)\n> +\tmainPathVideo_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_mainpath\");\n> +\tif (mainPathVideo_->open() < 0)\n>  \t\treturn false;\n>\n>  \tstat_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_stats\");\n> @@ -1040,7 +1040,7 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n>  \tif (param_->open() < 0)\n>  \t\treturn false;\n>\n> -\tvideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);\n> +\tmainPathVideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);\n>  \tstat_->bufferReady.connect(this, &PipelineHandlerRkISP1::statReady);\n>  \tparam_->bufferReady.connect(this, &PipelineHandlerRkISP1::paramReady);\n>\n> --\n> 2.28.0\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 B89E4BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Aug 2020 08:57:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9037661F61;\n\tThu, 20 Aug 2020 10:57:35 +0200 (CEST)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A7E5661ED9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Aug 2020 10:57:34 +0200 (CEST)","from uno.localdomain (host-82-52-18-94.retail.telecomitalia.it\n\t[82.52.18.94]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id BB958E0003;\n\tThu, 20 Aug 2020 08:57:33 +0000 (UTC)"],"X-Originating-IP":"82.52.18.94","Date":"Thu, 20 Aug 2020 11:01:16 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200820090116.zavavgntn3k2lcg2@uno.localdomain>","References":"<20200813005246.3265807-1-niklas.soderlund@ragnatech.se>\n\t<20200813005246.3265807-9-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200813005246.3265807-9-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH 08/13] libcamera: pipeline: rkisp1:\n\tPrefix main path video and resizer","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":12079,"web_url":"https://patchwork.libcamera.org/comment/12079/","msgid":"<20200820152007.GN6593@pendragon.ideasonboard.com>","date":"2020-08-20T15:20:07","subject":"Re: [libcamera-devel] [PATCH 08/13] libcamera: pipeline: rkisp1:\n\tPrefix main path video and resizer","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 Thu, Aug 13, 2020 at 02:52:41AM +0200, Niklas Söderlund wrote:\n> In preparation of supporting both the main and self path prefix the main\n> path specific variables with mainPath.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 82 ++++++++++++------------\n>  1 file changed, 41 insertions(+), 41 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 59614a9f470b7802..60179a1151f18491 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -66,7 +66,7 @@ struct RkISP1FrameInfo {\n>  \n>  \tFrameBuffer *paramBuffer;\n>  \tFrameBuffer *statBuffer;\n> -\tFrameBuffer *videoBuffer;\n> +\tFrameBuffer *mainPathBuffer;\n>  \n>  \tbool paramFilled;\n>  \tbool paramDequeued;\n> @@ -131,7 +131,7 @@ class RkISP1CameraData : public CameraData\n>  public:\n>  \tRkISP1CameraData(PipelineHandler *pipe, V4L2VideoDevice *video)\n>  \t\t: CameraData(pipe), sensor_(nullptr), frame_(0),\n> -\t\t  frameInfo_(pipe), video_(video)\n> +\t\t  frameInfo_(pipe), mainPathVideo_(video)\n>  \t{\n>  \t}\n>  \n> @@ -142,14 +142,14 @@ public:\n>  \n>  \tint loadIPA();\n>  \n> -\tStream stream_;\n> +\tStream mainPathStream_;\n>  \tCameraSensor *sensor_;\n>  \tunsigned int frame_;\n>  \tstd::vector<IPABuffer> ipaBuffers_;\n>  \tRkISP1Frames frameInfo_;\n>  \tRkISP1Timeline timeline_;\n>  \n> -\tV4L2VideoDevice *video_;\n> +\tV4L2VideoDevice *mainPathVideo_;\n>  \n>  private:\n>  \tvoid queueFrameAction(unsigned int frame,\n> @@ -225,8 +225,8 @@ private:\n>  \n>  \tMediaDevice *media_;\n>  \tV4L2Subdevice *isp_;\n> -\tV4L2Subdevice *resizer_;\n> -\tV4L2VideoDevice *video_;\n> +\tV4L2Subdevice *mainPathResizer_;\n> +\tV4L2VideoDevice *mainPathVideo_;\n>  \tV4L2VideoDevice *param_;\n>  \tV4L2VideoDevice *stat_;\n\nWould it make sense to create a RkISP1Path class and move the resizer\nanv video node there ? The RkISP1Path instances would be stored in\nPipelineHandlerRkISP1. I think we can drop the video_ member of\nRkISP1CameraData and access it from the pipe in\nRkISP1CameraData::validate().\n\n>  \n> @@ -259,8 +259,8 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n>  \t}\n>  \tFrameBuffer *statBuffer = pipe_->availableStatBuffers_.front();\n>  \n> -\tFrameBuffer *videoBuffer = request->findBuffer(&data->stream_);\n> -\tif (!videoBuffer) {\n> +\tFrameBuffer *mainPathBuffer = request->findBuffer(&data->mainPathStream_);\n> +\tif (!mainPathBuffer) {\n>  \t\tLOG(RkISP1, Error)\n>  \t\t\t<< \"Attempt to queue request with invalid stream\";\n>  \t\treturn nullptr;\n> @@ -274,7 +274,7 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n>  \tinfo->frame = frame;\n>  \tinfo->request = request;\n>  \tinfo->paramBuffer = paramBuffer;\n> -\tinfo->videoBuffer = videoBuffer;\n> +\tinfo->mainPathBuffer = mainPathBuffer;\n>  \tinfo->statBuffer = statBuffer;\n>  \tinfo->paramFilled = false;\n>  \tinfo->paramDequeued = false;\n> @@ -333,7 +333,7 @@ RkISP1FrameInfo *RkISP1Frames::find(FrameBuffer *buffer)\n>  \n>  \t\tif (info->paramBuffer == buffer ||\n>  \t\t    info->statBuffer == buffer ||\n> -\t\t    info->videoBuffer == buffer)\n> +\t\t    info->mainPathBuffer == buffer)\n>  \t\t\treturn info;\n>  \t}\n>  \n> @@ -405,7 +405,7 @@ protected:\n>  \n>  \t\tpipe_->param_->queueBuffer(info->paramBuffer);\n>  \t\tpipe_->stat_->queueBuffer(info->statBuffer);\n> -\t\tpipe_->video_->queueBuffer(info->videoBuffer);\n> +\t\tpipe_->mainPathVideo_->queueBuffer(info->mainPathBuffer);\n>  \t}\n>  \n>  private:\n> @@ -544,10 +544,10 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n>  \tcfg.bufferCount = RKISP1_BUFFER_COUNT;\n>  \n>  \tV4L2DeviceFormat format = {};\n> -\tformat.fourcc = data_->video_->toV4L2PixelFormat(cfg.pixelFormat);\n> +\tformat.fourcc = data_->mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat);\n>  \tformat.size = cfg.size;\n>  \n> -\tint ret = data_->video_->tryFormat(&format);\n> +\tint ret = data_->mainPathVideo_->tryFormat(&format);\n>  \tif (ret)\n>  \t\treturn Invalid;\n>  \n> @@ -558,8 +558,8 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n>  }\n>  \n>  PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)\n> -\t: PipelineHandler(manager), isp_(nullptr), resizer_(nullptr),\n> -\t  video_(nullptr), param_(nullptr), stat_(nullptr)\n> +\t: PipelineHandler(manager), isp_(nullptr), mainPathResizer_(nullptr),\n> +\t  mainPathVideo_(nullptr), param_(nullptr), stat_(nullptr)\n>  {\n>  }\n>  \n> @@ -567,8 +567,8 @@ PipelineHandlerRkISP1::~PipelineHandlerRkISP1()\n>  {\n>  \tdelete param_;\n>  \tdelete stat_;\n> -\tdelete video_;\n> -\tdelete resizer_;\n> +\tdelete mainPathVideo_;\n> +\tdelete mainPathResizer_;\n>  \tdelete isp_;\n>  }\n>  \n> @@ -649,7 +649,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n>  \n>  \tLOG(RkISP1, Debug) << \"ISP output pad configured with \" << format.toString();\n>  \n> -\tret = resizer_->setFormat(0, &format);\n> +\tret = mainPathResizer_->setFormat(0, &format);\n>  \tif (ret < 0)\n>  \t\treturn ret;\n>  \n> @@ -659,23 +659,23 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n>  \n>  \tLOG(RkISP1, Debug) << \"Configuring resizer output pad with \" << format.toString();\n>  \n> -\tret = resizer_->setFormat(1, &format);\n> +\tret = mainPathResizer_->setFormat(1, &format);\n>  \tif (ret < 0)\n>  \t\treturn ret;\n>  \n>  \tLOG(RkISP1, Debug) << \"Resizer output pad configured with \" << format.toString();\n>  \n>  \tV4L2DeviceFormat outputFormat = {};\n> -\toutputFormat.fourcc = video_->toV4L2PixelFormat(cfg.pixelFormat);\n> +\toutputFormat.fourcc = mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat);\n>  \toutputFormat.size = cfg.size;\n>  \toutputFormat.planesCount = 2;\n>  \n> -\tret = video_->setFormat(&outputFormat);\n> +\tret = mainPathVideo_->setFormat(&outputFormat);\n>  \tif (ret)\n>  \t\treturn ret;\n>  \n>  \tif (outputFormat.size != cfg.size ||\n> -\t    outputFormat.fourcc != video_->toV4L2PixelFormat(cfg.pixelFormat)) {\n> +\t    outputFormat.fourcc != mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat)) {\n>  \t\tLOG(RkISP1, Error)\n>  \t\t\t<< \"Unable to configure capture in \" << cfg.toString();\n>  \t\treturn -EINVAL;\n> @@ -693,7 +693,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n>  \tif (ret)\n>  \t\treturn ret;\n>  \n> -\tcfg.setStream(&data->stream_);\n> +\tcfg.setStream(&data->mainPathStream_);\n>  \n>  \treturn 0;\n>  }\n> @@ -702,17 +702,17 @@ int PipelineHandlerRkISP1::exportFrameBuffers(Camera *camera, Stream *stream,\n>  \t\t\t\t\t      std::vector<std::unique_ptr<FrameBuffer>> *buffers)\n>  {\n>  \tunsigned int count = stream->configuration().bufferCount;\n> -\treturn video_->exportBuffers(count, buffers);\n> +\treturn mainPathVideo_->exportBuffers(count, buffers);\n>  }\n>  \n>  int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n>  {\n>  \tRkISP1CameraData *data = cameraData(camera);\n> -\tunsigned int count = data->stream_.configuration().bufferCount;\n> +\tunsigned int count = data->mainPathStream_.configuration().bufferCount;\n>  \tunsigned int ipaBufferId = 1;\n>  \tint ret;\n>  \n> -\tret = video_->importBuffers(count);\n> +\tret = mainPathVideo_->importBuffers(count);\n>  \tif (ret < 0)\n>  \t\tgoto error;\n>  \n> @@ -745,7 +745,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n>  error:\n>  \tparamBuffers_.clear();\n>  \tstatBuffers_.clear();\n> -\tvideo_->releaseBuffers();\n> +\tmainPathVideo_->releaseBuffers();\n>  \n>  \treturn ret;\n>  }\n> @@ -776,8 +776,8 @@ int PipelineHandlerRkISP1::freeBuffers(Camera *camera)\n>  \tif (stat_->releaseBuffers())\n>  \t\tLOG(RkISP1, Error) << \"Failed to release stat buffers\";\n>  \n> -\tif (video_->releaseBuffers())\n> -\t\tLOG(RkISP1, Error) << \"Failed to release video buffers\";\n> +\tif (mainPathVideo_->releaseBuffers())\n> +\t\tLOG(RkISP1, Error) << \"Failed to release main path buffers\";\n>  \n>  \treturn 0;\n>  }\n> @@ -821,7 +821,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n>  \t\treturn ret;\n>  \t}\n>  \n> -\tret = video_->streamOn();\n> +\tret = mainPathVideo_->streamOn();\n>  \tif (ret) {\n>  \t\tparam_->streamOff();\n>  \t\tstat_->streamOff();\n> @@ -846,8 +846,8 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n>  \n>  \tstd::map<unsigned int, IPAStream> streamConfig;\n>  \tstreamConfig[0] = {\n> -\t\t.pixelFormat = data->stream_.configuration().pixelFormat,\n> -\t\t.size = data->stream_.configuration().size,\n> +\t\t.pixelFormat = data->mainPathStream_.configuration().pixelFormat,\n> +\t\t.size = data->mainPathStream_.configuration().size,\n>  \t};\n>  \n>  \tstd::map<unsigned int, const ControlInfoMap &> entityControls;\n> @@ -865,7 +865,7 @@ void PipelineHandlerRkISP1::stop(Camera *camera)\n>  \tRkISP1CameraData *data = cameraData(camera);\n>  \tint ret;\n>  \n> -\tret = video_->streamOff();\n> +\tret = mainPathVideo_->streamOff();\n>  \tif (ret)\n>  \t\tLOG(RkISP1, Warning)\n>  \t\t\t<< \"Failed to stop camera \" << camera->id();\n> @@ -950,7 +950,7 @@ int PipelineHandlerRkISP1::initLinks(const Camera *camera,\n>  \n>  \tfor (const StreamConfiguration &cfg : config) {\n>  \t\tstd::string resizer;\n> -\t\tif (cfg.stream() == &data->stream_)\n> +\t\tif (cfg.stream() == &data->mainPathStream_)\n>  \t\t\tresizer = \"rkisp1_resizer_mainpath\";\n>  \t\telse\n>  \t\t\treturn -EINVAL;\n> @@ -972,7 +972,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n>  \tint ret;\n>  \n>  \tstd::unique_ptr<RkISP1CameraData> data =\n> -\t\tstd::make_unique<RkISP1CameraData>(this, video_);\n> +\t\tstd::make_unique<RkISP1CameraData>(this, mainPathVideo_);\n>  \n>  \tControlInfoMap::Map ctrls;\n>  \tctrls.emplace(std::piecewise_construct,\n> @@ -993,7 +993,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n>  \tif (ret)\n>  \t\treturn ret;\n>  \n> -\tstd::set<Stream *> streams{ &data->stream_ };\n> +\tstd::set<Stream *> streams{ &data->mainPathStream_ };\n>  \tstd::shared_ptr<Camera> camera =\n>  \t\tCamera::create(this, data->sensor_->id(), streams);\n>  \tregisterCamera(std::move(camera), std::move(data));\n> @@ -1023,13 +1023,13 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n>  \tif (isp_->open() < 0)\n>  \t\treturn false;\n>  \n> -\tresizer_ = V4L2Subdevice::fromEntityName(media_, \"rkisp1_resizer_mainpath\");\n> -\tif (resizer_->open() < 0)\n> +\tmainPathResizer_ = V4L2Subdevice::fromEntityName(media_, \"rkisp1_resizer_mainpath\");\n> +\tif (mainPathResizer_->open() < 0)\n>  \t\treturn false;\n>  \n>  \t/* Locate and open the capture video node. */\n> -\tvideo_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_mainpath\");\n> -\tif (video_->open() < 0)\n> +\tmainPathVideo_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_mainpath\");\n> +\tif (mainPathVideo_->open() < 0)\n>  \t\treturn false;\n>  \n>  \tstat_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_stats\");\n> @@ -1040,7 +1040,7 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n>  \tif (param_->open() < 0)\n>  \t\treturn false;\n>  \n> -\tvideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);\n> +\tmainPathVideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);\n>  \tstat_->bufferReady.connect(this, &PipelineHandlerRkISP1::statReady);\n>  \tparam_->bufferReady.connect(this, &PipelineHandlerRkISP1::paramReady);\n>","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 64D21BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Aug 2020 15:20:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 020E861F7B;\n\tThu, 20 Aug 2020 17:20:28 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E259E60381\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Aug 2020 17:20:25 +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 6884D23D;\n\tThu, 20 Aug 2020 17:20:25 +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=\"G2d2jpii\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1597936825;\n\tbh=Hb7i+BvADntyMYBG75yCMXIVvRJ9F58XdGhsL/88NM0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=G2d2jpiiU2aYieIPW4Dtfzg2odGqkMQ6ymxCvVnx2ct6BWXg9nbpV6oarWI1SR8JN\n\tsLx+tf8Va4g2qM6hIyzE/8pPUD2MpFyk8lLpbt4Q+LIYAuh4XW1xe1fj8OSnTCnWbA\n\t+qai3hB0Ho75WYftIY+nyBjQJP5HjT1x1Pde6Lx8=","Date":"Thu, 20 Aug 2020 18:20:07 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20200820152007.GN6593@pendragon.ideasonboard.com>","References":"<20200813005246.3265807-1-niklas.soderlund@ragnatech.se>\n\t<20200813005246.3265807-9-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200813005246.3265807-9-niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH 08/13] libcamera: pipeline: rkisp1:\n\tPrefix main path video and resizer","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":12491,"web_url":"https://patchwork.libcamera.org/comment/12491/","msgid":"<20200914102518.GG1127199@oden.dyn.berto.se>","date":"2020-09-14T10:25:18","subject":"Re: [libcamera-devel] [PATCH 08/13] libcamera: pipeline: rkisp1:\n\tPrefix main path video and resizer","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nOn 2020-08-20 11:01:16 +0200, Jacopo Mondi wrote:\n> Hi Niklas,\n> \n> On Thu, Aug 13, 2020 at 02:52:41AM +0200, Niklas Söderlund wrote:\n> > In preparation of supporting both the main and self path prefix the main\n> > path specific variables with mainPath.\n> \n> Wouldn't it be better to use 'self' and 'main' and omit 'path' ?\n\nI like to keep the 'path' in the name as it becomes clearer, at lest to \nme. I don't feel strongly about this so I'm open to other ideas. As \nLaurent points out in his review maybe we should add a new class to help \nabstract all this, maybe we could revisit the topic then?\n\n> \n> >\n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > ---\n> >  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 82 ++++++++++++------------\n> >  1 file changed, 41 insertions(+), 41 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > index 59614a9f470b7802..60179a1151f18491 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > @@ -66,7 +66,7 @@ struct RkISP1FrameInfo {\n> >\n> >  \tFrameBuffer *paramBuffer;\n> >  \tFrameBuffer *statBuffer;\n> > -\tFrameBuffer *videoBuffer;\n> > +\tFrameBuffer *mainPathBuffer;\n> >\n> >  \tbool paramFilled;\n> >  \tbool paramDequeued;\n> > @@ -131,7 +131,7 @@ class RkISP1CameraData : public CameraData\n> >  public:\n> >  \tRkISP1CameraData(PipelineHandler *pipe, V4L2VideoDevice *video)\n> >  \t\t: CameraData(pipe), sensor_(nullptr), frame_(0),\n> > -\t\t  frameInfo_(pipe), video_(video)\n> > +\t\t  frameInfo_(pipe), mainPathVideo_(video)\n> >  \t{\n> >  \t}\n> >\n> > @@ -142,14 +142,14 @@ public:\n> >\n> >  \tint loadIPA();\n> >\n> > -\tStream stream_;\n> > +\tStream mainPathStream_;\n> >  \tCameraSensor *sensor_;\n> >  \tunsigned int frame_;\n> >  \tstd::vector<IPABuffer> ipaBuffers_;\n> >  \tRkISP1Frames frameInfo_;\n> >  \tRkISP1Timeline timeline_;\n> >\n> > -\tV4L2VideoDevice *video_;\n> > +\tV4L2VideoDevice *mainPathVideo_;\n> >\n> >  private:\n> >  \tvoid queueFrameAction(unsigned int frame,\n> > @@ -225,8 +225,8 @@ private:\n> >\n> >  \tMediaDevice *media_;\n> >  \tV4L2Subdevice *isp_;\n> > -\tV4L2Subdevice *resizer_;\n> > -\tV4L2VideoDevice *video_;\n> > +\tV4L2Subdevice *mainPathResizer_;\n> > +\tV4L2VideoDevice *mainPathVideo_;\n> >  \tV4L2VideoDevice *param_;\n> >  \tV4L2VideoDevice *stat_;\n> >\n> > @@ -259,8 +259,8 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n> >  \t}\n> >  \tFrameBuffer *statBuffer = pipe_->availableStatBuffers_.front();\n> >\n> > -\tFrameBuffer *videoBuffer = request->findBuffer(&data->stream_);\n> > -\tif (!videoBuffer) {\n> > +\tFrameBuffer *mainPathBuffer = request->findBuffer(&data->mainPathStream_);\n> > +\tif (!mainPathBuffer) {\n> >  \t\tLOG(RkISP1, Error)\n> >  \t\t\t<< \"Attempt to queue request with invalid stream\";\n> >  \t\treturn nullptr;\n> > @@ -274,7 +274,7 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n> >  \tinfo->frame = frame;\n> >  \tinfo->request = request;\n> >  \tinfo->paramBuffer = paramBuffer;\n> > -\tinfo->videoBuffer = videoBuffer;\n> > +\tinfo->mainPathBuffer = mainPathBuffer;\n> >  \tinfo->statBuffer = statBuffer;\n> >  \tinfo->paramFilled = false;\n> >  \tinfo->paramDequeued = false;\n> > @@ -333,7 +333,7 @@ RkISP1FrameInfo *RkISP1Frames::find(FrameBuffer *buffer)\n> >\n> >  \t\tif (info->paramBuffer == buffer ||\n> >  \t\t    info->statBuffer == buffer ||\n> > -\t\t    info->videoBuffer == buffer)\n> > +\t\t    info->mainPathBuffer == buffer)\n> >  \t\t\treturn info;\n> >  \t}\n> >\n> > @@ -405,7 +405,7 @@ protected:\n> >\n> >  \t\tpipe_->param_->queueBuffer(info->paramBuffer);\n> >  \t\tpipe_->stat_->queueBuffer(info->statBuffer);\n> > -\t\tpipe_->video_->queueBuffer(info->videoBuffer);\n> > +\t\tpipe_->mainPathVideo_->queueBuffer(info->mainPathBuffer);\n> >  \t}\n> >\n> >  private:\n> > @@ -544,10 +544,10 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n> >  \tcfg.bufferCount = RKISP1_BUFFER_COUNT;\n> >\n> >  \tV4L2DeviceFormat format = {};\n> > -\tformat.fourcc = data_->video_->toV4L2PixelFormat(cfg.pixelFormat);\n> > +\tformat.fourcc = data_->mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat);\n> >  \tformat.size = cfg.size;\n> >\n> > -\tint ret = data_->video_->tryFormat(&format);\n> > +\tint ret = data_->mainPathVideo_->tryFormat(&format);\n> >  \tif (ret)\n> >  \t\treturn Invalid;\n> >\n> > @@ -558,8 +558,8 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n> >  }\n> >\n> >  PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)\n> > -\t: PipelineHandler(manager), isp_(nullptr), resizer_(nullptr),\n> > -\t  video_(nullptr), param_(nullptr), stat_(nullptr)\n> > +\t: PipelineHandler(manager), isp_(nullptr), mainPathResizer_(nullptr),\n> > +\t  mainPathVideo_(nullptr), param_(nullptr), stat_(nullptr)\n> >  {\n> >  }\n> >\n> > @@ -567,8 +567,8 @@ PipelineHandlerRkISP1::~PipelineHandlerRkISP1()\n> >  {\n> >  \tdelete param_;\n> >  \tdelete stat_;\n> > -\tdelete video_;\n> > -\tdelete resizer_;\n> > +\tdelete mainPathVideo_;\n> > +\tdelete mainPathResizer_;\n> >  \tdelete isp_;\n> >  }\n> >\n> > @@ -649,7 +649,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n> >\n> >  \tLOG(RkISP1, Debug) << \"ISP output pad configured with \" << format.toString();\n> >\n> > -\tret = resizer_->setFormat(0, &format);\n> > +\tret = mainPathResizer_->setFormat(0, &format);\n> >  \tif (ret < 0)\n> >  \t\treturn ret;\n> >\n> > @@ -659,23 +659,23 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n> >\n> >  \tLOG(RkISP1, Debug) << \"Configuring resizer output pad with \" << format.toString();\n> >\n> > -\tret = resizer_->setFormat(1, &format);\n> > +\tret = mainPathResizer_->setFormat(1, &format);\n> >  \tif (ret < 0)\n> >  \t\treturn ret;\n> >\n> >  \tLOG(RkISP1, Debug) << \"Resizer output pad configured with \" << format.toString();\n> >\n> >  \tV4L2DeviceFormat outputFormat = {};\n> > -\toutputFormat.fourcc = video_->toV4L2PixelFormat(cfg.pixelFormat);\n> > +\toutputFormat.fourcc = mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat);\n> >  \toutputFormat.size = cfg.size;\n> >  \toutputFormat.planesCount = 2;\n> >\n> > -\tret = video_->setFormat(&outputFormat);\n> > +\tret = mainPathVideo_->setFormat(&outputFormat);\n> >  \tif (ret)\n> >  \t\treturn ret;\n> >\n> >  \tif (outputFormat.size != cfg.size ||\n> > -\t    outputFormat.fourcc != video_->toV4L2PixelFormat(cfg.pixelFormat)) {\n> > +\t    outputFormat.fourcc != mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat)) {\n> >  \t\tLOG(RkISP1, Error)\n> >  \t\t\t<< \"Unable to configure capture in \" << cfg.toString();\n> >  \t\treturn -EINVAL;\n> > @@ -693,7 +693,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n> >  \tif (ret)\n> >  \t\treturn ret;\n> >\n> > -\tcfg.setStream(&data->stream_);\n> > +\tcfg.setStream(&data->mainPathStream_);\n> >\n> >  \treturn 0;\n> >  }\n> > @@ -702,17 +702,17 @@ int PipelineHandlerRkISP1::exportFrameBuffers(Camera *camera, Stream *stream,\n> >  \t\t\t\t\t      std::vector<std::unique_ptr<FrameBuffer>> *buffers)\n> >  {\n> >  \tunsigned int count = stream->configuration().bufferCount;\n> > -\treturn video_->exportBuffers(count, buffers);\n> > +\treturn mainPathVideo_->exportBuffers(count, buffers);\n> >  }\n> >\n> >  int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n> >  {\n> >  \tRkISP1CameraData *data = cameraData(camera);\n> > -\tunsigned int count = data->stream_.configuration().bufferCount;\n> > +\tunsigned int count = data->mainPathStream_.configuration().bufferCount;\n> >  \tunsigned int ipaBufferId = 1;\n> >  \tint ret;\n> >\n> > -\tret = video_->importBuffers(count);\n> > +\tret = mainPathVideo_->importBuffers(count);\n> >  \tif (ret < 0)\n> >  \t\tgoto error;\n> >\n> > @@ -745,7 +745,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n> >  error:\n> >  \tparamBuffers_.clear();\n> >  \tstatBuffers_.clear();\n> > -\tvideo_->releaseBuffers();\n> > +\tmainPathVideo_->releaseBuffers();\n> >\n> >  \treturn ret;\n> >  }\n> > @@ -776,8 +776,8 @@ int PipelineHandlerRkISP1::freeBuffers(Camera *camera)\n> >  \tif (stat_->releaseBuffers())\n> >  \t\tLOG(RkISP1, Error) << \"Failed to release stat buffers\";\n> >\n> > -\tif (video_->releaseBuffers())\n> > -\t\tLOG(RkISP1, Error) << \"Failed to release video buffers\";\n> > +\tif (mainPathVideo_->releaseBuffers())\n> > +\t\tLOG(RkISP1, Error) << \"Failed to release main path buffers\";\n> >\n> >  \treturn 0;\n> >  }\n> > @@ -821,7 +821,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n> >  \t\treturn ret;\n> >  \t}\n> >\n> > -\tret = video_->streamOn();\n> > +\tret = mainPathVideo_->streamOn();\n> >  \tif (ret) {\n> >  \t\tparam_->streamOff();\n> >  \t\tstat_->streamOff();\n> > @@ -846,8 +846,8 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n> >\n> >  \tstd::map<unsigned int, IPAStream> streamConfig;\n> >  \tstreamConfig[0] = {\n> > -\t\t.pixelFormat = data->stream_.configuration().pixelFormat,\n> > -\t\t.size = data->stream_.configuration().size,\n> > +\t\t.pixelFormat = data->mainPathStream_.configuration().pixelFormat,\n> > +\t\t.size = data->mainPathStream_.configuration().size,\n> >  \t};\n> >\n> >  \tstd::map<unsigned int, const ControlInfoMap &> entityControls;\n> > @@ -865,7 +865,7 @@ void PipelineHandlerRkISP1::stop(Camera *camera)\n> >  \tRkISP1CameraData *data = cameraData(camera);\n> >  \tint ret;\n> >\n> > -\tret = video_->streamOff();\n> > +\tret = mainPathVideo_->streamOff();\n> >  \tif (ret)\n> >  \t\tLOG(RkISP1, Warning)\n> >  \t\t\t<< \"Failed to stop camera \" << camera->id();\n> > @@ -950,7 +950,7 @@ int PipelineHandlerRkISP1::initLinks(const Camera *camera,\n> >\n> >  \tfor (const StreamConfiguration &cfg : config) {\n> >  \t\tstd::string resizer;\n> > -\t\tif (cfg.stream() == &data->stream_)\n> > +\t\tif (cfg.stream() == &data->mainPathStream_)\n> >  \t\t\tresizer = \"rkisp1_resizer_mainpath\";\n> >  \t\telse\n> >  \t\t\treturn -EINVAL;\n> > @@ -972,7 +972,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n> >  \tint ret;\n> >\n> >  \tstd::unique_ptr<RkISP1CameraData> data =\n> > -\t\tstd::make_unique<RkISP1CameraData>(this, video_);\n> > +\t\tstd::make_unique<RkISP1CameraData>(this, mainPathVideo_);\n> >\n> >  \tControlInfoMap::Map ctrls;\n> >  \tctrls.emplace(std::piecewise_construct,\n> > @@ -993,7 +993,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n> >  \tif (ret)\n> >  \t\treturn ret;\n> >\n> > -\tstd::set<Stream *> streams{ &data->stream_ };\n> > +\tstd::set<Stream *> streams{ &data->mainPathStream_ };\n> >  \tstd::shared_ptr<Camera> camera =\n> >  \t\tCamera::create(this, data->sensor_->id(), streams);\n> >  \tregisterCamera(std::move(camera), std::move(data));\n> > @@ -1023,13 +1023,13 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n> >  \tif (isp_->open() < 0)\n> >  \t\treturn false;\n> >\n> > -\tresizer_ = V4L2Subdevice::fromEntityName(media_, \"rkisp1_resizer_mainpath\");\n> > -\tif (resizer_->open() < 0)\n> > +\tmainPathResizer_ = V4L2Subdevice::fromEntityName(media_, \"rkisp1_resizer_mainpath\");\n> > +\tif (mainPathResizer_->open() < 0)\n> >  \t\treturn false;\n> >\n> >  \t/* Locate and open the capture video node. */\n> > -\tvideo_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_mainpath\");\n> > -\tif (video_->open() < 0)\n> > +\tmainPathVideo_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_mainpath\");\n> > +\tif (mainPathVideo_->open() < 0)\n> >  \t\treturn false;\n> >\n> >  \tstat_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_stats\");\n> > @@ -1040,7 +1040,7 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n> >  \tif (param_->open() < 0)\n> >  \t\treturn false;\n> >\n> > -\tvideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);\n> > +\tmainPathVideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);\n> >  \tstat_->bufferReady.connect(this, &PipelineHandlerRkISP1::statReady);\n> >  \tparam_->bufferReady.connect(this, &PipelineHandlerRkISP1::paramReady);\n> >\n> > --\n> > 2.28.0\n> >\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel","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 0CC73BF01C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Sep 2020 10:25:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 97F4662D27;\n\tMon, 14 Sep 2020 12:25:21 +0200 (CEST)","from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com\n\t[IPv6:2a00:1450:4864:20::12f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 73FA262B90\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Sep 2020 12:25:20 +0200 (CEST)","by mail-lf1-x12f.google.com with SMTP id z17so12790536lfi.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Sep 2020 03:25:20 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tf27sm3610291lfa.91.2020.09.14.03.25.19\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 14 Sep 2020 03:25:19 -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=\"dJmoW0MG\"; 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=A7SYbO9C2ziKxHXo6AzRgc5gOeqf9t8EkVfHVO6JPyk=;\n\tb=dJmoW0MGtA0CqIUym26tmjkcmZM7Kfgkb5WM1JNK1eDJ96nkh4H6WOnurO+glG7dLC\n\tIMeKn6ccxK05+Qb26H5Hdv3jDLrLGaeVWlnjQDhEBXqvtjXvx1DBa3bzrTYkQb+Lr75S\n\tevhIrwe9lF32gQYCPB26UB9+YHOTdofAmL21nM67pX18N/XCPoAQUNRHnnEe8ByyFT0b\n\tMexN+qvYsWoBHymIPpAieJQ7GgPYUzb6nFJCrKdQaPyFpEOyo5B5KaAT4hsjfJKcYr9f\n\tjkhj+TdJWVLjKxMpu0iR2cDKY3XXEcY/uNXEXj6ixAuduPYm3ssJ6gRMFpvfqQW+5/0/\n\tDG1Q==","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=A7SYbO9C2ziKxHXo6AzRgc5gOeqf9t8EkVfHVO6JPyk=;\n\tb=Dyx2IdGuZrtn4/XrVoBx765tvBgIxXjvJGWXYokoF/bsZtCmTZbrYQOROIZdNydont\n\tcliqUK+X6E05H28vfTXr/dRlBC9gSt2eutpxvrQOHOUTl0o/xXlNT8lCbLUTpgqknKmc\n\tJ3ROE6U/R1YWDkBWhoZd74WHg1QOIsdtq7IrjO+iBQpGzPY3Hu/N1HIQ40nyu6e1Eimr\n\tMODhMaTJ3x8/wlOufx8EwavIGuU2eGK0pT+h0SlXSjDjFxOH9mvMI7rTRgCPe/wvLKt4\n\ttykw8hWsIO5g4Cn6SOCZ5y7fVlAuOjpot3SmuPeKWyTi7TxxAeT23v8Zr7ksCOn+d9yM\n\tRtaA==","X-Gm-Message-State":"AOAM532meJHKPT3TSHy0JF1fIM7bz/KG+2MbuNOIrZGOhGqL7z91P9Xy\n\tlp0HQrXCc/oQ0xECy+VTpUhVsD3ENQw4mg==","X-Google-Smtp-Source":"ABdhPJwerZw0JPPolHF8wYijdqS0tMqNxBzv6eNDhwezjqyijtp7abEIm0ctnyPdWwmC1cp20nAdQw==","X-Received":"by 2002:a05:6512:50c:: with SMTP id\n\to12mr4851077lfb.192.1600079119670; \n\tMon, 14 Sep 2020 03:25:19 -0700 (PDT)","Date":"Mon, 14 Sep 2020 12:25:18 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20200914102518.GG1127199@oden.dyn.berto.se>","References":"<20200813005246.3265807-1-niklas.soderlund@ragnatech.se>\n\t<20200813005246.3265807-9-niklas.soderlund@ragnatech.se>\n\t<20200820090116.zavavgntn3k2lcg2@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200820090116.zavavgntn3k2lcg2@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH 08/13] libcamera: pipeline: rkisp1:\n\tPrefix main path video and resizer","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>"}},{"id":12492,"web_url":"https://patchwork.libcamera.org/comment/12492/","msgid":"<20200914102744.GH1127199@oden.dyn.berto.se>","date":"2020-09-14T10:27:44","subject":"Re: [libcamera-devel] [PATCH 08/13] libcamera: pipeline: rkisp1:\n\tPrefix main path video and resizer","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nOn 2020-08-20 18:20:07 +0300, Laurent Pinchart wrote:\n> Hi Niklas,\n> \n> Thank you for the patch.\n> \n> On Thu, Aug 13, 2020 at 02:52:41AM +0200, Niklas Söderlund wrote:\n> > In preparation of supporting both the main and self path prefix the main\n> > path specific variables with mainPath.\n> > \n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > ---\n> >  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 82 ++++++++++++------------\n> >  1 file changed, 41 insertions(+), 41 deletions(-)\n> > \n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > index 59614a9f470b7802..60179a1151f18491 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > @@ -66,7 +66,7 @@ struct RkISP1FrameInfo {\n> >  \n> >  \tFrameBuffer *paramBuffer;\n> >  \tFrameBuffer *statBuffer;\n> > -\tFrameBuffer *videoBuffer;\n> > +\tFrameBuffer *mainPathBuffer;\n> >  \n> >  \tbool paramFilled;\n> >  \tbool paramDequeued;\n> > @@ -131,7 +131,7 @@ class RkISP1CameraData : public CameraData\n> >  public:\n> >  \tRkISP1CameraData(PipelineHandler *pipe, V4L2VideoDevice *video)\n> >  \t\t: CameraData(pipe), sensor_(nullptr), frame_(0),\n> > -\t\t  frameInfo_(pipe), video_(video)\n> > +\t\t  frameInfo_(pipe), mainPathVideo_(video)\n> >  \t{\n> >  \t}\n> >  \n> > @@ -142,14 +142,14 @@ public:\n> >  \n> >  \tint loadIPA();\n> >  \n> > -\tStream stream_;\n> > +\tStream mainPathStream_;\n> >  \tCameraSensor *sensor_;\n> >  \tunsigned int frame_;\n> >  \tstd::vector<IPABuffer> ipaBuffers_;\n> >  \tRkISP1Frames frameInfo_;\n> >  \tRkISP1Timeline timeline_;\n> >  \n> > -\tV4L2VideoDevice *video_;\n> > +\tV4L2VideoDevice *mainPathVideo_;\n> >  \n> >  private:\n> >  \tvoid queueFrameAction(unsigned int frame,\n> > @@ -225,8 +225,8 @@ private:\n> >  \n> >  \tMediaDevice *media_;\n> >  \tV4L2Subdevice *isp_;\n> > -\tV4L2Subdevice *resizer_;\n> > -\tV4L2VideoDevice *video_;\n> > +\tV4L2Subdevice *mainPathResizer_;\n> > +\tV4L2VideoDevice *mainPathVideo_;\n> >  \tV4L2VideoDevice *param_;\n> >  \tV4L2VideoDevice *stat_;\n> \n> Would it make sense to create a RkISP1Path class and move the resizer\n> anv video node there ? The RkISP1Path instances would be stored in\n> PipelineHandlerRkISP1. I think we can drop the video_ member of\n> RkISP1CameraData and access it from the pipe in\n> RkISP1CameraData::validate().\n\nI think this is a good idea. I do however think we should do this in a \nseparate series, either before this series or on-top. I really hate \nhaving to post series as large as this as they take forever to get \nmerged and extending it with more stuff will only make it harder ;-)\n\nWould you be OK with this work being done on-top?\n\n> \n> >  \n> > @@ -259,8 +259,8 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n> >  \t}\n> >  \tFrameBuffer *statBuffer = pipe_->availableStatBuffers_.front();\n> >  \n> > -\tFrameBuffer *videoBuffer = request->findBuffer(&data->stream_);\n> > -\tif (!videoBuffer) {\n> > +\tFrameBuffer *mainPathBuffer = request->findBuffer(&data->mainPathStream_);\n> > +\tif (!mainPathBuffer) {\n> >  \t\tLOG(RkISP1, Error)\n> >  \t\t\t<< \"Attempt to queue request with invalid stream\";\n> >  \t\treturn nullptr;\n> > @@ -274,7 +274,7 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n> >  \tinfo->frame = frame;\n> >  \tinfo->request = request;\n> >  \tinfo->paramBuffer = paramBuffer;\n> > -\tinfo->videoBuffer = videoBuffer;\n> > +\tinfo->mainPathBuffer = mainPathBuffer;\n> >  \tinfo->statBuffer = statBuffer;\n> >  \tinfo->paramFilled = false;\n> >  \tinfo->paramDequeued = false;\n> > @@ -333,7 +333,7 @@ RkISP1FrameInfo *RkISP1Frames::find(FrameBuffer *buffer)\n> >  \n> >  \t\tif (info->paramBuffer == buffer ||\n> >  \t\t    info->statBuffer == buffer ||\n> > -\t\t    info->videoBuffer == buffer)\n> > +\t\t    info->mainPathBuffer == buffer)\n> >  \t\t\treturn info;\n> >  \t}\n> >  \n> > @@ -405,7 +405,7 @@ protected:\n> >  \n> >  \t\tpipe_->param_->queueBuffer(info->paramBuffer);\n> >  \t\tpipe_->stat_->queueBuffer(info->statBuffer);\n> > -\t\tpipe_->video_->queueBuffer(info->videoBuffer);\n> > +\t\tpipe_->mainPathVideo_->queueBuffer(info->mainPathBuffer);\n> >  \t}\n> >  \n> >  private:\n> > @@ -544,10 +544,10 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n> >  \tcfg.bufferCount = RKISP1_BUFFER_COUNT;\n> >  \n> >  \tV4L2DeviceFormat format = {};\n> > -\tformat.fourcc = data_->video_->toV4L2PixelFormat(cfg.pixelFormat);\n> > +\tformat.fourcc = data_->mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat);\n> >  \tformat.size = cfg.size;\n> >  \n> > -\tint ret = data_->video_->tryFormat(&format);\n> > +\tint ret = data_->mainPathVideo_->tryFormat(&format);\n> >  \tif (ret)\n> >  \t\treturn Invalid;\n> >  \n> > @@ -558,8 +558,8 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n> >  }\n> >  \n> >  PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)\n> > -\t: PipelineHandler(manager), isp_(nullptr), resizer_(nullptr),\n> > -\t  video_(nullptr), param_(nullptr), stat_(nullptr)\n> > +\t: PipelineHandler(manager), isp_(nullptr), mainPathResizer_(nullptr),\n> > +\t  mainPathVideo_(nullptr), param_(nullptr), stat_(nullptr)\n> >  {\n> >  }\n> >  \n> > @@ -567,8 +567,8 @@ PipelineHandlerRkISP1::~PipelineHandlerRkISP1()\n> >  {\n> >  \tdelete param_;\n> >  \tdelete stat_;\n> > -\tdelete video_;\n> > -\tdelete resizer_;\n> > +\tdelete mainPathVideo_;\n> > +\tdelete mainPathResizer_;\n> >  \tdelete isp_;\n> >  }\n> >  \n> > @@ -649,7 +649,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n> >  \n> >  \tLOG(RkISP1, Debug) << \"ISP output pad configured with \" << format.toString();\n> >  \n> > -\tret = resizer_->setFormat(0, &format);\n> > +\tret = mainPathResizer_->setFormat(0, &format);\n> >  \tif (ret < 0)\n> >  \t\treturn ret;\n> >  \n> > @@ -659,23 +659,23 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n> >  \n> >  \tLOG(RkISP1, Debug) << \"Configuring resizer output pad with \" << format.toString();\n> >  \n> > -\tret = resizer_->setFormat(1, &format);\n> > +\tret = mainPathResizer_->setFormat(1, &format);\n> >  \tif (ret < 0)\n> >  \t\treturn ret;\n> >  \n> >  \tLOG(RkISP1, Debug) << \"Resizer output pad configured with \" << format.toString();\n> >  \n> >  \tV4L2DeviceFormat outputFormat = {};\n> > -\toutputFormat.fourcc = video_->toV4L2PixelFormat(cfg.pixelFormat);\n> > +\toutputFormat.fourcc = mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat);\n> >  \toutputFormat.size = cfg.size;\n> >  \toutputFormat.planesCount = 2;\n> >  \n> > -\tret = video_->setFormat(&outputFormat);\n> > +\tret = mainPathVideo_->setFormat(&outputFormat);\n> >  \tif (ret)\n> >  \t\treturn ret;\n> >  \n> >  \tif (outputFormat.size != cfg.size ||\n> > -\t    outputFormat.fourcc != video_->toV4L2PixelFormat(cfg.pixelFormat)) {\n> > +\t    outputFormat.fourcc != mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat)) {\n> >  \t\tLOG(RkISP1, Error)\n> >  \t\t\t<< \"Unable to configure capture in \" << cfg.toString();\n> >  \t\treturn -EINVAL;\n> > @@ -693,7 +693,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n> >  \tif (ret)\n> >  \t\treturn ret;\n> >  \n> > -\tcfg.setStream(&data->stream_);\n> > +\tcfg.setStream(&data->mainPathStream_);\n> >  \n> >  \treturn 0;\n> >  }\n> > @@ -702,17 +702,17 @@ int PipelineHandlerRkISP1::exportFrameBuffers(Camera *camera, Stream *stream,\n> >  \t\t\t\t\t      std::vector<std::unique_ptr<FrameBuffer>> *buffers)\n> >  {\n> >  \tunsigned int count = stream->configuration().bufferCount;\n> > -\treturn video_->exportBuffers(count, buffers);\n> > +\treturn mainPathVideo_->exportBuffers(count, buffers);\n> >  }\n> >  \n> >  int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n> >  {\n> >  \tRkISP1CameraData *data = cameraData(camera);\n> > -\tunsigned int count = data->stream_.configuration().bufferCount;\n> > +\tunsigned int count = data->mainPathStream_.configuration().bufferCount;\n> >  \tunsigned int ipaBufferId = 1;\n> >  \tint ret;\n> >  \n> > -\tret = video_->importBuffers(count);\n> > +\tret = mainPathVideo_->importBuffers(count);\n> >  \tif (ret < 0)\n> >  \t\tgoto error;\n> >  \n> > @@ -745,7 +745,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n> >  error:\n> >  \tparamBuffers_.clear();\n> >  \tstatBuffers_.clear();\n> > -\tvideo_->releaseBuffers();\n> > +\tmainPathVideo_->releaseBuffers();\n> >  \n> >  \treturn ret;\n> >  }\n> > @@ -776,8 +776,8 @@ int PipelineHandlerRkISP1::freeBuffers(Camera *camera)\n> >  \tif (stat_->releaseBuffers())\n> >  \t\tLOG(RkISP1, Error) << \"Failed to release stat buffers\";\n> >  \n> > -\tif (video_->releaseBuffers())\n> > -\t\tLOG(RkISP1, Error) << \"Failed to release video buffers\";\n> > +\tif (mainPathVideo_->releaseBuffers())\n> > +\t\tLOG(RkISP1, Error) << \"Failed to release main path buffers\";\n> >  \n> >  \treturn 0;\n> >  }\n> > @@ -821,7 +821,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n> >  \t\treturn ret;\n> >  \t}\n> >  \n> > -\tret = video_->streamOn();\n> > +\tret = mainPathVideo_->streamOn();\n> >  \tif (ret) {\n> >  \t\tparam_->streamOff();\n> >  \t\tstat_->streamOff();\n> > @@ -846,8 +846,8 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n> >  \n> >  \tstd::map<unsigned int, IPAStream> streamConfig;\n> >  \tstreamConfig[0] = {\n> > -\t\t.pixelFormat = data->stream_.configuration().pixelFormat,\n> > -\t\t.size = data->stream_.configuration().size,\n> > +\t\t.pixelFormat = data->mainPathStream_.configuration().pixelFormat,\n> > +\t\t.size = data->mainPathStream_.configuration().size,\n> >  \t};\n> >  \n> >  \tstd::map<unsigned int, const ControlInfoMap &> entityControls;\n> > @@ -865,7 +865,7 @@ void PipelineHandlerRkISP1::stop(Camera *camera)\n> >  \tRkISP1CameraData *data = cameraData(camera);\n> >  \tint ret;\n> >  \n> > -\tret = video_->streamOff();\n> > +\tret = mainPathVideo_->streamOff();\n> >  \tif (ret)\n> >  \t\tLOG(RkISP1, Warning)\n> >  \t\t\t<< \"Failed to stop camera \" << camera->id();\n> > @@ -950,7 +950,7 @@ int PipelineHandlerRkISP1::initLinks(const Camera *camera,\n> >  \n> >  \tfor (const StreamConfiguration &cfg : config) {\n> >  \t\tstd::string resizer;\n> > -\t\tif (cfg.stream() == &data->stream_)\n> > +\t\tif (cfg.stream() == &data->mainPathStream_)\n> >  \t\t\tresizer = \"rkisp1_resizer_mainpath\";\n> >  \t\telse\n> >  \t\t\treturn -EINVAL;\n> > @@ -972,7 +972,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n> >  \tint ret;\n> >  \n> >  \tstd::unique_ptr<RkISP1CameraData> data =\n> > -\t\tstd::make_unique<RkISP1CameraData>(this, video_);\n> > +\t\tstd::make_unique<RkISP1CameraData>(this, mainPathVideo_);\n> >  \n> >  \tControlInfoMap::Map ctrls;\n> >  \tctrls.emplace(std::piecewise_construct,\n> > @@ -993,7 +993,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n> >  \tif (ret)\n> >  \t\treturn ret;\n> >  \n> > -\tstd::set<Stream *> streams{ &data->stream_ };\n> > +\tstd::set<Stream *> streams{ &data->mainPathStream_ };\n> >  \tstd::shared_ptr<Camera> camera =\n> >  \t\tCamera::create(this, data->sensor_->id(), streams);\n> >  \tregisterCamera(std::move(camera), std::move(data));\n> > @@ -1023,13 +1023,13 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n> >  \tif (isp_->open() < 0)\n> >  \t\treturn false;\n> >  \n> > -\tresizer_ = V4L2Subdevice::fromEntityName(media_, \"rkisp1_resizer_mainpath\");\n> > -\tif (resizer_->open() < 0)\n> > +\tmainPathResizer_ = V4L2Subdevice::fromEntityName(media_, \"rkisp1_resizer_mainpath\");\n> > +\tif (mainPathResizer_->open() < 0)\n> >  \t\treturn false;\n> >  \n> >  \t/* Locate and open the capture video node. */\n> > -\tvideo_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_mainpath\");\n> > -\tif (video_->open() < 0)\n> > +\tmainPathVideo_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_mainpath\");\n> > +\tif (mainPathVideo_->open() < 0)\n> >  \t\treturn false;\n> >  \n> >  \tstat_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_stats\");\n> > @@ -1040,7 +1040,7 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n> >  \tif (param_->open() < 0)\n> >  \t\treturn false;\n> >  \n> > -\tvideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);\n> > +\tmainPathVideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);\n> >  \tstat_->bufferReady.connect(this, &PipelineHandlerRkISP1::statReady);\n> >  \tparam_->bufferReady.connect(this, &PipelineHandlerRkISP1::paramReady);\n> >  \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 A2F15BF01C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Sep 2020 10:27:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 288AB62D99;\n\tMon, 14 Sep 2020 12:27:47 +0200 (CEST)","from mail-lj1-x232.google.com (mail-lj1-x232.google.com\n\t[IPv6:2a00:1450:4864:20::232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A5AD162B90\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Sep 2020 12:27:45 +0200 (CEST)","by mail-lj1-x232.google.com with SMTP id a22so18108870ljp.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Sep 2020 03:27:45 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tj20sm3287241lfe.132.2020.09.14.03.27.44\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 14 Sep 2020 03:27:44 -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=\"dZchb0JT\"; 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=RgzCG/J4tQIK7VH4Sh45L46NGdwUQWztzw30nNVGR40=;\n\tb=dZchb0JTpwTa577aAitn72Saxya4Zks7Av/HEy3uFvuYLfMmhM9d7tT91aPvzCY2xd\n\tvMukYPPYkTcKuoGT8phbca1Gq3aT2681msuLYzBWmXQr8CHe6mdcRtF7pqvw+d41OukL\n\twQ7G3UJ50BTO/EgaACMza2XWPxYZm3PTyVmydepiJP2HvBq/9WC77cLEC7KdxsmfzdVM\n\tJlMg9Ta/i5G++OZVs+qKjvdRKB3CSoqGcTZrQHliSYyqqpMXL14oS7HilOMeGQzefH6W\n\tLfAWEY8E7s7oThsHMIv1tXxrqyjQx5b4rOT74vCshkm4VUVlw8oBkBpty0DljvqtYvkm\n\tJ3+g==","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=RgzCG/J4tQIK7VH4Sh45L46NGdwUQWztzw30nNVGR40=;\n\tb=BwVLKn1vSX+BtO05kWY1TnbcGLnl4MyVmesgU9cs+ahEVbYs7VflMZfTI/9+1OaXpy\n\ti06i56fmROeKdd/1LyC2VB2aQmtJNO5qyZaxrB/buOX4ofwSoFSFYhfI6FhZd7J7s7VE\n\tkc8PPi5ymkTvjQDhL88Lo1lvoEfy5dKXhit6WDNQ0pKUJrytD0/B9GoB46vRheytW2Ht\n\t/4ZcOnobtStL6HPtThqSkbmPungZRGIur6taD6qfgohtdKhx2HKqeN2EPKZYnl3TGaVc\n\tkuoybQ2GgFf84lemt+N8HT0r/k8rRp1jXE9uMWnr3SD8mT4kYWKbfbBt2fuI2AzUJTBu\n\tcpog==","X-Gm-Message-State":"AOAM531MSV/vES+zZLDA3pzcIuii2h0jWK3aMARI+gAniMmXeXwsomaO\n\tuhspQyKxsbPXY+EHH2zQy+0YYCQ2C8+ELg==","X-Google-Smtp-Source":"ABdhPJxwWhnaD3FdiwSLRX2K2upIwF3BlMcZ54tmtyZwDsEgFuwoHzT3VahtynMefW/NrhLDXolPZw==","X-Received":"by 2002:a2e:90ca:: with SMTP id\n\to10mr5043123ljg.155.1600079265021; \n\tMon, 14 Sep 2020 03:27:45 -0700 (PDT)","Date":"Mon, 14 Sep 2020 12:27:44 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20200914102744.GH1127199@oden.dyn.berto.se>","References":"<20200813005246.3265807-1-niklas.soderlund@ragnatech.se>\n\t<20200813005246.3265807-9-niklas.soderlund@ragnatech.se>\n\t<20200820152007.GN6593@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200820152007.GN6593@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 08/13] libcamera: pipeline: rkisp1:\n\tPrefix main path video and resizer","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>"}}]