summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUmang Jain <umang.jain@ideasonboard.com>2022-08-30 19:03:21 +0530
committerUmang Jain <umang.jain@ideasonboard.com>2022-08-31 20:51:31 +0530
commit5eb7be6a0a5b45fcbc16ebd97040d0243b62163e (patch)
tree704c3927f4b89e19faf56604f697f5539a96e817
parent48d7bb29bd69c260bc5f9c104f6270dad4564b0d (diff)
libcamera: request: Rename Private::reuse() to Private::reset()
The Request::Private::reuse() is different from Request::reuse(). It resets the members of Request::Private to default values hence, rename it to a more appropriate Request::Private::reset(). Update the usage and documentation accordingly. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--include/libcamera/internal/request.h2
-rw-r--r--src/libcamera/request.cpp9
2 files changed, 7 insertions, 4 deletions
diff --git a/include/libcamera/internal/request.h b/include/libcamera/internal/request.h
index 9dadd6c6..8c92a27a 100644
--- a/include/libcamera/internal/request.h
+++ b/include/libcamera/internal/request.h
@@ -37,7 +37,7 @@ public:
bool completeBuffer(FrameBuffer *buffer);
void complete();
void cancel();
- void reuse();
+ void reset();
void prepare(std::chrono::milliseconds timeout = 0ms);
Signal<> prepared;
diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp
index d2af1d22..949c556f 100644
--- a/src/libcamera/request.cpp
+++ b/src/libcamera/request.cpp
@@ -158,9 +158,12 @@ void Request::Private::cancel()
}
/**
- * \copydoc Request::reuse()
+ * \brief Reset the request internal data to default values
+ *
+ * After calling this function, all request internal data will have default
+ * values as if the Request::Private instance had just been constructed.
*/
-void Request::Private::reuse()
+void Request::Private::reset()
{
sequence_ = 0;
cancelled_ = false;
@@ -380,7 +383,7 @@ void Request::reuse(ReuseFlag flags)
{
LIBCAMERA_TRACEPOINT(request_reuse, this);
- _d()->reuse();
+ _d()->reset();
if (flags & ReuseBuffers) {
for (auto pair : bufferMap_) {