@@ -120,14 +120,14 @@ MainWindow::MainWindow(CameraManager *cm, const OptionsParser::Options &options)
if (renderType == "qt") {
ViewFinderQt *viewfinder = new ViewFinderQt(this);
connect(viewfinder, &ViewFinderQt::renderComplete,
- this, &MainWindow::queueRequest);
+ this, &MainWindow::renderComplete);
viewfinder_ = viewfinder;
setCentralWidget(viewfinder);
#ifndef QT_NO_OPENGL
} else if (renderType == "gles") {
ViewFinderGL *viewfinder = new ViewFinderGL(this);
connect(viewfinder, &ViewFinderGL::renderComplete,
- this, &MainWindow::queueRequest);
+ this, &MainWindow::renderComplete);
viewfinder_ = viewfinder;
setCentralWidget(viewfinder);
#endif
@@ -515,7 +515,7 @@ int MainWindow::startCapture()
/* Queue all requests. */
for (std::unique_ptr<Request> &request : requests_) {
- ret = camera_->queueRequest(request.get());
+ ret = queueRequest(request.get());
if (ret < 0) {
qWarning() << "Can't queue request";
goto error_disconnect;
@@ -749,7 +749,7 @@ void MainWindow::processViewfinder(FrameBuffer *buffer)
viewfinder_->render(buffer, mappedBuffers_[buffer].get());
}
-void MainWindow::queueRequest(FrameBuffer *buffer)
+void MainWindow::renderComplete(FrameBuffer *buffer)
{
Request *request;
{
@@ -778,6 +778,10 @@ void MainWindow::queueRequest(FrameBuffer *buffer)
qWarning() << "No free buffer available for RAW capture";
}
}
+ queueRequest(request);
+}
- camera_->queueRequest(request);
+int MainWindow::queueRequest(Request *request)
+{
+ return camera_->queueRequest(request);
}
@@ -70,7 +70,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();
@@ -84,6 +84,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);