summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libcamera/buffer.h2
-rw-r--r--src/libcamera/buffer.cpp8
-rw-r--r--src/libcamera/request.cpp4
3 files changed, 6 insertions, 8 deletions
diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h
index d3dc9a42..55d08e27 100644
--- a/include/libcamera/buffer.h
+++ b/include/libcamera/buffer.h
@@ -129,8 +129,6 @@ private:
void cancel();
- void setRequest(Request *request) { request_ = request; }
-
unsigned int index_;
std::array<int, 3> dmabuf_;
BufferMemory *mem_;
diff --git a/src/libcamera/buffer.cpp b/src/libcamera/buffer.cpp
index d53e5150..8c8be4ac 100644
--- a/src/libcamera/buffer.cpp
+++ b/src/libcamera/buffer.cpp
@@ -290,7 +290,6 @@ Buffer::Buffer(unsigned int index, const Buffer *metadata)
*
* \return The Request the Buffer belongs to, or nullptr if the buffer is
* either completed or not associated with a request
- * \sa Buffer::setRequest()
*/
/**
@@ -318,10 +317,11 @@ void Buffer::cancel()
}
/**
- * \fn Buffer::setRequest()
- * \brief Set the request this buffer belongs to
+ * \var Buffer::request_
+ * \brief The request this buffer belongs to
*
- * The intended callers are Request::addBuffer() and Request::completeBuffer().
+ * This member is intended to be set by Request::addBuffer() and
+ * Request::completeBuffer().
*/
/**
diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index 84a5f558..92330c1a 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -139,7 +139,7 @@ int Request::addBuffer(std::unique_ptr<Buffer> buffer)
return -EEXIST;
}
- buffer->setRequest(this);
+ buffer->request_ = this;
pending_.insert(buffer.get());
bufferMap_[stream] = buffer.release();
@@ -236,7 +236,7 @@ bool Request::completeBuffer(Buffer *buffer)
int ret = pending_.erase(buffer);
ASSERT(ret == 1);
- buffer->setRequest(nullptr);
+ buffer->request_ = nullptr;
if (buffer->status() == Buffer::BufferCancelled)
cancelled_ = true;