summaryrefslogtreecommitdiff
path: root/src/apps
diff options
context:
space:
mode:
Diffstat (limited to 'src/apps')
-rw-r--r--src/apps/cam/camera_session.cpp15
-rw-r--r--src/apps/cam/camera_session.h2
-rw-r--r--src/apps/cam/capture_script.cpp2
-rw-r--r--src/apps/cam/capture_script.h2
-rw-r--r--src/apps/cam/drm.cpp2
-rw-r--r--src/apps/cam/drm.h2
-rw-r--r--src/apps/cam/file_sink.cpp13
-rw-r--r--src/apps/cam/file_sink.h2
-rw-r--r--src/apps/cam/frame_sink.cpp2
-rw-r--r--src/apps/cam/frame_sink.h2
-rw-r--r--src/apps/cam/kms_sink.cpp2
-rw-r--r--src/apps/cam/kms_sink.h2
-rw-r--r--src/apps/cam/main.cpp4
-rw-r--r--src/apps/cam/main.h2
-rw-r--r--src/apps/cam/sdl_sink.cpp2
-rw-r--r--src/apps/cam/sdl_sink.h2
-rw-r--r--src/apps/cam/sdl_texture.cpp2
-rw-r--r--src/apps/cam/sdl_texture.h2
-rw-r--r--src/apps/cam/sdl_texture_mjpg.cpp2
-rw-r--r--src/apps/cam/sdl_texture_mjpg.h2
-rw-r--r--src/apps/cam/sdl_texture_yuv.cpp2
-rw-r--r--src/apps/cam/sdl_texture_yuv.h2
-rw-r--r--src/apps/common/dng_writer.cpp2
-rw-r--r--src/apps/common/dng_writer.h2
-rw-r--r--src/apps/common/event_loop.cpp2
-rw-r--r--src/apps/common/event_loop.h2
-rw-r--r--src/apps/common/image.cpp2
-rw-r--r--src/apps/common/image.h2
-rw-r--r--src/apps/common/meson.build1
-rw-r--r--src/apps/common/options.cpp2
-rw-r--r--src/apps/common/options.h2
-rw-r--r--src/apps/common/ppm_writer.cpp53
-rw-r--r--src/apps/common/ppm_writer.h20
-rw-r--r--src/apps/common/stream_options.cpp2
-rw-r--r--src/apps/common/stream_options.h2
-rw-r--r--src/apps/ipa-verify/main.cpp2
-rw-r--r--src/apps/lc-compliance/environment.cpp2
-rw-r--r--src/apps/lc-compliance/environment.h2
-rw-r--r--src/apps/lc-compliance/helpers/capture.cpp2
-rw-r--r--src/apps/lc-compliance/helpers/capture.h2
-rw-r--r--src/apps/lc-compliance/main.cpp2
-rw-r--r--src/apps/lc-compliance/tests/capture_test.cpp2
-rw-r--r--src/apps/qcam/cam_select_dialog.cpp2
-rw-r--r--src/apps/qcam/cam_select_dialog.h2
-rw-r--r--src/apps/qcam/format_converter.cpp2
-rw-r--r--src/apps/qcam/format_converter.h2
-rw-r--r--src/apps/qcam/main.cpp2
-rw-r--r--src/apps/qcam/main_window.cpp4
-rw-r--r--src/apps/qcam/main_window.h2
-rw-r--r--src/apps/qcam/message_handler.cpp2
-rw-r--r--src/apps/qcam/message_handler.h2
-rw-r--r--src/apps/qcam/viewfinder.h2
-rw-r--r--src/apps/qcam/viewfinder_gl.cpp2
-rw-r--r--src/apps/qcam/viewfinder_gl.h3
-rw-r--r--src/apps/qcam/viewfinder_qt.cpp2
-rw-r--r--src/apps/qcam/viewfinder_qt.h2
56 files changed, 150 insertions, 59 deletions
diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp
index 8447f932..097dc479 100644
--- a/src/apps/cam/camera_session.cpp
+++ b/src/apps/cam/camera_session.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * camera_session.cpp - Camera capture session
+ * Camera capture session
*/
#include <iomanip>
@@ -39,9 +39,14 @@ CameraSession::CameraSession(CameraManager *cm,
{
char *endptr;
unsigned long index = strtoul(cameraId.c_str(), &endptr, 10);
- if (*endptr == '\0' && index > 0 && index <= cm->cameras().size())
- camera_ = cm->cameras()[index - 1];
- else
+
+ if (*endptr == '\0' && index > 0) {
+ auto cameras = cm->cameras();
+ if (index <= cameras.size())
+ camera_ = cameras[index - 1];
+ }
+
+ if (!camera_)
camera_ = cm->get(cameraId);
if (!camera_) {
@@ -377,7 +382,7 @@ void CameraSession::requestComplete(Request *request)
* Defer processing of the completed request to the event loop, to avoid
* blocking the camera manager thread.
*/
- EventLoop::instance()->callLater([=]() { processRequest(request); });
+ EventLoop::instance()->callLater([this, request]() { processRequest(request); });
}
void CameraSession::processRequest(Request *request)
diff --git a/src/apps/cam/camera_session.h b/src/apps/cam/camera_session.h
index 0bab519f..4442fd9b 100644
--- a/src/apps/cam/camera_session.h
+++ b/src/apps/cam/camera_session.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * camera_session.h - Camera capture session
+ * Camera capture session
*/
#pragma once
diff --git a/src/apps/cam/capture_script.cpp b/src/apps/cam/capture_script.cpp
index 1215713f..fc1dfa75 100644
--- a/src/apps/cam/capture_script.cpp
+++ b/src/apps/cam/capture_script.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Ideas on Board Oy
*
- * capture_script.cpp - Capture session configuration script
+ * Capture session configuration script
*/
#include "capture_script.h"
diff --git a/src/apps/cam/capture_script.h b/src/apps/cam/capture_script.h
index 40042c03..294b9203 100644
--- a/src/apps/cam/capture_script.h
+++ b/src/apps/cam/capture_script.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Ideas on Board Oy
*
- * capture_script.h - Capture session configuration script
+ * Capture session configuration script
*/
#pragma once
diff --git a/src/apps/cam/drm.cpp b/src/apps/cam/drm.cpp
index 8779a713..47bbb6b0 100644
--- a/src/apps/cam/drm.cpp
+++ b/src/apps/cam/drm.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Ideas on Board Oy
*
- * drm.cpp - DRM/KMS Helpers
+ * DRM/KMS Helpers
*/
#include "drm.h"
diff --git a/src/apps/cam/drm.h b/src/apps/cam/drm.h
index ebaea04d..1ba83b6e 100644
--- a/src/apps/cam/drm.h
+++ b/src/apps/cam/drm.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Ideas on Board Oy
*
- * drm.h - DRM/KMS Helpers
+ * DRM/KMS Helpers
*/
#pragma once
diff --git a/src/apps/cam/file_sink.cpp b/src/apps/cam/file_sink.cpp
index dca350c4..3e000d2f 100644
--- a/src/apps/cam/file_sink.cpp
+++ b/src/apps/cam/file_sink.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * file_sink.cpp - File Sink
+ * File Sink
*/
#include <assert.h>
@@ -17,6 +17,7 @@
#include "../common/dng_writer.h"
#include "../common/image.h"
+#include "../common/ppm_writer.h"
#include "file_sink.h"
@@ -76,6 +77,7 @@ void FileSink::writeBuffer(const Stream *stream, FrameBuffer *buffer,
#ifdef HAVE_TIFF
bool dng = filename.find(".dng", filename.size() - 4) != std::string::npos;
#endif /* HAVE_TIFF */
+ bool ppm = filename.find(".ppm", filename.size() - 4) != std::string::npos;
if (filename.empty() || filename.back() == '/')
filename += "frame-#.bin";
@@ -102,6 +104,15 @@ void FileSink::writeBuffer(const Stream *stream, FrameBuffer *buffer,
return;
}
#endif /* HAVE_TIFF */
+ if (ppm) {
+ ret = PPMWriter::write(filename.c_str(), stream->configuration(),
+ image->data(0));
+ if (ret < 0)
+ std::cerr << "failed to write PPM file `" << filename
+ << "'" << std::endl;
+
+ return;
+ }
fd = open(filename.c_str(), O_CREAT | O_WRONLY |
(pos == std::string::npos ? O_APPEND : O_TRUNC),
diff --git a/src/apps/cam/file_sink.h b/src/apps/cam/file_sink.h
index 300edf8d..9d560783 100644
--- a/src/apps/cam/file_sink.h
+++ b/src/apps/cam/file_sink.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * file_sink.h - File Sink
+ * File Sink
*/
#pragma once
diff --git a/src/apps/cam/frame_sink.cpp b/src/apps/cam/frame_sink.cpp
index af21d575..68d6f2c1 100644
--- a/src/apps/cam/frame_sink.cpp
+++ b/src/apps/cam/frame_sink.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Ideas on Board Oy
*
- * frame_sink.cpp - Base Frame Sink Class
+ * Base Frame Sink Class
*/
#include "frame_sink.h"
diff --git a/src/apps/cam/frame_sink.h b/src/apps/cam/frame_sink.h
index ca4347cb..11105c6c 100644
--- a/src/apps/cam/frame_sink.h
+++ b/src/apps/cam/frame_sink.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Ideas on Board Oy
*
- * frame_sink.h - Base Frame Sink Class
+ * Base Frame Sink Class
*/
#pragma once
diff --git a/src/apps/cam/kms_sink.cpp b/src/apps/cam/kms_sink.cpp
index 6991c3fa..672c985a 100644
--- a/src/apps/cam/kms_sink.cpp
+++ b/src/apps/cam/kms_sink.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Ideas on Board Oy
*
- * kms_sink.cpp - KMS Sink
+ * KMS Sink
*/
#include "kms_sink.h"
diff --git a/src/apps/cam/kms_sink.h b/src/apps/cam/kms_sink.h
index e2c618a1..4b7b4c26 100644
--- a/src/apps/cam/kms_sink.h
+++ b/src/apps/cam/kms_sink.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Ideas on Board Oy
*
- * kms_sink.h - KMS Sink
+ * KMS Sink
*/
#pragma once
diff --git a/src/apps/cam/main.cpp b/src/apps/cam/main.cpp
index 179cc376..4f87f200 100644
--- a/src/apps/cam/main.cpp
+++ b/src/apps/cam/main.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * main.cpp - cam - The libcamera swiss army knife
+ * cam - The libcamera swiss army knife
*/
#include <atomic>
@@ -154,6 +154,8 @@ int CamApp::parseOptions(int argc, char *argv[])
"If the file name ends with '.dng', then the frame will be written to\n"
"the output file(s) in DNG format.\n"
#endif
+ "If the file name ends with '.ppm', then the frame will be written to\n"
+ "the output file(s) in PPM format.\n"
"The default file name is 'frame-#.bin'.",
"file", ArgumentOptional, "filename", false,
OptCamera);
diff --git a/src/apps/cam/main.h b/src/apps/cam/main.h
index 4aa959b3..64e6a20e 100644
--- a/src/apps/cam/main.h
+++ b/src/apps/cam/main.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * main.h - Cam application
+ * Cam application
*/
#pragma once
diff --git a/src/apps/cam/sdl_sink.cpp b/src/apps/cam/sdl_sink.cpp
index a2f4abc1..8355dd5e 100644
--- a/src/apps/cam/sdl_sink.cpp
+++ b/src/apps/cam/sdl_sink.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Ideas on Board Oy
*
- * sdl_sink.h - SDL Sink
+ * SDL Sink
*/
#include "sdl_sink.h"
diff --git a/src/apps/cam/sdl_sink.h b/src/apps/cam/sdl_sink.h
index 6c19c663..18ec7fbe 100644
--- a/src/apps/cam/sdl_sink.h
+++ b/src/apps/cam/sdl_sink.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Ideas on Board Oy
*
- * sdl_sink.h - SDL Sink
+ * SDL Sink
*/
#pragma once
diff --git a/src/apps/cam/sdl_texture.cpp b/src/apps/cam/sdl_texture.cpp
index e9040bc5..e52c4a3a 100644
--- a/src/apps/cam/sdl_texture.cpp
+++ b/src/apps/cam/sdl_texture.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Ideas on Board Oy
*
- * sdl_texture.cpp - SDL Texture
+ * SDL Texture
*/
#include "sdl_texture.h"
diff --git a/src/apps/cam/sdl_texture.h b/src/apps/cam/sdl_texture.h
index 3993dd46..990f83b6 100644
--- a/src/apps/cam/sdl_texture.h
+++ b/src/apps/cam/sdl_texture.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Ideas on Board Oy
*
- * sdl_texture.h - SDL Texture
+ * SDL Texture
*/
#pragma once
diff --git a/src/apps/cam/sdl_texture_mjpg.cpp b/src/apps/cam/sdl_texture_mjpg.cpp
index da958e03..cace18fc 100644
--- a/src/apps/cam/sdl_texture_mjpg.cpp
+++ b/src/apps/cam/sdl_texture_mjpg.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Ideas on Board Oy
*
- * sdl_texture_mjpg.cpp - SDL Texture MJPG
+ * SDL Texture MJPG
*/
#include "sdl_texture_mjpg.h"
diff --git a/src/apps/cam/sdl_texture_mjpg.h b/src/apps/cam/sdl_texture_mjpg.h
index 814ca79a..37bed5f0 100644
--- a/src/apps/cam/sdl_texture_mjpg.h
+++ b/src/apps/cam/sdl_texture_mjpg.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Ideas on Board Oy
*
- * sdl_texture_mjpg.h - SDL Texture MJPG
+ * SDL Texture MJPG
*/
#pragma once
diff --git a/src/apps/cam/sdl_texture_yuv.cpp b/src/apps/cam/sdl_texture_yuv.cpp
index b29c3b93..480d7a37 100644
--- a/src/apps/cam/sdl_texture_yuv.cpp
+++ b/src/apps/cam/sdl_texture_yuv.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Ideas on Board Oy
*
- * sdl_texture_yuv.cpp - SDL YUV Textures
+ * SDL YUV Textures
*/
#include "sdl_texture_yuv.h"
diff --git a/src/apps/cam/sdl_texture_yuv.h b/src/apps/cam/sdl_texture_yuv.h
index 310e4e50..29c756e7 100644
--- a/src/apps/cam/sdl_texture_yuv.h
+++ b/src/apps/cam/sdl_texture_yuv.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Ideas on Board Oy
*
- * sdl_texture_yuv.h - SDL YUV Textures
+ * SDL YUV Textures
*/
#pragma once
diff --git a/src/apps/common/dng_writer.cpp b/src/apps/common/dng_writer.cpp
index 82bc065a..59f1fa23 100644
--- a/src/apps/common/dng_writer.cpp
+++ b/src/apps/common/dng_writer.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Raspberry Pi Ltd
*
- * dng_writer.cpp - DNG writer
+ * DNG writer
*/
#include "dng_writer.h"
diff --git a/src/apps/common/dng_writer.h b/src/apps/common/dng_writer.h
index 38f38f62..917713e6 100644
--- a/src/apps/common/dng_writer.h
+++ b/src/apps/common/dng_writer.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Raspberry Pi Ltd
*
- * dng_writer.h - DNG writer
+ * DNG writer
*/
#pragma once
diff --git a/src/apps/common/event_loop.cpp b/src/apps/common/event_loop.cpp
index cb83845c..f7f9afa0 100644
--- a/src/apps/common/event_loop.cpp
+++ b/src/apps/common/event_loop.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * event_loop.cpp - cam - Event loop
+ * cam - Event loop
*/
#include "event_loop.h"
diff --git a/src/apps/common/event_loop.h b/src/apps/common/event_loop.h
index ef79e8e5..ef129b9a 100644
--- a/src/apps/common/event_loop.h
+++ b/src/apps/common/event_loop.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * event_loop.h - cam - Event loop
+ * cam - Event loop
*/
#pragma once
diff --git a/src/apps/common/image.cpp b/src/apps/common/image.cpp
index fe2cc6da..a2a0f58f 100644
--- a/src/apps/common/image.cpp
+++ b/src/apps/common/image.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Ideas on Board Oy
*
- * image.cpp - Multi-planar image with access to pixel data
+ * Multi-planar image with access to pixel data
*/
#include "image.h"
diff --git a/src/apps/common/image.h b/src/apps/common/image.h
index 7953b177..e47e446b 100644
--- a/src/apps/common/image.h
+++ b/src/apps/common/image.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Ideas on Board Oy
*
- * image.h - Multi-planar image with access to pixel data
+ * Multi-planar image with access to pixel data
*/
#pragma once
diff --git a/src/apps/common/meson.build b/src/apps/common/meson.build
index 479326cd..5b683390 100644
--- a/src/apps/common/meson.build
+++ b/src/apps/common/meson.build
@@ -3,6 +3,7 @@
apps_sources = files([
'image.cpp',
'options.cpp',
+ 'ppm_writer.cpp',
'stream_options.cpp',
])
diff --git a/src/apps/common/options.cpp b/src/apps/common/options.cpp
index 4f7e8691..ab19aa3d 100644
--- a/src/apps/common/options.cpp
+++ b/src/apps/common/options.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * options.cpp - cam - Options parsing
+ * cam - Options parsing
*/
#include <assert.h>
diff --git a/src/apps/common/options.h b/src/apps/common/options.h
index 4ddd4987..9771aa7a 100644
--- a/src/apps/common/options.h
+++ b/src/apps/common/options.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * options.h - cam - Options parsing
+ * cam - Options parsing
*/
#pragma once
diff --git a/src/apps/common/ppm_writer.cpp b/src/apps/common/ppm_writer.cpp
new file mode 100644
index 00000000..d6c8641d
--- /dev/null
+++ b/src/apps/common/ppm_writer.cpp
@@ -0,0 +1,53 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2024 Red Hat, Inc.
+ *
+ * PPM writer
+ */
+
+#include "ppm_writer.h"
+
+#include <fstream>
+#include <iostream>
+
+#include <libcamera/formats.h>
+#include <libcamera/pixel_format.h>
+
+using namespace libcamera;
+
+int PPMWriter::write(const char *filename,
+ const StreamConfiguration &config,
+ const Span<uint8_t> &data)
+{
+ if (config.pixelFormat != formats::BGR888) {
+ std::cerr << "Only BGR888 output pixel format is supported ("
+ << config.pixelFormat << " requested)" << std::endl;
+ return -EINVAL;
+ }
+
+ std::ofstream output(filename, std::ios::binary);
+ if (!output) {
+ std::cerr << "Failed to open ppm file: " << filename << std::endl;
+ return -EINVAL;
+ }
+
+ output << "P6" << std::endl
+ << config.size.width << " " << config.size.height << std::endl
+ << "255" << std::endl;
+ if (!output) {
+ std::cerr << "Failed to write the file header" << std::endl;
+ return -EINVAL;
+ }
+
+ const unsigned int rowLength = config.size.width * 3;
+ const char *row = reinterpret_cast<const char *>(data.data());
+ for (unsigned int y = 0; y < config.size.height; y++, row += config.stride) {
+ output.write(row, rowLength);
+ if (!output) {
+ std::cerr << "Failed to write image data at row " << y << std::endl;
+ return -EINVAL;
+ }
+ }
+
+ return 0;
+}
diff --git a/src/apps/common/ppm_writer.h b/src/apps/common/ppm_writer.h
new file mode 100644
index 00000000..8c8d2e15
--- /dev/null
+++ b/src/apps/common/ppm_writer.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2024, Red Hat, Inc.
+ *
+ * PPM writer
+ */
+
+#pragma once
+
+#include <libcamera/base/span.h>
+
+#include <libcamera/stream.h>
+
+class PPMWriter
+{
+public:
+ static int write(const char *filename,
+ const libcamera::StreamConfiguration &config,
+ const libcamera::Span<uint8_t> &data);
+};
diff --git a/src/apps/common/stream_options.cpp b/src/apps/common/stream_options.cpp
index 663b979a..99239e07 100644
--- a/src/apps/common/stream_options.cpp
+++ b/src/apps/common/stream_options.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Raspberry Pi Ltd
*
- * stream_options.cpp - Helper to parse options for streams
+ * Helper to parse options for streams
*/
#include "stream_options.h"
diff --git a/src/apps/common/stream_options.h b/src/apps/common/stream_options.h
index a5f3bde0..a93f104c 100644
--- a/src/apps/common/stream_options.h
+++ b/src/apps/common/stream_options.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Raspberry Pi Ltd
*
- * stream_options.h - Helper to parse options for streams
+ * Helper to parse options for streams
*/
#pragma once
diff --git a/src/apps/ipa-verify/main.cpp b/src/apps/ipa-verify/main.cpp
index 76ba5073..0903cd85 100644
--- a/src/apps/ipa-verify/main.cpp
+++ b/src/apps/ipa-verify/main.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2023, Ideas on Board Oy
*
- * ipa_verify.cpp - Verify signature on an IPA module
+ * Verify signature on an IPA module
*/
#include <iostream>
diff --git a/src/apps/lc-compliance/environment.cpp b/src/apps/lc-compliance/environment.cpp
index 5eb3775f..987264f1 100644
--- a/src/apps/lc-compliance/environment.cpp
+++ b/src/apps/lc-compliance/environment.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Collabora Ltd.
*
- * environment.cpp - Common environment for tests
+ * Common environment for tests
*/
#include "environment.h"
diff --git a/src/apps/lc-compliance/environment.h b/src/apps/lc-compliance/environment.h
index 0debbcce..543e5372 100644
--- a/src/apps/lc-compliance/environment.h
+++ b/src/apps/lc-compliance/environment.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Collabora Ltd.
*
- * environment.h - Common environment for tests
+ * Common environment for tests
*/
#pragma once
diff --git a/src/apps/lc-compliance/helpers/capture.cpp b/src/apps/lc-compliance/helpers/capture.cpp
index 5aab973f..90c1530b 100644
--- a/src/apps/lc-compliance/helpers/capture.cpp
+++ b/src/apps/lc-compliance/helpers/capture.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020-2021, Google Inc.
*
- * simple_capture.cpp - Simple capture helper
+ * Simple capture helper
*/
#include "capture.h"
diff --git a/src/apps/lc-compliance/helpers/capture.h b/src/apps/lc-compliance/helpers/capture.h
index 0574ab1c..19b6927c 100644
--- a/src/apps/lc-compliance/helpers/capture.h
+++ b/src/apps/lc-compliance/helpers/capture.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020-2021, Google Inc.
*
- * simple_capture.h - Simple capture helper
+ * Simple capture helper
*/
#pragma once
diff --git a/src/apps/lc-compliance/main.cpp b/src/apps/lc-compliance/main.cpp
index 74e0d4df..3f1d2a61 100644
--- a/src/apps/lc-compliance/main.cpp
+++ b/src/apps/lc-compliance/main.cpp
@@ -3,7 +3,7 @@
* Copyright (C) 2020, Google Inc.
* Copyright (C) 2021, Collabora Ltd.
*
- * main.cpp - lc-compliance - The libcamera compliance tool
+ * lc-compliance - The libcamera compliance tool
*/
#include <iomanip>
diff --git a/src/apps/lc-compliance/tests/capture_test.cpp b/src/apps/lc-compliance/tests/capture_test.cpp
index 284d3630..ad3a1da2 100644
--- a/src/apps/lc-compliance/tests/capture_test.cpp
+++ b/src/apps/lc-compliance/tests/capture_test.cpp
@@ -3,7 +3,7 @@
* Copyright (C) 2020, Google Inc.
* Copyright (C) 2021, Collabora Ltd.
*
- * capture_test.cpp - Test camera capture
+ * Test camera capture
*/
#include "capture.h"
diff --git a/src/apps/qcam/cam_select_dialog.cpp b/src/apps/qcam/cam_select_dialog.cpp
index 3c8b12a9..c51f5974 100644
--- a/src/apps/qcam/cam_select_dialog.cpp
+++ b/src/apps/qcam/cam_select_dialog.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Utkarsh Tiwari <utkarsh02t@gmail.com>
*
- * cam_select_dialog.cpp - qcam - Camera Selection dialog
+ * qcam - Camera Selection dialog
*/
#include "cam_select_dialog.h"
diff --git a/src/apps/qcam/cam_select_dialog.h b/src/apps/qcam/cam_select_dialog.h
index 0b7709ed..4bec9ea9 100644
--- a/src/apps/qcam/cam_select_dialog.h
+++ b/src/apps/qcam/cam_select_dialog.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Utkarsh Tiwari <utkarsh02t@gmail.com>
*
- * cam_select_dialog.h - qcam - Camera Selection dialog
+ * qcam - Camera Selection dialog
*/
#pragma once
diff --git a/src/apps/qcam/format_converter.cpp b/src/apps/qcam/format_converter.cpp
index de76b32c..32123493 100644
--- a/src/apps/qcam/format_converter.cpp
+++ b/src/apps/qcam/format_converter.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * format_convert.cpp - qcam - Convert buffer to RGB
+ * Convert buffer to RGB
*/
#include "format_converter.h"
diff --git a/src/apps/qcam/format_converter.h b/src/apps/qcam/format_converter.h
index 37dbfae2..819a87a5 100644
--- a/src/apps/qcam/format_converter.h
+++ b/src/apps/qcam/format_converter.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * format_convert.h - qcam - Convert buffer to RGB
+ * Convert buffer to RGB
*/
#pragma once
diff --git a/src/apps/qcam/main.cpp b/src/apps/qcam/main.cpp
index 36cb93a5..9846fba5 100644
--- a/src/apps/qcam/main.cpp
+++ b/src/apps/qcam/main.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * main.cpp - qcam - The libcamera GUI test application
+ * qcam - The libcamera GUI test application
*/
#include <signal.h>
diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp
index 0f16c038..d515beed 100644
--- a/src/apps/qcam/main_window.cpp
+++ b/src/apps/qcam/main_window.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * main_window.cpp - qcam - Main application window
+ * qcam - Main application window
*/
#include "main_window.h"
@@ -190,7 +190,7 @@ int MainWindow::createToolbars()
action = toolbar_->addAction(QIcon::fromTheme("application-exit",
QIcon(":x-circle.svg")),
"Quit");
- action->setShortcut(Qt::CTRL | Qt::Key_Q);
+ action->setShortcut(QKeySequence::Quit);
connect(action, &QAction::triggered, this, &MainWindow::quit);
/* Camera selector. */
diff --git a/src/apps/qcam/main_window.h b/src/apps/qcam/main_window.h
index 2e3e1b5c..4cead734 100644
--- a/src/apps/qcam/main_window.h
+++ b/src/apps/qcam/main_window.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * main_window.h - qcam - Main application window
+ * qcam - Main application window
*/
#pragma once
diff --git a/src/apps/qcam/message_handler.cpp b/src/apps/qcam/message_handler.cpp
index 261623e1..c89714a9 100644
--- a/src/apps/qcam/message_handler.cpp
+++ b/src/apps/qcam/message_handler.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Laurent Pinchart <laurent.pinchart@ideasonboard.com>
*
- * message_handler.cpp - qcam - Log message handling
+ * qcam - Log message handling
*/
#include "message_handler.h"
diff --git a/src/apps/qcam/message_handler.h b/src/apps/qcam/message_handler.h
index 56294d37..92ef74d1 100644
--- a/src/apps/qcam/message_handler.h
+++ b/src/apps/qcam/message_handler.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Laurent Pinchart <laurent.pinchart@ideasonboard.com>
*
- * message_handler.cpp - qcam - Log message handling
+ * Log message handling
*/
#pragma once
diff --git a/src/apps/qcam/viewfinder.h b/src/apps/qcam/viewfinder.h
index a57446e8..914f88ec 100644
--- a/src/apps/qcam/viewfinder.h
+++ b/src/apps/qcam/viewfinder.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * viewfinder.h - qcam - Viewfinder base class
+ * qcam - Viewfinder base class
*/
#pragma once
diff --git a/src/apps/qcam/viewfinder_gl.cpp b/src/apps/qcam/viewfinder_gl.cpp
index f83b99ad..9d2a6960 100644
--- a/src/apps/qcam/viewfinder_gl.cpp
+++ b/src/apps/qcam/viewfinder_gl.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Linaro
*
- * viewfinderGL.cpp - OpenGL Viewfinder for rendering by OpenGL shader
+ * OpenGL Viewfinder for rendering by OpenGL shader
*/
#include "viewfinder_gl.h"
diff --git a/src/apps/qcam/viewfinder_gl.h b/src/apps/qcam/viewfinder_gl.h
index 68c2912d..23744b41 100644
--- a/src/apps/qcam/viewfinder_gl.h
+++ b/src/apps/qcam/viewfinder_gl.h
@@ -2,8 +2,7 @@
/*
* Copyright (C) 2020, Linaro
*
- * viewfinder_GL.h - OpenGL Viewfinder for rendering by OpenGL shader
- *
+ * OpenGL Viewfinder for rendering by OpenGL shader
*/
#pragma once
diff --git a/src/apps/qcam/viewfinder_qt.cpp b/src/apps/qcam/viewfinder_qt.cpp
index 62ed5e7c..4821c27d 100644
--- a/src/apps/qcam/viewfinder_qt.cpp
+++ b/src/apps/qcam/viewfinder_qt.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * viewfinder_qt.cpp - qcam - QPainter-based ViewFinder
+ * qcam - QPainter-based ViewFinder
*/
#include "viewfinder_qt.h"
diff --git a/src/apps/qcam/viewfinder_qt.h b/src/apps/qcam/viewfinder_qt.h
index eb3a9988..4f4b9f11 100644
--- a/src/apps/qcam/viewfinder_qt.h
+++ b/src/apps/qcam/viewfinder_qt.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * viewfinder_qt.h - qcam - QPainter-based ViewFinder
+ * qcam - QPainter-based ViewFinder
*/
#pragma once