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
qcameradevice_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 QCAMERAINFO_P_H
5#define QCAMERAINFO_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 <QtMultimedia/qcameradevice.h>
19#include <QtCore/private/qglobal_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QCameraFormatPrivate : public QSharedData
24{
25public:
26 QVideoFrameFormat::PixelFormat pixelFormat = QVideoFrameFormat::Format_Invalid;
27 QSize resolution;
28 float minFrameRate = 0;
29 float maxFrameRate = 0;
30 QVideoFrameFormat::ColorRange colorRange = QVideoFrameFormat::ColorRange_Unknown;
31
32 static QVideoFrameFormat::ColorRange getColorRange(const QCameraFormat &format)
33 {
34 auto d = handle(format);
35 return d ? d->colorRange : QVideoFrameFormat::ColorRange_Unknown;
36 }
37
38 static const QCameraFormatPrivate *handle(const QCameraFormat &format)
39 {
40 return format.d.get();
41 }
42
43 QCameraFormat create() { return QCameraFormat(this); }
44};
45
47{
48public:
51 bool isDefault = false;
53 int orientation = 0;
56
57 static const QCameraDevicePrivate *handle(const QCameraDevice &device)
58 {
59 return device.d.data();
60 }
61
62 bool operator==(const QCameraDevicePrivate &other) const
63 {
64 return id == other.id && description == other.description && isDefault == other.isDefault
65 && position == other.position && orientation == other.orientation
66 && photoResolutions == other.photoResolutions && videoFormats == other.videoFormats;
67 }
68
69 QCameraDevice create() { return QCameraDevice(this); }
70};
71
72QT_END_NAMESPACE
73
74#endif // QCAMERAINFO_P_H
QCameraDevice create()
QCameraDevice::Position position
QList< QCameraFormat > videoFormats
static const QCameraDevicePrivate * handle(const QCameraDevice &device)
bool operator==(const QCameraDevicePrivate &other) const
QList< QSize > photoResolutions
QDebug operator<<(QDebug d, const QCameraDevice &camera)