[PATCH v13 0/7] Add VirtualPipelineHandler
Harvey Yang
chenghaoyang at chromium.org
Thu Sep 26 18:29:49 CEST 2024
Harvey Yang New message
Tue, Sep 10, 12:48 PM
to libcamera-devel, me
Hi all,
This series adds virtual pipeline handler, which doesn't depend on any
hardware, like camera sensor or ISP. Currently the configuration
supports test patterns and images.
It passed the gitlab pipeline:
https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1278799
I've also checked that it works on qcam.
I failed to pass multi_stream_test when trying to enable multiple
streams though. Please give me some hints what it tests and what I
missed:
```
[295:43:43.910237144] [1441841] INFO IPAManager ipa_manager.cpp:137 libcamera is not installed. Adding '/usr/local/google/home/chenghaoyang/Workspace/libca
mera/build/src/ipa' to the IPA search path
[295:43:43.914030564] [1441841] INFO Camera camera_manager.cpp:325 libcamera v0.3.1+79-8ca4f033-dirty (2024-08-29T19:18:51UTC)
[295:43:43.915493754] [1441844] ERROR DmaBufAllocator dma_buf_allocator.cpp:120 Could not open any dma-buf provider
[295:43:43.919118835] [1441841] INFO IPAManager ipa_manager.cpp:137 libcamera is not installed. Adding '/usr/local/google/home/chenghaoyang/Workspace/libca
mera/build/src/ipa' to the IPA search path
[295:43:43.922245825] [1441841] INFO Camera camera_manager.cpp:325 libcamera v0.3.1+79-8ca4f033-dirty (2024-08-29T19:18:51UTC)
[295:43:43.922820175] [1441846] ERROR DmaBufAllocator dma_buf_allocator.cpp:120 Could not open any dma-buf provider
Unable to set the pipeline to the playing state.
```
Gitlab pipeline failure:
https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1260412
Updates in v13:
- Returned an errno in `FrameGenerete::generateFrame()`
Updates in v12:
- Added ImageFrameGenerator first, then add Parser.
- Removed ScaleMode argument, as only Fill is supported now.
- Fixed bug of Stream's configuration usage in configure().
Updates in v11:
- Allowed a single value in the config file's frame_rates field.
Updates in v10:
Apply fixes according to Jacopo's and Barnabás' comments.
- Split test_pattern and path fields in the yaml format.
- Let FrameGenerators control frameCount_.
- Fixed match() returning values.
Updates in v9: Allocate contiguous memory for planes in the same
FrameBuffer.
BR,
Harvey
Harvey Yang (6):
libcamera: add DmaBufAllocator::exportBuffers()
libcamera: Remove PipelineHandler Fatal check of non-empty
MediaDevices
libcamera: virtual: Add VirtualPipelineHandler
libcamera: virtual: Add ImageFrameGenerator
libcamera: virtual: Read config and register cameras based on the
config
libcamera: software_isp: Refactor SoftwareIsp to use
DmaBufAllocator::exportBuffers
Konami Shu (1):
libcamera: pipeline: Add test pattern for VirtualPipelineHandler
.../libcamera/internal/dma_buf_allocator.h | 13 +
meson.build | 1 +
meson_options.txt | 3 +-
src/android/meson.build | 19 -
src/libcamera/dma_buf_allocator.cpp | 57 +++
src/libcamera/pipeline/virtual/README.md | 48 +++
.../pipeline/virtual/data/virtual.yaml | 36 ++
.../pipeline/virtual/frame_generator.h | 29 ++
.../virtual/image_frame_generator.cpp | 175 ++++++++
.../pipeline/virtual/image_frame_generator.h | 51 +++
src/libcamera/pipeline/virtual/meson.build | 13 +
src/libcamera/pipeline/virtual/parser.cpp | 243 +++++++++++
src/libcamera/pipeline/virtual/parser.h | 39 ++
.../virtual/test_pattern_generator.cpp | 137 +++++++
.../pipeline/virtual/test_pattern_generator.h | 53 +++
src/libcamera/pipeline/virtual/virtual.cpp | 382 ++++++++++++++++++
src/libcamera/pipeline/virtual/virtual.h | 61 +++
src/libcamera/pipeline_handler.cpp | 11 +-
src/libcamera/software_isp/software_isp.cpp | 20 +-
src/meson.build | 19 +
20 files changed, 1368 insertions(+), 42 deletions(-)
create mode 100644 src/libcamera/pipeline/virtual/README.md
create mode 100644 src/libcamera/pipeline/virtual/data/virtual.yaml
create mode 100644 src/libcamera/pipeline/virtual/frame_generator.h
create mode 100644 src/libcamera/pipeline/virtual/image_frame_generator.cpp
create mode 100644 src/libcamera/pipeline/virtual/image_frame_generator.h
create mode 100644 src/libcamera/pipeline/virtual/meson.build
create mode 100644 src/libcamera/pipeline/virtual/parser.cpp
create mode 100644 src/libcamera/pipeline/virtual/parser.h
create mode 100644 src/libcamera/pipeline/virtual/test_pattern_generator.cpp
create mode 100644 src/libcamera/pipeline/virtual/test_pattern_generator.h
create mode 100644 src/libcamera/pipeline/virtual/virtual.cpp
create mode 100644 src/libcamera/pipeline/virtual/virtual.h
--
2.46.1.824.gd892dcdcdd-goog
More information about the libcamera-devel
mailing list