qcam: Remove using namespace in header files
"using namespace" in a header file propagates the namespace to the files including the header file. So it should be avoided. This removes "using namespace" in header files in qcam. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
3b93746907
commit
f277590d5c
3 changed files with 27 additions and 27 deletions
|
@ -15,15 +15,13 @@
|
||||||
#include <libcamera/framebuffer.h>
|
#include <libcamera/framebuffer.h>
|
||||||
#include <libcamera/stream.h>
|
#include <libcamera/stream.h>
|
||||||
|
|
||||||
using namespace libcamera;
|
|
||||||
|
|
||||||
class DNGWriter
|
class DNGWriter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static int write(const char *filename, const Camera *camera,
|
static int write(const char *filename, const libcamera::Camera *camera,
|
||||||
const StreamConfiguration &config,
|
const libcamera::StreamConfiguration &config,
|
||||||
const ControlList &metadata,
|
const libcamera::ControlList &metadata,
|
||||||
const FrameBuffer *buffer, const void *data);
|
const libcamera::FrameBuffer *buffer, const void *data);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* HAVE_TIFF */
|
#endif /* HAVE_TIFF */
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include "main_window.h"
|
#include "main_window.h"
|
||||||
#include "message_handler.h"
|
#include "message_handler.h"
|
||||||
|
|
||||||
|
using namespace libcamera;
|
||||||
|
|
||||||
void signalHandler([[maybe_unused]] int signal)
|
void signalHandler([[maybe_unused]] int signal)
|
||||||
{
|
{
|
||||||
qInfo() << "Exiting";
|
qInfo() << "Exiting";
|
||||||
|
@ -66,7 +68,7 @@ int main(int argc, char **argv)
|
||||||
sa.sa_handler = &signalHandler;
|
sa.sa_handler = &signalHandler;
|
||||||
sigaction(SIGINT, &sa, nullptr);
|
sigaction(SIGINT, &sa, nullptr);
|
||||||
|
|
||||||
CameraManager *cm = new CameraManager();
|
CameraManager *cm = new libcamera::CameraManager();
|
||||||
|
|
||||||
ret = cm->start();
|
ret = cm->start();
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
#include "../cam/stream_options.h"
|
#include "../cam/stream_options.h"
|
||||||
#include "viewfinder.h"
|
#include "viewfinder.h"
|
||||||
|
|
||||||
using namespace libcamera;
|
|
||||||
|
|
||||||
class QAction;
|
class QAction;
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
|
|
||||||
|
@ -50,7 +48,8 @@ class MainWindow : public QMainWindow
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MainWindow(CameraManager *cm, const OptionsParser::Options &options);
|
MainWindow(libcamera::CameraManager *cm,
|
||||||
|
const OptionsParser::Options &options);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
|
||||||
bool event(QEvent *e) override;
|
bool event(QEvent *e) override;
|
||||||
|
@ -64,9 +63,10 @@ private Q_SLOTS:
|
||||||
|
|
||||||
void saveImageAs();
|
void saveImageAs();
|
||||||
void captureRaw();
|
void captureRaw();
|
||||||
void processRaw(FrameBuffer *buffer, const ControlList &metadata);
|
void processRaw(libcamera::FrameBuffer *buffer,
|
||||||
|
const libcamera::ControlList &metadata);
|
||||||
|
|
||||||
void queueRequest(FrameBuffer *buffer);
|
void queueRequest(libcamera::FrameBuffer *buffer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int createToolbars();
|
int createToolbars();
|
||||||
|
@ -77,13 +77,13 @@ private:
|
||||||
int startCapture();
|
int startCapture();
|
||||||
void stopCapture();
|
void stopCapture();
|
||||||
|
|
||||||
void addCamera(std::shared_ptr<Camera> camera);
|
void addCamera(std::shared_ptr<libcamera::Camera> camera);
|
||||||
void removeCamera(std::shared_ptr<Camera> camera);
|
void removeCamera(std::shared_ptr<libcamera::Camera> camera);
|
||||||
|
|
||||||
void requestComplete(Request *request);
|
void requestComplete(libcamera::Request *request);
|
||||||
void processCapture();
|
void processCapture();
|
||||||
void processHotplug(HotplugEvent *e);
|
void processHotplug(HotplugEvent *e);
|
||||||
void processViewfinder(FrameBuffer *buffer);
|
void processViewfinder(libcamera::FrameBuffer *buffer);
|
||||||
|
|
||||||
/* UI elements */
|
/* UI elements */
|
||||||
QToolBar *toolbar_;
|
QToolBar *toolbar_;
|
||||||
|
@ -102,21 +102,21 @@ private:
|
||||||
const OptionsParser::Options &options_;
|
const OptionsParser::Options &options_;
|
||||||
|
|
||||||
/* Camera manager, camera, configuration and buffers */
|
/* Camera manager, camera, configuration and buffers */
|
||||||
CameraManager *cm_;
|
libcamera::CameraManager *cm_;
|
||||||
std::shared_ptr<Camera> camera_;
|
std::shared_ptr<libcamera::Camera> camera_;
|
||||||
FrameBufferAllocator *allocator_;
|
libcamera::FrameBufferAllocator *allocator_;
|
||||||
|
|
||||||
std::unique_ptr<CameraConfiguration> config_;
|
std::unique_ptr<libcamera::CameraConfiguration> config_;
|
||||||
std::map<FrameBuffer *, std::unique_ptr<Image>> mappedBuffers_;
|
std::map<libcamera::FrameBuffer *, std::unique_ptr<Image>> mappedBuffers_;
|
||||||
|
|
||||||
/* Capture state, buffers queue and statistics */
|
/* Capture state, buffers queue and statistics */
|
||||||
bool isCapturing_;
|
bool isCapturing_;
|
||||||
bool captureRaw_;
|
bool captureRaw_;
|
||||||
Stream *vfStream_;
|
libcamera::Stream *vfStream_;
|
||||||
Stream *rawStream_;
|
libcamera::Stream *rawStream_;
|
||||||
std::map<const Stream *, QQueue<FrameBuffer *>> freeBuffers_;
|
std::map<const libcamera::Stream *, QQueue<libcamera::FrameBuffer *>> freeBuffers_;
|
||||||
QQueue<Request *> doneQueue_;
|
QQueue<libcamera::Request *> doneQueue_;
|
||||||
QQueue<Request *> freeQueue_;
|
QQueue<libcamera::Request *> freeQueue_;
|
||||||
QMutex mutex_; /* Protects freeBuffers_, doneQueue_, and freeQueue_ */
|
QMutex mutex_; /* Protects freeBuffers_, doneQueue_, and freeQueue_ */
|
||||||
|
|
||||||
uint64_t lastBufferTime_;
|
uint64_t lastBufferTime_;
|
||||||
|
@ -124,7 +124,7 @@ private:
|
||||||
uint32_t previousFrames_;
|
uint32_t previousFrames_;
|
||||||
uint32_t framesCaptured_;
|
uint32_t framesCaptured_;
|
||||||
|
|
||||||
std::vector<std::unique_ptr<Request>> requests_;
|
std::vector<std::unique_ptr<libcamera::Request>> requests_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __QCAM_MAIN_WINDOW__ */
|
#endif /* __QCAM_MAIN_WINDOW__ */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue