{"id":21384,"url":"https://patchwork.libcamera.org/api/covers/21384/?format=json","web_url":"https://patchwork.libcamera.org/cover/21384/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240926163141.1593026-1-chenghaoyang@google.com>","date":"2024-09-26T16:29:49","name":"[v13,0/7] Add VirtualPipelineHandler","submitter":{"id":117,"url":"https://patchwork.libcamera.org/api/people/117/?format=json","name":"Cheng-Hao Yang","email":"chenghaoyang@chromium.org"},"mbox":"https://patchwork.libcamera.org/cover/21384/mbox/","series":[{"id":4632,"url":"https://patchwork.libcamera.org/api/series/4632/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4632","date":"2024-09-26T16:29:49","name":"Add VirtualPipelineHandler","version":13,"mbox":"https://patchwork.libcamera.org/series/4632/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/21384/comments/","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 E8026C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Sep 2024 16:31:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A50AE63510;\n\tThu, 26 Sep 2024 18:31:49 +0200 (CEST)","from mail-pl1-x631.google.com (mail-pl1-x631.google.com\n\t[IPv6:2607:f8b0:4864:20::631])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3D938634F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Sep 2024 18:31:47 +0200 (CEST)","by mail-pl1-x631.google.com with SMTP id\n\td9443c01a7336-20b0b2528d8so12749585ad.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Sep 2024 09:31:47 -0700 (PDT)","from chenghaoyang-low.c.googlers.com.com\n\t(208.158.221.35.bc.googleusercontent.com. [35.221.158.208])\n\tby smtp.gmail.com with ESMTPSA id\n\td9443c01a7336-20b37e20dffsm469035ad.170.2024.09.26.09.31.44\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 26 Sep 2024 09:31:44 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"cSz91TH2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1727368305; x=1727973105;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:from:to:cc:subject:date:message-id:reply-to;\n\tbh=b9E8L7k0+piJZbnzLkbPrZ5rHkTsO9DE/9/0puAqjhI=;\n\tb=cSz91TH231rZVLrfS5K4IbNfNCIzmghpABXTCc9Bhxcv1vseTu/Jd2ltKawHZU656s\n\tIXlz6u/hU2VbrMCbBXmqmZ87krz3988FvoW5AleQ3zIkNTX61RTVtfx/VpdTjezPP2Uq\n\tJWeAEA81TtECFTk5ehxae6WzSu2Kt9hml8Eqc=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1727368305; x=1727973105;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=b9E8L7k0+piJZbnzLkbPrZ5rHkTsO9DE/9/0puAqjhI=;\n\tb=vPf2XMFEb9315TjvL9acjI11oa1xhL1ibYRGwMGnCSRr2YrmwFkp71aannzalMAk6m\n\tq7gGjwia3sM1HRJ5M7kHfAf38mC6g+drub0G3YoTfjQyNS3IiGJXd2B2bD9YFUfn+S3V\n\txtM1iNovlz0yRActOjjpiH9m6cCLJ6TSvRvopzWGl813u15BeFDO88bZbJM2C8otqua7\n\tmUQ8h5hcXOSUT7UN3tql/P6cSNKYzHZ6q/xU7A2r+R4AqHxDKpb/NaIesqdNSlN6zdSw\n\tljvLvfWw7ZYiZ/QpPIvrymvKaOwgSahSNUsAXonr8ugjsmbPguG/bLeTQxmcFx8+jooo\n\tHfAA==","X-Gm-Message-State":"AOJu0YyrcyKCPCrwrpE7A65MfNAXHoLpbKw9UufBu5xwkWrpSI7TYKIs\n\tmv7LzVDzeglPyfJD+ZThYtGG8LfGhevyyfU1rR4f5qEHgp0LNve8GlApInIRAH65tQ7nHfRqMt4\n\t=","X-Google-Smtp-Source":"AGHT+IG2KOIN9beGb+BvkUX7lYKR6z2ZwLBtgriU/W6XpzH599EjmPUWC9cXD654bsVQocikVLS1AA==","X-Received":"by 2002:a17:902:d2ce:b0:206:a239:de67 with SMTP id\n\td9443c01a7336-20b367e7025mr4885545ad.18.1727368305160; \n\tThu, 26 Sep 2024 09:31:45 -0700 (PDT)","From":"Harvey Yang <chenghaoyang@chromium.org>","X-Google-Original-From":"Harvey Yang <chenghaoyang@google.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Harvey Yang <chenghaoyang@google.com>","Subject":"[PATCH v13 0/7] Add VirtualPipelineHandler","Date":"Thu, 26 Sep 2024 16:29:49 +0000","Message-ID":"<20240926163141.1593026-1-chenghaoyang@google.com>","X-Mailer":"git-send-email 2.46.1.824.gd892dcdcdd-goog","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Harvey Yang New message\nTue, Sep 10, 12:48 PM\nto libcamera-devel, me\n\nHi all,\n\nThis series adds virtual pipeline handler, which doesn't depend on any\nhardware, like camera sensor or ISP. Currently the configuration\nsupports test patterns and images.\n\nIt passed the gitlab pipeline:\nhttps://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1278799\n\nI've also checked that it works on qcam.\n\nI failed to pass multi_stream_test when trying to enable multiple\nstreams though. Please give me some hints what it tests and what I\nmissed:\n```\n[295:43:43.910237144] [1441841]  INFO IPAManager ipa_manager.cpp:137 libcamera is not installed. Adding '/usr/local/google/home/chenghaoyang/Workspace/libca\nmera/build/src/ipa' to the IPA search path\n[295:43:43.914030564] [1441841]  INFO Camera camera_manager.cpp:325 libcamera v0.3.1+79-8ca4f033-dirty (2024-08-29T19:18:51UTC)\n[295:43:43.915493754] [1441844] ERROR DmaBufAllocator dma_buf_allocator.cpp:120 Could not open any dma-buf provider\n[295:43:43.919118835] [1441841]  INFO IPAManager ipa_manager.cpp:137 libcamera is not installed. Adding '/usr/local/google/home/chenghaoyang/Workspace/libca\nmera/build/src/ipa' to the IPA search path\n[295:43:43.922245825] [1441841]  INFO Camera camera_manager.cpp:325 libcamera v0.3.1+79-8ca4f033-dirty (2024-08-29T19:18:51UTC)\n[295:43:43.922820175] [1441846] ERROR DmaBufAllocator dma_buf_allocator.cpp:120 Could not open any dma-buf provider\nUnable to set the pipeline to the playing state.\n```\n\nGitlab pipeline failure:\nhttps://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1260412\n\nUpdates in v13:\n- Returned an errno in `FrameGenerete::generateFrame()`\n\nUpdates in v12:\n- Added ImageFrameGenerator first, then add Parser.\n- Removed ScaleMode argument, as only Fill is supported now.\n- Fixed bug of Stream's configuration usage in configure().\n\nUpdates in v11:\n- Allowed a single value in the config file's frame_rates field.\n\nUpdates in v10:\nApply fixes according to Jacopo's and Barnabás' comments.\n- Split test_pattern and path fields in the yaml format.\n- Let FrameGenerators control frameCount_.\n- Fixed match() returning values.\n\nUpdates in v9: Allocate contiguous memory for planes in the same\nFrameBuffer.\n\nBR,\nHarvey\n\nHarvey Yang (6):\n  libcamera: add DmaBufAllocator::exportBuffers()\n  libcamera: Remove PipelineHandler Fatal check of non-empty\n    MediaDevices\n  libcamera: virtual: Add VirtualPipelineHandler\n  libcamera: virtual: Add ImageFrameGenerator\n  libcamera: virtual: Read config and register cameras based on the\n    config\n  libcamera: software_isp: Refactor SoftwareIsp to use\n    DmaBufAllocator::exportBuffers\n\nKonami Shu (1):\n  libcamera: pipeline: Add test pattern for VirtualPipelineHandler\n\n .../libcamera/internal/dma_buf_allocator.h    |  13 +\n meson.build                                   |   1 +\n meson_options.txt                             |   3 +-\n src/android/meson.build                       |  19 -\n src/libcamera/dma_buf_allocator.cpp           |  57 +++\n src/libcamera/pipeline/virtual/README.md      |  48 +++\n .../pipeline/virtual/data/virtual.yaml        |  36 ++\n .../pipeline/virtual/frame_generator.h        |  29 ++\n .../virtual/image_frame_generator.cpp         | 175 ++++++++\n .../pipeline/virtual/image_frame_generator.h  |  51 +++\n src/libcamera/pipeline/virtual/meson.build    |  13 +\n src/libcamera/pipeline/virtual/parser.cpp     | 243 +++++++++++\n src/libcamera/pipeline/virtual/parser.h       |  39 ++\n .../virtual/test_pattern_generator.cpp        | 137 +++++++\n .../pipeline/virtual/test_pattern_generator.h |  53 +++\n src/libcamera/pipeline/virtual/virtual.cpp    | 382 ++++++++++++++++++\n src/libcamera/pipeline/virtual/virtual.h      |  61 +++\n src/libcamera/pipeline_handler.cpp            |  11 +-\n src/libcamera/software_isp/software_isp.cpp   |  20 +-\n src/meson.build                               |  19 +\n 20 files changed, 1368 insertions(+), 42 deletions(-)\n create mode 100644 src/libcamera/pipeline/virtual/README.md\n create mode 100644 src/libcamera/pipeline/virtual/data/virtual.yaml\n create mode 100644 src/libcamera/pipeline/virtual/frame_generator.h\n create mode 100644 src/libcamera/pipeline/virtual/image_frame_generator.cpp\n create mode 100644 src/libcamera/pipeline/virtual/image_frame_generator.h\n create mode 100644 src/libcamera/pipeline/virtual/meson.build\n create mode 100644 src/libcamera/pipeline/virtual/parser.cpp\n create mode 100644 src/libcamera/pipeline/virtual/parser.h\n create mode 100644 src/libcamera/pipeline/virtual/test_pattern_generator.cpp\n create mode 100644 src/libcamera/pipeline/virtual/test_pattern_generator.h\n create mode 100644 src/libcamera/pipeline/virtual/virtual.cpp\n create mode 100644 src/libcamera/pipeline/virtual/virtual.h"}