summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-02-28 17:45:58 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-03-01 15:45:09 +0200
commit1accc258cc8efb077f8437be702646583ee61ca6 (patch)
treeb7a4311d4e9c448f010bbb9ee4f087571675c9f5 /include
parentfca7602c3c88e804d1fbb5ae1372e2e6e841a4ee (diff)
libcamera: request: Add request completion status
Add a new field to the Request class to report its completion status, and a new complete() method to update the status. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/request.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index ef081177..0b75f9d9 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -18,9 +18,16 @@ class Buffer;
class Camera;
class Stream;
+
class Request
{
public:
+ enum Status {
+ RequestPending,
+ RequestComplete,
+ RequestCancelled,
+ };
+
explicit Request(Camera *camera);
Request(const Request &) = delete;
Request &operator=(const Request &) = delete;
@@ -28,15 +35,20 @@ public:
int setBuffers(const std::map<Stream *, Buffer *> &streamMap);
Buffer *findBuffer(Stream *stream) const;
+ Status status() const { return status_; }
+
private:
friend class Camera;
int prepare();
+ void complete(Status status);
void bufferCompleted(Buffer *buffer);
Camera *camera_;
std::map<Stream *, Buffer *> bufferMap_;
std::unordered_set<Buffer *> pending_;
+
+ Status status_;
};
} /* namespace libcamera */