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
24QT_BEGIN_NAMESPACE
25
26class QCameraDevice;
27class QPlatformMediaIntegration;
28
29class Q_MULTIMEDIA_EXPORT QPlatformVideoDevices : public QObject
30{
31 Q_OBJECT
32
33 QT_DEFINE_TAG_STRUCT(PrivateTag);
34public:
35 QPlatformVideoDevices(QPlatformMediaIntegration *integration);
36
37 ~QPlatformVideoDevices() override;
38
39 QList<QCameraDevice> videoInputs() const;
40
41protected:
42 virtual QList<QCameraDevice> findVideoInputs() const = 0;
43
44 void onVideoInputsChanged();
45
46Q_SIGNALS:
47 void videoInputsChanged(PrivateTag);
48
49protected:
50 QPlatformMediaIntegration *m_integration = nullptr;
51 mutable QCachedValue<QList<QCameraDevice>> m_videoInputs;
52};
53
54QT_END_NAMESPACE
55
56#endif
57

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

source code of qtmultimedia/src/multimedia/platform/qplatformvideodevices_p.h