{"id":21192,"url":"https://patchwork.libcamera.org/api/covers/21192/?format=json","web_url":"https://patchwork.libcamera.org/cover/21192/","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":"<20240907143110.2210711-1-chenghaoyang@google.com>","date":"2024-09-07T14:28:25","name":"[v11,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/21192/mbox/","series":[{"id":4567,"url":"https://patchwork.libcamera.org/api/series/4567/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4567","date":"2024-09-07T14:28:25","name":"Add VirtualPipelineHandler","version":11,"mbox":"https://patchwork.libcamera.org/series/4567/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/21192/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 04515C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  7 Sep 2024 14:31:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DAF7B634EE;\n\tSat,  7 Sep 2024 16:31:20 +0200 (CEST)","from mail-pl1-x634.google.com (mail-pl1-x634.google.com\n\t[IPv6:2607:f8b0:4864:20::634])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 82705633CC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  7 Sep 2024 16:31:18 +0200 (CEST)","by mail-pl1-x634.google.com with SMTP id\n\td9443c01a7336-2021c08b95cso31058815ad.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 07 Sep 2024 07:31:18 -0700 (PDT)","from chenghaoyang-low.c.googlers.com.com\n\t(0.223.81.34.bc.googleusercontent.com. [34.81.223.0])\n\tby smtp.gmail.com with ESMTPSA id\n\td9443c01a7336-20710e33974sm9208935ad.104.2024.09.07.07.31.14\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 07 Sep 2024 07:31:15 -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=\"MRoeZC3J\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1725719476; x=1726324276;\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=i3YBnRM/v+P6Z6SJXMrgKt7eUs8bn02LJfFaP/2hlAU=;\n\tb=MRoeZC3JNvguSJEuD/kQIoilsmLxURHShiGqxpHya1DviqnTd7p2p8BGs4fCCm/BrH\n\tefP/fCKNXLxA5jvyvZLK5qe54Id30AqIFE/llw7ykEfDTcZBIVEZwzmCLWJilhP9XEJP\n\tTxXPfxqW2BTSPHq3Hi8XVtNV3nlNqWdAKuDTg=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1725719476; x=1726324276;\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=i3YBnRM/v+P6Z6SJXMrgKt7eUs8bn02LJfFaP/2hlAU=;\n\tb=TccMHEpkSxWy/vonaqsv5kob72TIcKBigggOdge4wD1scgkZVG/Hnaoy9UIvzVshm0\n\tE1bUGo0ie4If+/h/JtKK3oTD2TneNXdg8tiqoPs7IbI2mlWnBvzyN02UoICyJ2cPgxpl\n\tN8pkzZcv0+t/kIk9ja52XhP6D/k6/ad+oD3wTAkE83xzwgOQmJMJlu8n6TZaUPVdFHtC\n\t1OWc6K6kiaOH/zYonX87ppH3ZEUuQu2hO63zWRAki3W6ExTO3J2CZlGKnc765W0p2g+h\n\tvaHkYEX5+e+iRSORNVDDPq3fWu9F5AAK/8rfvxY09/CFSC6rToTGHa2jenbRDhCeyG7w\n\tpuOA==","X-Gm-Message-State":"AOJu0YxQemrGLGhv7H2N4GzkZ1nlIY+7b2urr0t/1QDJSZMQAl1+hfWB\n\t7UHJ0r9CCFW7eGRG30EkQRA7HAYj73Zy0FEw/kf65GOutwsP0tsuNWV3sxeEfJRJqI+i0RAvscI\n\t=","X-Google-Smtp-Source":"AGHT+IFFt50+vdr0G2fprVRhMz2as00BmB8m6svSJx8ig3laqD3v7Q9f0ivIWWI4CyY/Y56D6NYcrQ==","X-Received":"by 2002:a17:902:d501:b0:205:76c1:3742 with SMTP id\n\td9443c01a7336-206ee92559dmr85126165ad.3.1725719476268; \n\tSat, 07 Sep 2024 07:31:16 -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 v11 0/7] Add VirtualPipelineHandler","Date":"Sat,  7 Sep 2024 14:28:25 +0000","Message-ID":"<20240907143110.2210711-1-chenghaoyang@google.com>","X-Mailer":"git-send-email 2.46.0.469.g59c65b2a67-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":"Hi 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/1266568\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\nUpdate in v11:\n- Allowed a single value in the config file's frame_rates field.\n\nUpdate 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\nUpdate in v9: Allocate contiguous memory for planes in the same\nFrameBuffer.\n\nBR,\nHarvey\n\nHarvey Yang (4):\n  libcamera: add DmaBufAllocator::exportBuffers()\n  libcamera: Remove PipelineHandler Fatal check of non-empty\n    MediaDevices\n  libcamera: virtual: Add VirtualPipelineHandler\n  libcamera: software_isp: Refactor SoftwareIsp to use\n    DmaBufAllocator::exportBuffers\n\nKonami Shu (3):\n  libcamera: pipeline: Add test pattern for VirtualPipelineHandler\n  libcamera: virtual: Read config and register cameras based on the\n    config\n  libcamera: virtual: Add ImageFrameGenerator\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           |  55 +++\n src/libcamera/pipeline/virtual/README.md      |  50 +++\n .../pipeline/virtual/data/virtual.yaml        |  36 ++\n .../pipeline/virtual/frame_generator.h        |  28 ++\n .../virtual/image_frame_generator.cpp         | 178 ++++++++++\n .../pipeline/virtual/image_frame_generator.h  |  54 +++\n src/libcamera/pipeline/virtual/meson.build    |  13 +\n src/libcamera/pipeline/virtual/parser.cpp     | 257 ++++++++++++++\n src/libcamera/pipeline/virtual/parser.h       |  44 +++\n .../virtual/test_pattern_generator.cpp        | 140 ++++++++\n .../pipeline/virtual/test_pattern_generator.h |  57 ++++\n src/libcamera/pipeline/virtual/utils.h        |  17 +\n src/libcamera/pipeline/virtual/virtual.cpp    | 323 ++++++++++++++++++\n src/libcamera/pipeline/virtual/virtual.h      | 107 ++++++\n src/libcamera/pipeline_handler.cpp            |  11 +-\n src/libcamera/software_isp/software_isp.cpp   |  20 +-\n src/meson.build                               |  19 ++\n 21 files changed, 1403 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/utils.h\n create mode 100644 src/libcamera/pipeline/virtual/virtual.cpp\n create mode 100644 src/libcamera/pipeline/virtual/virtual.h"}