summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/simple/converter.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-12-26 23:45:04 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-03-03 00:59:05 +0200
commitbe50270b7dedd596d5cca34ca66dce82fc92fe73 (patch)
tree0a1144b1afcfcbe5aa3bd530e5f109483084f644 /src/libcamera/pipeline/simple/converter.h
parentfb8c63d69cbb7a4a32b6b9c81a92af1baf6c78fa (diff)
libcamera: pipeline: simple: converter: Decouple input and output completion
The SimpleConverter API signals completion of input and output buffer pairs. This unnecessarily delays requeueing the input buffer to the video capture queue until the output buffer completes, and also delays signalling request completion until the input buffer completes. While this shouldn't cause large delays in practice, it will also not scale when multi-stream support will be added to the converter class. To address the current issue and prepare for the future, decouple signalling of input and output buffers completion. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Phi-Bang Nguyen <pnguyen@baylibre.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/simple/converter.h')
-rw-r--r--src/libcamera/pipeline/simple/converter.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h
index 6e3df553..be6844ca 100644
--- a/src/libcamera/pipeline/simple/converter.h
+++ b/src/libcamera/pipeline/simple/converter.h
@@ -9,7 +9,6 @@
#define __LIBCAMERA_PIPELINE_SIMPLE_CONVERTER_H__
#include <memory>
-#include <queue>
#include <tuple>
#include <vector>
@@ -48,17 +47,15 @@ public:
int queueBuffers(FrameBuffer *input, FrameBuffer *output);
- Signal<FrameBuffer *, FrameBuffer *> bufferReady;
+ Signal<FrameBuffer *> inputBufferReady;
+ Signal<FrameBuffer *> outputBufferReady;
private:
- void captureBufferReady(FrameBuffer *buffer);
- void outputBufferReady(FrameBuffer *buffer);
+ void m2mInputBufferReady(FrameBuffer *buffer);
+ void m2mOutputBufferReady(FrameBuffer *buffer);
std::unique_ptr<V4L2M2MDevice> m2m_;
- std::queue<FrameBuffer *> captureDoneQueue_;
- std::queue<FrameBuffer *> outputDoneQueue_;
-
unsigned int inputBufferCount_;
unsigned int outputBufferCount_;
};