4#ifndef QWASMMEDIADEVICES_H
5#define QWASMMEDIADEVICES_H
18#include <private/qplatformaudiodevices_p.h>
20#include <private/qplatformvideodevices_p.h>
23#include <QtCore/private/qstdweb_p.h>
25#include <qaudiodevice.h>
26#include <qcameradevice.h>
28#include <QtCore/qloggingcategory.h>
30#include <emscripten.h>
31#include <emscripten/val.h>
32#include <emscripten/bind.h>
33#include <QMapIterator>
36Q_DECLARE_LOGGING_CATEGORY(qWasmMediaDevices)
38class QWasmAudioEngine;
64 QObject *parent)
override;
66 QObject *parent)
override;
92 void updateCameraDevices();
93 void getMediaDevices();
94 void getOpenALAudioDevices();
95 void parseDevices(emscripten::val devices);
97 QMap <std::string, QAudioDevice> m_audioOutputs;
98 QMap <std::string, QAudioDevice> m_audioInputs;
99 QMap <std::string, QCameraDevice> m_cameraDevices;
101 std::unique_ptr<qstdweb::EventCallback> m_deviceChangedCallback;
103 bool m_videoInputsAdded =
false;
104 bool m_audioInputsAdded =
false;
105 bool m_audioOutputsAdded =
false;
107 bool m_initDone =
false;
108 bool m_firstInit =
false;
The QAudioDevice class provides an information about audio devices and their functionality.
The QCameraDevice class provides general information about camera devices.
QPlatformAudioSink * createAudioSink(const QAudioDevice &, const QAudioFormat &, QObject *parent) override
QList< QAudioDevice > findAudioOutputs() const override
QList< QAudioDevice > findAudioInputs() const override
QPlatformAudioSource * createAudioSource(const QAudioDevice &, const QAudioFormat &, QObject *parent) override
void connectNotify(const QMetaMethod &signal) override
QLatin1String backendName() const override
void connectNotify(const QMetaMethod &signal) override
QList< QCameraDevice > findVideoInputs() const override
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")