summaryrefslogtreecommitdiff
path: root/test/object.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-12-07 23:32:04 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-12-08 00:25:00 +0200
commit41d6e6e5c166c267e7a15a7b0c1d930bddcbc6b8 (patch)
tree82a3d1350c6f0bea5a98b9d16b1a5b1911b95b73 /test/object.cpp
parent1c56d2a2cd2dcca86272675e21bbb1770d32db1f (diff)
meson: Replace hack with usage of '@BASENAME@'
Starting with meson 0.59, the custom_target() function substitutes '@BASENAME@' in the output parameter with the input file name, with the extension removed. This is exactly what we implement manually when generating the IPA interface .cpp files. Furthermore, starting with meson 0.60, the 'name' positional parameter to the custom_target() function is optional, and defaults to the basename of the output file (including the extension). This is exactly the name we compute manually and pass to the function. As libcamera requires meson 0.60 or newer, we can depend on those two features and drop manual computation of the base name. This fixes a warning with recent meson versions that complain that passing a file object to the format() function is a broken feature: WARNING: Broken features used: * 1.3.0: {'str.format: Value other than strings, integers, bools, options, dictionaries and lists thereof.'} Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/object.cpp')
0 files changed, 0 insertions, 0 deletions
-later */ /* * Copyright (C) 2019, Google Inc. * * viewfinder_qt.h - qcam - QPainter-based ViewFinder */ #ifndef __QCAM_VIEWFINDER_QT_H__ #define __QCAM_VIEWFINDER_QT_H__ #include <QIcon> #include <QImage> #include <QList> #include <QMutex> #include <QSize> #include <QWidget> #include <libcamera/buffer.h> #include <libcamera/formats.h> #include <libcamera/pixel_format.h> #include "format_converter.h" #include "viewfinder.h" class ViewFinderQt : public QWidget, public ViewFinder { Q_OBJECT public: ViewFinderQt(QWidget *parent); ~ViewFinderQt(); const QList<libcamera::PixelFormat> &nativeFormats() const override; int setFormat(const libcamera::PixelFormat &format, const QSize &size) override; void render(libcamera::FrameBuffer *buffer, MappedBuffer *map) override; void stop() override; QImage getCurrentImage() override; Q_SIGNALS: void renderComplete(libcamera::FrameBuffer *buffer); protected: void paintEvent(QPaintEvent *) override; QSize sizeHint() const override; private: FormatConverter converter_; libcamera::PixelFormat format_; QSize size_; /* Camera stopped icon */ QSize vfSize_; QIcon icon_; QPixmap pixmap_; /* Buffer and render image */ libcamera::FrameBuffer *buffer_; QImage image_; QMutex mutex_; /* Prevent concurrent access to image_ */ }; #endif /* __QCAM_VIEWFINDER_QT_H__ */