summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-03-26 16:18:42 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-04-14 00:28:28 +0200
commit871d182cef052f0fbf026a73cc24fe2f4dbd5974 (patch)
treefcce858ed8e39601ac0135970acd494da99489b1 /src
parente349ec8c6623edfdcf66149d68dc9858c0fa5435 (diff)
libcamera: pipeline: rkisp1: Do not try to process cancelled frames
There is no need to try and process cancelled frames, try to finish as quickly as possible. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index dcc787a8..47edf1dc 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -1032,6 +1032,12 @@ void PipelineHandlerRkISP1::bufferReady(FrameBuffer *buffer)
RkISP1CameraData *data = cameraData(activeCamera_);
Request *request = buffer->request();
+ if (buffer->metadata().status == FrameMetadata::FrameCancelled) {
+ completeBuffer(activeCamera_, request, buffer);
+ completeRequest(activeCamera_, request);
+ return;
+ }
+
data->timeline_.bufferReady(buffer);
if (data->frame_ <= buffer->metadata().sequence)
@@ -1043,6 +1049,9 @@ void PipelineHandlerRkISP1::bufferReady(FrameBuffer *buffer)
void PipelineHandlerRkISP1::paramReady(FrameBuffer *buffer)
{
+ if (buffer->metadata().status == FrameMetadata::FrameCancelled)
+ return;
+
ASSERT(activeCamera_);
RkISP1CameraData *data = cameraData(activeCamera_);
@@ -1054,6 +1063,9 @@ void PipelineHandlerRkISP1::paramReady(FrameBuffer *buffer)
void PipelineHandlerRkISP1::statReady(FrameBuffer *buffer)
{
+ if (buffer->metadata().status == FrameMetadata::FrameCancelled)
+ return;
+
ASSERT(activeCamera_);
RkISP1CameraData *data = cameraData(activeCamera_);