summaryrefslogtreecommitdiff
path: root/src/qcam/main_window.h
diff options
context:
space:
mode:
authorUtkarsh Tiwari <utkarsh02t@gmail.com>2022-07-26 23:45:42 +0530
committerUtkarsh Tiwari <utkarsh02t@gmail.com>2022-09-05 12:19:50 +0530
commitd182a99e7bff4edd7fd4812087d240b6b9365c45 (patch)
tree3fa08885d99592f9fac0b7cebf3fba78918a131e /src/qcam/main_window.h
parentd598e77aa5500c60694f1f6aa4f95d67edc202ae (diff)
qcam: Queue requests only through MainWindow::queueRequest()
Currently to request a frame, we operate the camera directly. This approach is also scattered in two places, MainWindow::startCapture() and MainWindow::queueRequest(). This makes it difficult to account for requests. Centralize all the queuing to a single function queueRequest() Rename the current queueRequest() to renderComplete(). This makes more sense as this slot is triggered when the render is complete and we want to queue another request. Signed-off-by: Utkarsh Tiwari <utkarsh02t@gmail.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/qcam/main_window.h')
-rw-r--r--src/qcam/main_window.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h
index 3fa98b05..95b64124 100644
--- a/src/qcam/main_window.h
+++ b/src/qcam/main_window.h
@@ -68,7 +68,7 @@ private Q_SLOTS:
void processRaw(libcamera::FrameBuffer *buffer,
const libcamera::ControlList &metadata);
- void queueRequest(libcamera::FrameBuffer *buffer);
+ void renderComplete(libcamera::FrameBuffer *buffer);
private:
int createToolbars();
@@ -82,6 +82,7 @@ private:
void addCamera(std::shared_ptr<libcamera::Camera> camera);
void removeCamera(std::shared_ptr<libcamera::Camera> camera);
+ int queueRequest(libcamera::Request *request);
void requestComplete(libcamera::Request *request);
void processCapture();
void processHotplug(HotplugEvent *e);