[v16,0/7] Add VirtualPipelineHandler
mbox series

Message ID 20241022074544.3790451-1-chenghaoyang@chromium.org
Headers show
Series
  • Add VirtualPipelineHandler
Related show

Message

Harvey Yang Oct. 22, 2024, 7:43 a.m. UTC
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/1294884

Updates in v16:
- Updates location in config with `properties::LocationNameValueMap`.

Updates in v15:
- Fixed multi_stream_test with `PipelineHandler::match()`.

Updates in v14:
- Refactored ImageFrames to keep a list of filepaths directly.

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 (7):
  libcamera: add DmaBufAllocator::exportBuffers()
  libcamera: Remove PipelineHandler Fatal check of non-empty
    MediaDevices
  libcamera: virtual: Add VirtualPipelineHandler
  libcamera: pipeline: Add test pattern for 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

 .../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      |  65 +++
 .../pipeline/virtual/config_parser.cpp        | 260 ++++++++++++
 .../pipeline/virtual/config_parser.h          |  39 ++
 .../pipeline/virtual/data/virtual.yaml        |  36 ++
 .../pipeline/virtual/frame_generator.h        |  29 ++
 .../virtual/image_frame_generator.cpp         | 172 ++++++++
 .../pipeline/virtual/image_frame_generator.h  |  49 +++
 src/libcamera/pipeline/virtual/meson.build    |  13 +
 .../virtual/test_pattern_generator.cpp        | 136 ++++++
 .../pipeline/virtual/test_pattern_generator.h |  52 +++
 src/libcamera/pipeline/virtual/virtual.cpp    | 398 ++++++++++++++++++
 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, 1411 insertions(+), 42 deletions(-)
 create mode 100644 src/libcamera/pipeline/virtual/README.md
 create mode 100644 src/libcamera/pipeline/virtual/config_parser.cpp
 create mode 100644 src/libcamera/pipeline/virtual/config_parser.h
 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/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

Comments

Harvey Yang Oct. 31, 2024, 7:17 a.m. UTC | #1
Friendly ping: As all patches are reviewed, can we merge this series recently?

Thanks :)
Harvey

On Tue, Oct 22, 2024 at 3:45 PM Harvey Yang <chenghaoyang@chromium.org> wrote:
>
> 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/1294884
>
> Updates in v16:
> - Updates location in config with `properties::LocationNameValueMap`.
>
> Updates in v15:
> - Fixed multi_stream_test with `PipelineHandler::match()`.
>
> Updates in v14:
> - Refactored ImageFrames to keep a list of filepaths directly.
>
> 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 (7):
>   libcamera: add DmaBufAllocator::exportBuffers()
>   libcamera: Remove PipelineHandler Fatal check of non-empty
>     MediaDevices
>   libcamera: virtual: Add VirtualPipelineHandler
>   libcamera: pipeline: Add test pattern for 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
>
>  .../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      |  65 +++
>  .../pipeline/virtual/config_parser.cpp        | 260 ++++++++++++
>  .../pipeline/virtual/config_parser.h          |  39 ++
>  .../pipeline/virtual/data/virtual.yaml        |  36 ++
>  .../pipeline/virtual/frame_generator.h        |  29 ++
>  .../virtual/image_frame_generator.cpp         | 172 ++++++++
>  .../pipeline/virtual/image_frame_generator.h  |  49 +++
>  src/libcamera/pipeline/virtual/meson.build    |  13 +
>  .../virtual/test_pattern_generator.cpp        | 136 ++++++
>  .../pipeline/virtual/test_pattern_generator.h |  52 +++
>  src/libcamera/pipeline/virtual/virtual.cpp    | 398 ++++++++++++++++++
>  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, 1411 insertions(+), 42 deletions(-)
>  create mode 100644 src/libcamera/pipeline/virtual/README.md
>  create mode 100644 src/libcamera/pipeline/virtual/config_parser.cpp
>  create mode 100644 src/libcamera/pipeline/virtual/config_parser.h
>  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/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.47.0.105.g07ac214952-goog
>