summaryrefslogtreecommitdiff
path: root/src/qcam
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcam')
-rw-r--r--src/qcam/main_window.cpp7
-rw-r--r--src/qcam/main_window.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index 92f88832..5c26ab8e 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -221,7 +221,6 @@ void MainWindow::requestComplete(Request *request,
framesCaptured_++;
- Stream *stream = buffers.begin()->first;
Buffer *buffer = buffers.begin()->second;
double fps = buffer->timestamp() - lastBufferTime_;
@@ -235,8 +234,7 @@ void MainWindow::requestComplete(Request *request,
<< " fps: " << std::fixed << std::setprecision(2) << fps
<< std::endl;
- BufferMemory *mem = &stream->buffers()[buffer->index()];
- display(buffer, mem);
+ display(buffer);
request = camera_->createRequest();
if (!request) {
@@ -261,8 +259,9 @@ void MainWindow::requestComplete(Request *request,
camera_->queueRequest(request);
}
-int MainWindow::display(Buffer *buffer, BufferMemory *mem)
+int MainWindow::display(Buffer *buffer)
{
+ BufferMemory *mem = buffer->mem();
if (mem->planes().size() != 1)
return -EINVAL;
diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h
index b4f6f747..f58cb6a6 100644
--- a/src/qcam/main_window.h
+++ b/src/qcam/main_window.h
@@ -48,7 +48,7 @@ private:
void requestComplete(Request *request,
const std::map<Stream *, Buffer *> &buffers);
- int display(Buffer *buffer, BufferMemory *mem);
+ int display(Buffer *buffer);
QString title_;
QTimer titleTimer_;