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.h
Go to the documentation of this file.
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
QCAMERAINFO_H
5
#
define
QCAMERAINFO_H
6
7
#
include
<
QtCore
/
qshareddata
.
h
>
8
#
include
<
QtMultimedia
/
qtvideo
.
h
>
9
#
include
<
QtMultimedia
/
qvideoframe
.
h
>
10
11
QT_BEGIN_NAMESPACE
12
13
class
QDebug;
14
class
QCameraFormatPrivate;
15
class
Q_MULTIMEDIA_EXPORT
QCameraFormat
16
{
17
Q_GADGET
18
Q_PROPERTY(QSize resolution READ resolution CONSTANT)
19
Q_PROPERTY(QVideoFrameFormat::PixelFormat pixelFormat READ pixelFormat CONSTANT)
20
Q_PROPERTY(
float
minFrameRate READ minFrameRate CONSTANT)
21
Q_PROPERTY(
float
maxFrameRate READ maxFrameRate CONSTANT)
22
public
:
23
QCameraFormat()
noexcept
;
24
QCameraFormat(
const
QCameraFormat &other)
noexcept
;
25
QCameraFormat &operator=(
const
QCameraFormat &other)
noexcept
;
26
~QCameraFormat();
27
28
QVideoFrameFormat::PixelFormat pixelFormat()
const
noexcept
;
29
QSize resolution()
const
noexcept
;
30
float
minFrameRate()
const
noexcept
;
31
float
maxFrameRate()
const
noexcept
;
32
33
bool
isNull()
const
noexcept
{
return
!d; }
34
35
bool
operator==(
const
QCameraFormat &other)
const
;
36
inline
bool
operator!=(
const
QCameraFormat &other)
const
37
{
return
!operator==(other); }
38
39
private
:
40
friend
class
QCameraFormatPrivate;
41
QCameraFormat(QCameraFormatPrivate *p);
42
QExplicitlySharedDataPointer<QCameraFormatPrivate> d;
43
44
#
ifndef
QT_NO_DEBUG_STREAM
45
Q_MULTIMEDIA_EXPORT
friend
QDebug operator<<(QDebug,
const
QCameraFormat&);
46
#
endif
47
};
48
49
class
QCameraDevicePrivate
;
50
class
Q_MULTIMEDIA_EXPORT
QCameraDevice
51
{
52
Q_GADGET
53
Q_PROPERTY(QByteArray id READ id CONSTANT)
54
Q_PROPERTY(QString description READ description CONSTANT)
55
Q_PROPERTY(
bool
isDefault READ isDefault CONSTANT)
56
Q_PROPERTY(Position position READ position CONSTANT)
57
Q_PROPERTY(QList<QCameraFormat> videoFormats READ videoFormats CONSTANT)
58
Q_PROPERTY(QtVideo::Rotation correctionAngle READ correctionAngle CONSTANT)
59
Q_PROPERTY(QList<QSize> photoResolutions READ photoResolutions CONSTANT REVISION(6, 13))
60
public
:
61
QCameraDevice();
62
QCameraDevice(
const
QCameraDevice& other);
63
QCameraDevice& operator=(
const
QCameraDevice& other);
64
~QCameraDevice();
65
66
bool
operator==(
const
QCameraDevice &other)
const
;
67
inline
bool
operator!=(
const
QCameraDevice &other)
const
;
68
69
bool
isNull()
const
;
70
71
QByteArray id()
const
;
72
QString description()
const
;
73
74
// ### Add here and to QAudioDevice
75
// QByteArray groupId() const;
76
// QString groupDescription() const;
77
78
bool
isDefault()
const
;
79
80
enum
Position
81
{
82
UnspecifiedPosition,
83
BackFace,
84
FrontFace
85
};
86
Q_ENUM(Position)
87
88
Position position()
const
;
89
90
QList<QSize> photoResolutions()
const
;
91
QList<QCameraFormat> videoFormats()
const
;
92
93
QtVideo::Rotation correctionAngle()
const
;
94
// ### Add zoom and other camera information
95
96
private
:
97
friend
class
QCameraDevicePrivate;
98
QCameraDevice(QCameraDevicePrivate *p);
99
QExplicitlySharedDataPointer<QCameraDevicePrivate> d;
100
};
101
102
bool
QCameraDevice::operator!=(
const
QCameraDevice &other)
const
{
return
!operator==(other); }
103
104
#
ifndef
QT_NO_DEBUG_STREAM
105
Q_MULTIMEDIA_EXPORT
QDebug
operator<<(QDebug,
const
QCameraDevice&);
106
#
endif
107
108
QT_END_NAMESPACE
109
110
#
endif
// QCAMERAINFO_H
QCameraDevicePrivate
Definition
qcameradevice_p.h:58
QCameraDevice
The QCameraDevice class provides general information about camera devices.
Definition
qcameradevice.h:51
QCameraFormat
Definition
qcameradevice.h:16
QCameraPrivate
Definition
qcamera_p.h:28
QCameraPrivate::cameraDevice
QCameraDevice cameraDevice
Definition
qcamera_p.h:36
QCameraPrivate::captureSession
QMediaCaptureSession * captureSession
Definition
qcamera_p.h:33
QCameraPrivate::control
QPlatformCamera * control
Definition
qcamera_p.h:34
QCameraPrivate::cameraFormat
QCameraFormat cameraFormat
Definition
qcamera_p.h:37
QCamera
The QCamera class provides interface for system camera devices.
Definition
qcamera.h:25
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
operator<<
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition
qdir.cpp:2620
QMediaCaptureSession::ObjectTraits< QCamera >
\qmltype CaptureSession
Definition
qmediacapturesession.cpp:133
qtmultimedia
src
multimedia
camera
qcameradevice.h
Generated on
for Qt by
1.18.0