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/qsharedpointer.h>
20#include <QtCore/private/qglobal_p.h>
21
23
25{
26public:
29 float minFrameRate = 0;
30 float maxFrameRate = 0;
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 const QCameraFormatPrivate *handle(const QCameraFormat &format)
40 {
41 return format.d.get();
42 }
43
44 QCameraFormat create() { return QCameraFormat(this); }
45};
46
48{
49public:
51 QString description;
52 bool isDefault = false;
54 int orientation = 0;
57
58 static const QCameraDevicePrivate *handle(const QCameraDevice &device)
59 {
60 return device.d.data();
61 }
62
63 bool operator==(const QCameraDevicePrivate &other) const
64 {
65 return id == other.id && description == other.description && isDefault == other.isDefault
66 && position == other.position && orientation == other.orientation
67 && photoResolutions == other.photoResolutions && videoFormats == other.videoFormats;
68 }
69
70 QCameraDevice create() { return QCameraDevice(this); }
71};
72
73QT_END_NAMESPACE
74
75#endif // QCAMERAINFO_P_H
QList< QAudioDevice > findAudioInputs() const override
QList< QAudioDevice > findAudioOutputs() const override
QPlatformAudioSource * createAudioSource(const QAudioDevice &, const QAudioFormat &, QObject *parent) override
QPlatformAudioSink * createAudioSink(const QAudioDevice &, const QAudioFormat &, QObject *parent) override
QLatin1String backendName() const override
QCameraDevice create()
QCameraDevice::Position position
QList< QCameraFormat > videoFormats
static const QCameraDevicePrivate * handle(const QCameraDevice &device)
bool operator==(const QCameraDevicePrivate &other) const
QList< QSize > photoResolutions
QVideoFrameFormat::ColorRange colorRange
static const QCameraFormatPrivate * handle(const QCameraFormat &format)
QVideoFrameFormat::PixelFormat pixelFormat
static QVideoFrameFormat::ColorRange getColorRange(const QCameraFormat &format)
QCameraFormat create()
The QMediaDevices class provides information about available multimedia input and output devices.
State
Definition qaudio.h:29
@ StoppedState
Definition qaudio.h:29
@ SuspendedState
Definition qaudio.h:29
@ IdleState
Definition qaudio.h:29
@ ActiveState
Definition qaudio.h:29
Q_MULTIMEDIA_EXPORT float convertVolume(float volume, VolumeScale from, VolumeScale to)
Converts an audio volume from a volume scale to another, and returns the result.
Definition qtaudio.cpp:93
Error
Definition qaudio.h:28
@ UnderrunError
Definition qaudio.h:28
@ FatalError
Definition qaudio.h:28
@ OpenError
Definition qaudio.h:28
@ NoError
Definition qaudio.h:28
@ IOError
Definition qaudio.h:28
VolumeScale
Definition qaudio.h:31
@ LogarithmicVolumeScale
Definition qaudio.h:34
@ DecibelVolumeScale
Definition qaudio.h:35
@ LinearVolumeScale
Definition qaudio.h:32
@ CubicVolumeScale
Definition qaudio.h:33
Combined button and popup list for selecting options.
bool operator!=(const unique_str &str, std::string_view sv)
bool operator==(const unique_str &str, std::string_view sv)
static QList< QAudioDevice > availableDevices(QAudioDevice::Mode mode)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2462