[{"id":26188,"web_url":"https://patchwork.libcamera.org/comment/26188/","msgid":"<167295537942.541190.258550488714659447@Monstersaurus>","date":"2023-01-05T21:49:39","subject":"Re: [libcamera-devel] [PATCH v3 0/9] Virtual pipeline handler","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Harvey,\n\nQuoting Harvey Yang via libcamera-devel (2023-01-05 04:37:17)\n> Hi all,\n> \n> This is the third version of POC patches of the virtual/fake pipeline\n> handler. Thanks to Kieran's comments, I split the patches and added a\n> base class MediaDeviceBase. Still need to work on the buffer allocation,\n> virtual config file, and virtual video for testing.\n> \n> Please take a look and let me know if the design makes sense.\n> \n> BR,\n> Harvey\n> \n> Harvey Yang (9):\n>   libcamera: pipeline: Introduce skeleton Virtual Pipeline\n>   libcamera: Add MediaDeviceBase\n>   libcamera: Use MediaDeviceBase in base classes\n>   libcamera: Add MediaDeviceVirtual\n>   libcamera: pipeline: virtual: Add MediaDeviceVirtual\n>   libcamera: pipeline: virtual: Create a Camera\n>   libcamera: pipeline: virtual: Generate and validate\n>     StreamConfigurations\n>   libcamera: pipeline: virtual: Queue requests\n>   libcamera: pipeline: virtual: Set camera properties & controls\n\nAha, I see you took the patches from the vivid series quite literally.\nThose are broken down into a distinct series to help guide the developer\ncreating a new pipeline handler from scratch.\n\nI'd be interested to know how you found going through the development in\nthat way, but for posting of a virtual pipeline handler, I think\nsquashing patches 1, 5, 6, 7, 8 and 9 would be appropriate.\n\nI'm much happier seeing this development start from a clean base, than\nthe IPU3 handler, so I no longer have comments regarding stripping out\nof various IPU3 specific items.\n\nI'm weary of the need to interact with MediaDeviceBase and\nMediaDeviceVirtual though. Those are quite intrusive, however I\nunderstand the desire to be able to instantiate the pipeline handler\nwithout having a real underlying device.\n\nWhat issues block this implementation without creating a new base class?\n\nI'm aware of the issue in PipelineHandler::registerCamera() where the\nbase PipelineHandler expects to have a list of mediaDevices_.\n\nIs this just for handling PipelineHandler::acquire()?\n\n\n> \n>  .../libcamera/internal/device_enumerator.h    |  12 +-\n>  .../internal/device_enumerator_sysfs.h        |   4 +-\n>  .../internal/device_enumerator_udev.h         |   8 +-\n>  include/libcamera/internal/media_device.h     |  35 +-\n>  .../libcamera/internal/media_device_base.h    |  68 ++++\n>  .../libcamera/internal/media_device_virtual.h |  21 ++\n>  include/libcamera/internal/meson.build        |   2 +\n>  include/libcamera/internal/pipeline_handler.h |  12 +-\n>  meson_options.txt                             |   2 +-\n>  src/libcamera/device_enumerator.cpp           |  30 +-\n>  src/libcamera/device_enumerator_sysfs.cpp     |   4 +-\n>  src/libcamera/device_enumerator_udev.cpp      |   4 +-\n>  src/libcamera/media_device.cpp                |  97 +-----\n>  src/libcamera/media_device_base.cpp           | 140 ++++++++\n>  src/libcamera/media_device_virtual.cpp        |  22 ++\n>  src/libcamera/meson.build                     |   2 +\n>  src/libcamera/pipeline/imx8-isi/imx8-isi.cpp  |   2 +-\n>  src/libcamera/pipeline/ipu3/ipu3.cpp          |   4 +-\n>  .../pipeline/raspberrypi/raspberrypi.cpp      |   4 +-\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   2 +-\n>  src/libcamera/pipeline/simple/simple.cpp      |   4 +-\n>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |   2 +-\n>  src/libcamera/pipeline/vimc/vimc.cpp          |   2 +-\n>  src/libcamera/pipeline/virtual/meson.build    |   5 +\n>  src/libcamera/pipeline/virtual/virtual.cpp    | 301 ++++++++++++++++++\n>  src/libcamera/pipeline_handler.cpp            |  18 +-\n>  26 files changed, 629 insertions(+), 178 deletions(-)\n>  create mode 100644 include/libcamera/internal/media_device_base.h\n>  create mode 100644 include/libcamera/internal/media_device_virtual.h\n>  create mode 100644 src/libcamera/media_device_base.cpp\n>  create mode 100644 src/libcamera/media_device_virtual.cpp\n>  create mode 100644 src/libcamera/pipeline/virtual/meson.build\n>  create mode 100644 src/libcamera/pipeline/virtual/virtual.cpp\n> \n> -- \n> 2.39.0.314.g84b9a713c41-goog\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 9D13EBD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  5 Jan 2023 21:49:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D53BC625CF;\n\tThu,  5 Jan 2023 22:49:43 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 67CA3604D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  5 Jan 2023 22:49:42 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C6DEC4AE;\n\tThu,  5 Jan 2023 22:49:41 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1672955383;\n\tbh=6xupL/qrRM+l5S88hRVWQKlZTTa08Ci/V7El6ZJLtME=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=br5JKm7GZsbypr1B2737s5LvELT9Hjz32mbtrGOEbAIQtd/WGxyf00UsCi7Oh8Bhz\n\twVdQXItlDOcSm/LE57KNC1k5EEFIaYhZlHs6yrZajHx4evS5c7aFqbaiLDucwTNNt2\n\tkx3msLhBN71JZAwVEp+SqjXQxsUipCWak8auZCwqJBHnIGjhWi3WQy9LtUq+4s1TF5\n\tzB5+xrqUVoqHlA9gkc56mYBISRc6H53tkUCzUWHH/Sev/GGpD427RNYHl7Ozkog2Rg\n\tdgx/ShzwIC9+thmwM+luDw1qbPM7oNMQ5MNbFoFFei9aHu03Kdw9eB+SsAwMc6OjCc\n\tv0gKDEVU65HUg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1672955381;\n\tbh=6xupL/qrRM+l5S88hRVWQKlZTTa08Ci/V7El6ZJLtME=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=SEBlhlzu5oTAS5AHVElRqnQisfPzszqTi/E8s9jBfGClDaJusWkvqKwoGO3YDqNqN\n\tZk62f8QWycsoo804SqMIE9ZCsLN8oYFyIPQXJyCNt+zLsQdQ6jieNgilsSNGaCMB1q\n\thvx1gWonFuP3zc+auhxMUBphQSMeq7BDqAu+LyJI="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"SEBlhlzu\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20230105043726.679968-1-chenghaoyang@google.com>","References":"<20230105043726.679968-1-chenghaoyang@google.com>","To":"Harvey Yang <chenghaoyang@chromium.org>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 05 Jan 2023 21:49:39 +0000","Message-ID":"<167295537942.541190.258550488714659447@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v3 0/9] Virtual pipeline handler","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Harvey Yang <chenghaoyang@google.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]