Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qmediadevices.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 QMEDIADEVICES_H
5#define QMEDIADEVICES_H
6
7#include <QtMultimedia/qtmultimediaglobal.h>
8#include <QtCore/qobject.h>
9#include <QtCore/qstringlist.h>
10
12
13class QAudioDevice;
14class QCameraDevice;
15
16class QMediaDevicesPrivate;
17
18class Q_MULTIMEDIA_EXPORT QMediaDevices : public QObject
19{
21 Q_PROPERTY(QList<QAudioDevice> audioInputs READ audioInputs NOTIFY audioInputsChanged)
22 Q_PROPERTY(QList<QAudioDevice> audioOutputs READ audioOutputs NOTIFY audioOutputsChanged)
23 Q_PROPERTY(QList<QCameraDevice> videoInputs READ videoInputs NOTIFY videoInputsChanged)
24 Q_PROPERTY(QAudioDevice defaultAudioInput READ defaultAudioInput NOTIFY audioInputsChanged)
25 Q_PROPERTY(QAudioDevice defaultAudioOutput READ defaultAudioOutput NOTIFY audioOutputsChanged)
26 Q_PROPERTY(QCameraDevice defaultVideoInput READ defaultVideoInput NOTIFY videoInputsChanged)
27
28public:
29 QMediaDevices(QObject *parent = nullptr);
31
32 static QList<QAudioDevice> audioInputs();
33 static QList<QAudioDevice> audioOutputs();
34 static QList<QCameraDevice> videoInputs();
35
36 static QAudioDevice defaultAudioInput();
37 static QAudioDevice defaultAudioOutput();
38 static QCameraDevice defaultVideoInput();
39
41 void audioInputsChanged();
42 void audioOutputsChanged();
43 void videoInputsChanged();
44
45protected:
46 void connectNotify(const QMetaMethod &signal) override;
47
49 friend class QMediaDevicesPrivate;
50};
51
53
54
55#endif // QABSTRACTMEDIASERVICE_H
56
The QAudioDevice class provides an information about audio devices and their functionality.
The QCameraDevice class provides general information about camera devices.
Definition qlist.h:75
The QMediaDevices class provides information about available multimedia input and output devices.
\inmodule QtCore
Definition qmetaobject.h:19
\inmodule QtCore
Definition qobject.h:103
auto signal
Combined button and popup list for selecting options.
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS