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 QPLATFORMMEDIADEVICES_H
5#define QPLATFORMMEDIADEVICES_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/qtmultimediaglobal_p.h>
19#include <qlist.h>
20#include <qobject.h>
21#include <memory>
22
23QT_BEGIN_NAMESPACE
24
25class QAudioDevice;
26class QPlatformAudioSource;
27class QPlatformAudioSink;
28class QAudioFormat;
29
30class Q_MULTIMEDIA_EXPORT QPlatformMediaDevices : public QObject
31{
32 Q_OBJECT
33public:
34 QPlatformMediaDevices();
35 ~QPlatformMediaDevices() override;
36
37 static std::unique_ptr<QPlatformMediaDevices> create();
38
39 virtual QList<QAudioDevice> audioInputs() const;
40 virtual QList<QAudioDevice> audioOutputs() const;
41
42 virtual QPlatformAudioSource *createAudioSource(const QAudioDevice &, QObject *parent);
43 virtual QPlatformAudioSink *createAudioSink(const QAudioDevice &, QObject *parent);
44
45 QPlatformAudioSource *audioInputDevice(const QAudioFormat &format,
46 const QAudioDevice &deviceInfo, QObject *parent);
47 QPlatformAudioSink *audioOutputDevice(const QAudioFormat &format,
48 const QAudioDevice &deviceInfo, QObject *parent);
49
50 virtual void prepareAudio();
51
52 void initVideoDevicesConnection();
53
54Q_SIGNALS:
55 void audioInputsChanged();
56 void audioOutputsChanged();
57 void videoInputsChanged();
58};
59
60QT_END_NAMESPACE
61
62
63#endif // QPLATFORMMEDIADEVICES_H
64

Provided by KDAB

Privacy Policy
Start learning QML with our Intro Training
Find out more

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