{"id":21206,"url":"https://patchwork.libcamera.org/api/covers/21206/?format=json","web_url":"https://patchwork.libcamera.org/cover/21206/","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":"<20240910044834.2477701-1-chenghaoyang@google.com>","date":"2024-09-10T04:40:13","name":"[v12,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/21206/mbox/","series":[{"id":4572,"url":"https://patchwork.libcamera.org/api/series/4572/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4572","date":"2024-09-10T04:40:13","name":"Add VirtualPipelineHandler","version":12,"mbox":"https://patchwork.libcamera.org/series/4572/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/21206/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 D63ABC324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 Sep 2024 04:48:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 413C5634FA;\n\tTue, 10 Sep 2024 06:48:44 +0200 (CEST)","from mail-pf1-x435.google.com (mail-pf1-x435.google.com\n\t[IPv6:2607:f8b0:4864:20::435])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7482E618F2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 Sep 2024 06:48:41 +0200 (CEST)","by mail-pf1-x435.google.com with SMTP id\n\td2e1a72fcca58-718e5edf270so2004860b3a.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 09 Sep 2024 21:48:41 -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\td2e1a72fcca58-71909092522sm530734b3a.111.2024.09.09.21.48.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 09 Sep 2024 21:48:38 -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=\"k6pqI2GV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1725943719; x=1726548519;\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=Oyf/EcYlUEWOIgQGxM5kcq423hpKGOFVAdkOZkmOGoc=;\n\tb=k6pqI2GVDCTKETt0Km75XcRvBZW8C44HZFOB7bs9oI23BCVaSUH9qRcCarv32/mMrg\n\t9SiTN03L46+aVjtN+vZQdn1QPgN9h0Vgz/7RmsqXOQskLTiuhXomeiZgbK+tL5hCUIjZ\n\tAHREKMXrM5BpVXvUjsYV2YQF51qjYKgZtIBWk=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1725943719; x=1726548519;\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=Oyf/EcYlUEWOIgQGxM5kcq423hpKGOFVAdkOZkmOGoc=;\n\tb=XpnE6kmWZHd9epVwt/0IfDXPPRw5l2za7Fk9d1MbfZtN+RwLn1/4d9dIA3n2qIFcPz\n\t3MDOp/Kzdv2KTWlDsm+NC+VORATIVVLpqHaUt6XtNTnB8/IlDHo1+rz+hWISyddWMyVS\n\tT+8+1zqcLbVWZhnqM7H6OLZZd1Rn+ROQZHTJjC+u9cx37Fx0Ojefg1hB6HrtQLHDIQd9\n\tY9PwwuMUJTTE9CSiw+PoEINjrHHcAWsSx6HjZo2PhJ5toITvgiBnDsSaRfex1tvzsGZ3\n\tBZhjOWfnJciOeGBtXxbZTmQ1UTttlevAU9YkQXAX0D70voSjmyL9CbdzaIw9rziyh1Wr\n\tyShw==","X-Gm-Message-State":"AOJu0YyIlVDdRBuTCpdSD4dLAuz0c1bsIVxlWWcLekjDwXLzS1kKgTrk\n\t/h22G9kggQP4V/Fib7k3afxCUOBfv7UZRQZiAJszevNZ4e83erKH2X+TzB422+8vI2IAuPQaPbg\n\t=","X-Google-Smtp-Source":"AGHT+IF93xr/4Pp9uEW8Lir1Sf4I2WCRxoEg7Gi8veNQVM0x2dh07gqOzJ4mt9F4HqE2eWOYMU0EDw==","X-Received":"by 2002:a05:6a00:919c:b0:718:532f:5a3 with SMTP id\n\td2e1a72fcca58-718d5e17b17mr15848239b3a.7.1725943718978; \n\tMon, 09 Sep 2024 21:48:38 -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 v12 0/7] Add VirtualPipelineHandler","Date":"Tue, 10 Sep 2024 04:40:13 +0000","Message-ID":"<20240910044834.2477701-1-chenghaoyang@google.com>","X-Mailer":"git-send-email 2.46.0.598.g6f2099f65c-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/1268044\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 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           |  58 +++\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     | 241 ++++++++++++\n src/libcamera/pipeline/virtual/parser.h       |  39 ++\n .../virtual/test_pattern_generator.cpp        | 135 +++++++\n .../pipeline/virtual/test_pattern_generator.h |  53 +++\n src/libcamera/pipeline/virtual/virtual.cpp    | 371 ++++++++++++++++++\n src/libcamera/pipeline/virtual/virtual.h      |  60 +++\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, 1353 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"}