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 QGSTREAMERMEDIADEVICES_H
5#define QGSTREAMERMEDIADEVICES_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 <private/qplatformvideodevices_p.h>
19#include <gst/gst.h>
20#include <qaudiodevice.h>
21#include <vector>
22
23QT_BEGIN_NAMESPACE
24
25class QGstreamerVideoDevices : public QPlatformVideoDevices
26{
27public:
28 QGstreamerVideoDevices(QPlatformMediaIntegration *integration);
29
30 QList<QCameraDevice> videoDevices() const override;
31 GstDevice *videoDevice(const QByteArray &id) const;
32
33 void addDevice(GstDevice *);
34 void removeDevice(GstDevice *);
35
36private:
37 struct QGstDevice {
38 GstDevice *gstDevice = nullptr;
39 QByteArray id;
40 };
41
42 quint64 m_idGenerator = 0;
43 std::vector<QGstDevice> m_videoSources;
44};
45
46QT_END_NAMESPACE
47
48#endif
49

source code of qtmultimedia/src/plugins/multimedia/gstreamer/qgstreamervideodevices_p.h