libcamera: converter_v4l2_m2m: Add helper to apply controls

Add applyControls() helper to apply controls for a stream.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
Umang Jain
2025-11-25 17:28:21 +01:00
committed by Stefan Klug
parent ae4cd6e427
commit 801c3c3010
2 changed files with 39 additions and 0 deletions

View File

@@ -24,6 +24,7 @@
namespace libcamera {
class ControlList;
class FrameBuffer;
class MediaDevice;
class Size;
@@ -73,6 +74,8 @@ public:
std::pair<Rectangle, Rectangle> inputCropBounds() override { return inputCropBounds_; }
std::pair<Rectangle, Rectangle> inputCropBounds(const Stream *stream) override;
int applyControls(const Stream *stream, ControlList &ctrls, const V4L2Request *request = nullptr);
int allocateRequests(unsigned int count,
std::vector<std::unique_ptr<V4L2Request>> *requests);
@@ -94,6 +97,8 @@ private:
int start();
void stop();
int applyControls(ControlList &ctrls, const V4L2Request *request = nullptr);
int queueBuffers(FrameBuffer *input, FrameBuffer *output,
const V4L2Request *request = nullptr);