summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/converter.h5
-rw-r--r--include/libcamera/internal/converter/converter_v4l2_m2m.h11
-rw-r--r--include/libcamera/internal/software_isp/software_isp.h5
3 files changed, 12 insertions, 9 deletions
diff --git a/include/libcamera/internal/converter.h b/include/libcamera/internal/converter.h
index 5d74db6b..b51563d7 100644
--- a/include/libcamera/internal/converter.h
+++ b/include/libcamera/internal/converter.h
@@ -26,6 +26,7 @@ namespace libcamera {
class FrameBuffer;
class MediaDevice;
class PixelFormat;
+class Stream;
struct StreamConfiguration;
class Converter
@@ -46,14 +47,14 @@ public:
virtual int configure(const StreamConfiguration &inputCfg,
const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfgs) = 0;
- virtual int exportBuffers(unsigned int output, unsigned int count,
+ virtual int exportBuffers(const Stream *stream, unsigned int count,
std::vector<std::unique_ptr<FrameBuffer>> *buffers) = 0;
virtual int start() = 0;
virtual void stop() = 0;
virtual int queueBuffers(FrameBuffer *input,
- const std::map<unsigned int, FrameBuffer *> &outputs) = 0;
+ const std::map<const Stream *, FrameBuffer *> &outputs) = 0;
Signal<FrameBuffer *> inputBufferReady;
Signal<FrameBuffer *> outputBufferReady;
diff --git a/include/libcamera/internal/converter/converter_v4l2_m2m.h b/include/libcamera/internal/converter/converter_v4l2_m2m.h
index 0da62290..b9e59899 100644
--- a/include/libcamera/internal/converter/converter_v4l2_m2m.h
+++ b/include/libcamera/internal/converter/converter_v4l2_m2m.h
@@ -28,6 +28,7 @@ class FrameBuffer;
class MediaDevice;
class Size;
class SizeRange;
+class Stream;
struct StreamConfiguration;
class V4L2M2MDevice;
@@ -47,20 +48,20 @@ public:
int configure(const StreamConfiguration &inputCfg,
const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfg);
- int exportBuffers(unsigned int output, unsigned int count,
+ int exportBuffers(const Stream *stream, unsigned int count,
std::vector<std::unique_ptr<FrameBuffer>> *buffers);
int start();
void stop();
int queueBuffers(FrameBuffer *input,
- const std::map<unsigned int, FrameBuffer *> &outputs);
+ const std::map<const Stream *, FrameBuffer *> &outputs);
private:
class V4L2M2MStream : protected Loggable
{
public:
- V4L2M2MStream(V4L2M2MConverter *converter, unsigned int index);
+ V4L2M2MStream(V4L2M2MConverter *converter, const Stream *stream);
bool isValid() const { return m2m_ != nullptr; }
@@ -82,7 +83,7 @@ private:
void outputBufferReady(FrameBuffer *buffer);
V4L2M2MConverter *converter_;
- unsigned int index_;
+ const Stream *stream_;
std::unique_ptr<V4L2M2MDevice> m2m_;
unsigned int inputBufferCount_;
@@ -91,7 +92,7 @@ private:
std::unique_ptr<V4L2M2MDevice> m2m_;
- std::vector<V4L2M2MStream> streams_;
+ std::map<const Stream *, std::unique_ptr<V4L2M2MStream>> streams_;
std::map<FrameBuffer *, unsigned int> queue_;
};
diff --git a/include/libcamera/internal/software_isp/software_isp.h b/include/libcamera/internal/software_isp/software_isp.h
index c5338c05..f8e00003 100644
--- a/include/libcamera/internal/software_isp/software_isp.h
+++ b/include/libcamera/internal/software_isp/software_isp.h
@@ -37,6 +37,7 @@ namespace libcamera {
class DebayerCpu;
class FrameBuffer;
class PixelFormat;
+class Stream;
struct StreamConfiguration;
LOG_DECLARE_CATEGORY(SoftwareIsp)
@@ -62,7 +63,7 @@ public:
const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfgs,
const ControlInfoMap &sensorControls);
- int exportBuffers(unsigned int output, unsigned int count,
+ int exportBuffers(const Stream *stream, unsigned int count,
std::vector<std::unique_ptr<FrameBuffer>> *buffers);
void processStats(const ControlList &sensorControls);
@@ -71,7 +72,7 @@ public:
void stop();
int queueBuffers(FrameBuffer *input,
- const std::map<unsigned int, FrameBuffer *> &outputs);
+ const std::map<const Stream *, FrameBuffer *> &outputs);
void process(FrameBuffer *input, FrameBuffer *output);