From 06346821bec52d5dd0f337cef13c73f9ee24e79c Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Mon, 16 Dec 2024 16:40:49 +0100 Subject: libcamera: converter: Add function to check if a stream was configured Add a isConfigured() function to be able to check if a given stream was configured in the converter. This is useful in pipelines to either query device or stream specific crop bounds depending on whether the stream is configured or not. Signed-off-by: Stefan Klug Reviewed-by: Jacopo Mondi Reviewed-by: Paul Elder --- include/libcamera/internal/converter.h | 1 + include/libcamera/internal/converter/converter_v4l2_m2m.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/include/libcamera/internal/converter.h b/include/libcamera/internal/converter.h index 04187a2a..afea4624 100644 --- a/include/libcamera/internal/converter.h +++ b/include/libcamera/internal/converter.h @@ -56,6 +56,7 @@ public: virtual int configure(const StreamConfiguration &inputCfg, const std::vector> &outputCfgs) = 0; + virtual bool isConfigured(const Stream *stream) const = 0; virtual int exportBuffers(const Stream *stream, unsigned int count, std::vector> *buffers) = 0; diff --git a/include/libcamera/internal/converter/converter_v4l2_m2m.h b/include/libcamera/internal/converter/converter_v4l2_m2m.h index 402a8039..1ccbfc7c 100644 --- a/include/libcamera/internal/converter/converter_v4l2_m2m.h +++ b/include/libcamera/internal/converter/converter_v4l2_m2m.h @@ -50,6 +50,7 @@ public: int configure(const StreamConfiguration &inputCfg, const std::vector> &outputCfg) override; + bool isConfigured(const Stream *stream) const override; int exportBuffers(const Stream *stream, unsigned int count, std::vector> *buffers) override; -- cgit v1.2.1