1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QCAMERA_P_H
5#define QCAMERA_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "private/qobject_p.h"
19#include "qcamera.h"
20#include "qcameradevice.h"
21
22QT_BEGIN_NAMESPACE
23
24class QPlatformCamera;
25class QPlatformMediaCaptureSession;
26
27class QCameraPrivate : public QObjectPrivate
28{
29 Q_DECLARE_PUBLIC(QCamera)
30public:
31 QCameraPrivate()
32 : QObjectPrivate(),
33 error(QCamera::NoError)
34 {
35 }
36
37 void init(const QCameraDevice &device);
38
39 QMediaCaptureSession *captureSession = nullptr;
40 QPlatformCamera *control = nullptr;
41
42 QCamera::Error error;
43 QString errorString;
44
45 QCameraDevice cameraDevice;
46 QCameraFormat cameraFormat;
47
48 void _q_error(int error, const QString &errorString);
49 void unsetError() { error = QCamera::NoError; errorString.clear(); }
50};
51
52QT_END_NAMESPACE
53
54#endif // QCAMERA_P_H
55

source code of qtmultimedia/src/multimedia/camera/qcamera_p.h