[PATCH 0/1] Add StreamRole into StreamConfiguration

Jacopo Mondi jacopo.mondi at ideasonboard.com
Mon Sep 16 09:35:04 CEST 2024


Hi Harvey

On Mon, Sep 16, 2024 at 04:51:54AM GMT, Harvey Yang wrote:
> Hi folks,
>
> Currently applications set resolutions, pixelFormat, bufferCount, etc,
> into StreamConfigurations, and Pipeline Handler decides which streams
> they're assigned to. However, it doesn't allow application to assign
> streams that cannot be distinguished by those arguments into
> VideoRecording or StillCapture (say YUV/NV12 format), which is needed in
> mtkisp7.

Could you explain in a bit more detail why this "is needed" and how
you plan to use StreamRole as part of the stream configuration ?

>
> This patch allows application to set the desired StreamRole directly.
>
> This patch passed gitlab pipeline:
> https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1271770
>
> It might be controversial. Let me know the concerns. Thanks!
>

The fact is that roles are designed to hint libcamera about how to
populate the CameraConfiguration, after that point they have no
meaning anymore for the library.

I presum you need this for Android, right ? Isn't it better to keep
the association between the Android role and the libcamera Stream in
the Android HAL instead ? Be aware that the CameraConfiguration should
be populated with StreamConfigurations in the same order as the
StreamRole order the application asked for.

If instead we want to keep the Role in Stream, it shouldn't be up to
the application to populate it, but it should be the pipeline's
generateConfiguration() function that should do this probably.

Thanks
  j

> BR,
> Harvey
>
>
>
> Han-Lin Chen (1):
>   libcamera: Add StreamRole into StreamConfiguration
>
>  include/libcamera/stream.h |  2 ++
>  src/libcamera/stream.cpp   | 12 ++++++++++--
>  2 files changed, 12 insertions(+), 2 deletions(-)
>
> --
> 2.46.0.662.g92d0881bb0-goog
>


More information about the libcamera-devel mailing list