1 | // Copyright (C) 2022 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 | #ifndef QPLATFORMVIDEODEVICES_H |
4 | #define QPLATFORMVIDEODEVICES_H |
5 | |
6 | // |
7 | // W A R N I N G |
8 | // ------------- |
9 | // |
10 | // This file is not part of the Qt API. It exists purely as an |
11 | // implementation detail. This header file may change from version to |
12 | // version without notice, or even be removed. |
13 | // |
14 | // We mean it. |
15 | // |
16 | |
17 | #include <private/qtmultimediaglobal_p.h> |
18 | #include <qmediarecorder.h> |
19 | #include <qcameradevice.h> |
20 | #include <qobject.h> |
21 | |
22 | #include <private/qcachedvalue_p.h> |
23 | |
24 | QT_BEGIN_NAMESPACE |
25 | |
26 | class QCameraDevice; |
27 | class QPlatformMediaIntegration; |
28 | |
29 | class Q_MULTIMEDIA_EXPORT QPlatformVideoDevices : public QObject |
30 | { |
31 | Q_OBJECT |
32 | |
33 | QT_DEFINE_TAG_STRUCT(PrivateTag); |
34 | public: |
35 | QPlatformVideoDevices(QPlatformMediaIntegration *integration); |
36 | |
37 | ~QPlatformVideoDevices() override; |
38 | |
39 | QList<QCameraDevice> videoInputs() const; |
40 | |
41 | protected: |
42 | virtual QList<QCameraDevice> findVideoInputs() const = 0; |
43 | |
44 | void onVideoInputsChanged(); |
45 | |
46 | Q_SIGNALS: |
47 | void videoInputsChanged(PrivateTag); |
48 | |
49 | protected: |
50 | QPlatformMediaIntegration *m_integration = nullptr; |
51 | mutable QCachedValue<QList<QCameraDevice>> m_videoInputs; |
52 | }; |
53 | |
54 | QT_END_NAMESPACE |
55 | |
56 | #endif |
57 |