summaryrefslogtreecommitdiff
path: root/src/qcam/main_window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcam/main_window.cpp')
-rw-r--r--src/qcam/main_window.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index e0668176..354a5336 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -389,20 +389,7 @@ void MainWindow::requestComplete(Request *request)
display(buffer);
- request = camera_->createRequest();
- if (!request) {
- std::cerr << "Can't create request" << std::endl;
- return;
- }
-
- for (auto it = buffers.begin(); it != buffers.end(); ++it) {
- Stream *stream = it->first;
- FrameBuffer *buffer = it->second;
-
- request->addBuffer(stream, buffer);
- }
-
- camera_->queueRequest(request);
+ queueRequest(buffer);
}
int MainWindow::display(FrameBuffer *buffer)
@@ -417,3 +404,17 @@ int MainWindow::display(FrameBuffer *buffer)
return 0;
}
+
+void MainWindow::queueRequest(FrameBuffer *buffer)
+{
+ Request *request = camera_->createRequest();
+ if (!request) {
+ std::cerr << "Can't create request" << std::endl;
+ return;
+ }
+
+ Stream *stream = config_->at(0).stream();
+ request->addBuffer(stream, buffer);
+
+ camera_->queueRequest(request);
+}