Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
21
QT_BEGIN_NAMESPACE
22
23
class
QCameraFormatPrivate :
public
QSharedData
24
{
25
public
:
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
QVideoFrameFormat::ColorSpace colorSpace = QVideoFrameFormat::ColorSpace_Undefined;
32
33
static
QVideoFrameFormat::ColorRange getColorRange(
const
QCameraFormat &format)
34
{
35
auto
d = handle(format);
36
return
d ? d->colorRange : QVideoFrameFormat::ColorRange_Unknown;
37
}
38
39
static
QVideoFrameFormat::ColorSpace getColorSpace(
const
QCameraFormat &format)
40
{
41
auto
d = handle(format);
42
return
d ? d->colorSpace : QVideoFrameFormat::ColorSpace_Undefined;
43
}
44
45
static
const
QCameraFormatPrivate *handle(
const
QCameraFormat &format)
46
{
47
return
format.d.get();
48
}
49
50
static
QCameraFormat create(std::unique_ptr<QCameraFormatPrivate> formatInfo)
51
{
52
return
QCameraFormat(formatInfo.release());
53
}
54
QCameraFormat create() {
return
QCameraFormat(
this
); }
55
};
56
57
class
QCameraDevicePrivate
:
public
QSharedData
58
{
59
public
:
60
QByteArray
id
;
61
QString
description
;
62
bool
isDefault
=
false
;
63
QCameraDevice
::
Position
position
=
QCameraDevice
::
UnspecifiedPosition
;
64
int
orientation
= 0;
65
QList
<
QSize
>
photoResolutions
;
66
QList
<
QCameraFormat
>
videoFormats
;
67
68
static
const
QCameraDevicePrivate
*
handle
(
const
QCameraDevice &device)
69
{
70
return
device.d.data();
71
}
72
73
static
QCameraDevicePrivate
*
handle
(QCameraDevice &device) {
return
device.d.data(); }
74
75
bool
operator
==(
const
QCameraDevicePrivate
&other)
const
76
{
77
return
id == other.id && description == other.description && isDefault == other.isDefault
78
&& position == other.position && orientation == other.orientation
79
&& photoResolutions == other.photoResolutions && videoFormats == other.videoFormats;
80
}
81
82
static
QCameraDevice
create
(std::unique_ptr<QCameraDevicePrivate> device)
83
{
84
return
QCameraDevice(device.release());
85
}
86
QCameraDevice
create
() {
return
QCameraDevice(
this
); }
87
};
88
89
QT_END_NAMESPACE
90
91
#
endif
// QCAMERAINFO_P_H
QCameraDevicePrivate
Definition
qcameradevice_p.h:58
QCameraDevicePrivate::description
QString description
Definition
qcameradevice_p.h:61
QCameraDevicePrivate::create
QCameraDevice create()
Definition
qcameradevice_p.h:86
QCameraDevicePrivate::position
QCameraDevice::Position position
Definition
qcameradevice_p.h:63
QCameraDevicePrivate::id
QByteArray id
Definition
qcameradevice_p.h:60
QCameraDevicePrivate::videoFormats
QList< QCameraFormat > videoFormats
Definition
qcameradevice_p.h:66
QCameraDevicePrivate::handle
static QCameraDevicePrivate * handle(QCameraDevice &device)
Definition
qcameradevice_p.h:73
QCameraDevicePrivate::isDefault
bool isDefault
Definition
qcameradevice_p.h:62
QCameraDevicePrivate::orientation
int orientation
Definition
qcameradevice_p.h:64
QCameraDevicePrivate::handle
static const QCameraDevicePrivate * handle(const QCameraDevice &device)
Definition
qcameradevice_p.h:68
QCameraDevicePrivate::operator==
bool operator==(const QCameraDevicePrivate &other) const
Definition
qcameradevice_p.h:75
QCameraDevicePrivate::create
static QCameraDevice create(std::unique_ptr< QCameraDevicePrivate > device)
Definition
qcameradevice_p.h:82
QCameraDevicePrivate::photoResolutions
QList< QSize > photoResolutions
Definition
qcameradevice_p.h:65
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
operator<<
QDebug operator<<(QDebug d, const QCameraDevice &camera)
Definition
qcameradevice.cpp:528
fuzzyCompareFrameRates
static bool fuzzyCompareFrameRates(float a, float b)
Definition
qcameradevice.cpp:179
operator<<
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
Definition
qfileinfo.cpp:1830
qtmultimedia
src
multimedia
camera
qcameradevice_p.h
Generated on
for Qt by
1.18.0