Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqnximagecapture_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 Research In Motion
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3#ifndef QQnxImageCapture_H
4#define QQnxImageCapture_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <private/qplatformimagecapture_p.h>
18
19#include <QtCore/qfuture.h>
20
21QT_BEGIN_NAMESPACE
22
23class QQnxMediaCaptureSession;
25
26class QThread;
27
29{
31public:
33
34 bool isReadyForCapture() const override;
35
36 int capture(const QString &fileName) override;
38
39 QImageEncoderSettings imageSettings() const override;
40 void setImageSettings(const QImageEncoderSettings &settings) override;
41
43
44private:
45 QFuture<QImage> decodeFrame(int id, const QVideoFrame &frame);
46 void saveFrame(int id, const QVideoFrame &frame, const QString &fileName);
47
48 void onCameraChanged();
49 void onCameraActiveChanged(bool active);
50 void updateReadyForCapture();
51
52 QQnxMediaCaptureSession *m_session = nullptr;
53 QQnxPlatformCamera *m_camera = nullptr;
54
55 int m_lastId = 0;
56 QImageEncoderSettings m_settings;
57
58 bool m_lastReadyForCapture = false;
59};
60
61QT_END_NAMESPACE
62
63#endif
void setImageSettings(const QImageEncoderSettings &settings) override
QImageEncoderSettings imageSettings() const override
void setCaptureSession(QQnxMediaCaptureSession *session)
int captureToBuffer() override
int capture(const QString &fileName) override
bool isReadyForCapture() const override
bool isActive() const override
static QString resolveFileName(const QString &fileName, QImageCapture::FileFormat format)
static QString formatExtension(QImageCapture::FileFormat format)