diff options
Diffstat (limited to 'src/libcamera')
-rw-r--r-- | src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 16 | ||||
-rw-r--r-- | src/libcamera/pipeline/rpi/common/pipeline_base.h | 1 | ||||
-rw-r--r-- | src/libcamera/pipeline/rpi/common/rpi_stream.cpp | 11 | ||||
-rw-r--r-- | src/libcamera/pipeline/rpi/common/rpi_stream.h | 2 |
4 files changed, 1 insertions, 29 deletions
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index 97acafbb..1dfd4677 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -1383,11 +1383,6 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream) Request *request = requestQueue_.empty() ? nullptr : requestQueue_.front(); if (!dropFrameCount_ && request && request->findBuffer(stream) == buffer) { /* - * Check if this is an externally provided buffer, and if - * so, we must stop tracking it in the pipeline handler. - */ - handleExternalBuffer(buffer, stream); - /* * Tag the buffer as completed, returning it to the * application. */ @@ -1426,17 +1421,6 @@ void CameraData::handleState() } } -void CameraData::handleExternalBuffer(FrameBuffer *buffer, RPi::Stream *stream) -{ - unsigned int id = stream->getBufferId(buffer); - - if (!(id & MaskExternalBuffer)) - return; - - /* Stop the Stream object from tracking the buffer. */ - stream->removeExternalBuffer(buffer); -} - void CameraData::checkRequestCompleted() { bool requestCompleted = false; diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h index a139c98a..dbabc61e 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h @@ -196,7 +196,6 @@ protected: unsigned int ispOutputTotal_; private: - void handleExternalBuffer(FrameBuffer *buffer, Stream *stream); void checkRequestCompleted(); }; diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp index 4b20ac3f..14dd6351 100644 --- a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp +++ b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp @@ -81,16 +81,7 @@ unsigned int Stream::getBufferId(FrameBuffer *buffer) const void Stream::setExternalBuffer(FrameBuffer *buffer) { - bufferMap_.emplace(BufferMask::MaskExternalBuffer | id_.get(), buffer); -} - -void Stream::removeExternalBuffer(FrameBuffer *buffer) -{ - unsigned int id = getBufferId(buffer); - - /* Ensure we have this buffer in the stream, and it is marked external. */ - ASSERT(id & BufferMask::MaskExternalBuffer); - bufferMap_.erase(id); + bufferMap_.emplace(id_.get(), buffer); } int Stream::prepareBuffers(unsigned int count) diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h index 6edd304b..ca591f99 100644 --- a/src/libcamera/pipeline/rpi/common/rpi_stream.h +++ b/src/libcamera/pipeline/rpi/common/rpi_stream.h @@ -28,7 +28,6 @@ enum BufferMask { MaskStats = 0x010000, MaskEmbeddedData = 0x020000, MaskBayerData = 0x040000, - MaskExternalBuffer = 0x100000, }; /* @@ -78,7 +77,6 @@ public: unsigned int getBufferId(FrameBuffer *buffer) const; void setExternalBuffer(FrameBuffer *buffer); - void removeExternalBuffer(FrameBuffer *buffer); int prepareBuffers(unsigned int count); int queueBuffer(FrameBuffer *buffer); |