Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwasmaudioinput_p.h
Go to the documentation of this file.
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
4
#
ifndef
QWASMAUDIOINPUT_H
5
#
define
QWASMAUDIOINPUT_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
<
QtCore
/
qobject
.
h
>
19
#
include
<
QtCore
/
qloggingcategory
.
h
>
20
21
#
include
<
private
/
qtmultimediaglobal_p
.
h
>
22
#
include
<
private
/
qplatformaudioinput_p
.
h
>
23
#
include
"private/qwasmmediadevices_p.h"
24
25
#
include
<
emscripten
.
h
>
26
#
include
<
emscripten
/
val
.
h
>
27
28
QT_BEGIN_NAMESPACE
29
30
Q_DECLARE_LOGGING_CATEGORY
(
qWasmAudioInput
)
31
32
class
QWasmAudioInput
:
public
QObject
,
public
QPlatformAudioInput
33
{
34
Q_OBJECT
35
public
:
36
explicit
QWasmAudioInput
(
QAudioInput
*
parent
);
37
~
QWasmAudioInput
();
38
39
void
setMuted
(
bool
muted)
override
;
40
void
setAudioDevice
(
const
QAudioDevice & device)
final
;
41
42
bool
isMuted
()
const
;
43
void
setVolume
(
float
volume)
final
;
44
emscripten
::
val
mediaStream
();
45
46
47
Q_SIGNALS
:
48
void
mutedChanged
(
bool
muted
);
49
50
private
:
51
bool
m_wasMuted =
false
;
52
void
setDeviceSourceStream(
const
std::string &id);
53
emscripten::val m_mediaStream;
54
std::unique_ptr<JsMediaInputStream> m_mediaInputStream;
55
};
56
57
QT_END_NAMESPACE
58
59
#
endif
// QWASMAUDIOINPUT_H
QWasmAudioInput
Definition
qwasmaudioinput_p.h:33
QWasmAudioInput::setMuted
void setMuted(bool muted) override
Definition
qwasmaudioinput.cpp:24
QWasmAudioInput::mediaStream
emscripten::val mediaStream()
Definition
qwasmaudioinput.cpp:83
QWasmAudioInput::isMuted
bool isMuted() const
Definition
qwasmaudioinput.cpp:43
QWasmAudioInput::setAudioDevice
void setAudioDevice(const QAudioDevice &device) final
Definition
qwasmaudioinput.cpp:48
QWasmAudioInput::~QWasmAudioInput
~QWasmAudioInput()
Definition
qwasmaudioinput.cpp:20
QWasmAudioInput::setVolume
void setVolume(float volume) final
Definition
qwasmaudioinput.cpp:57
QPlatformGraphicsBufferHelper
\inmodule QtGui
Q_DECLARE_LOGGING_CATEGORY
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcher)
qtmultimedia
src
plugins
multimedia
wasm
common
qwasmaudioinput_p.h
Generated on
for Qt by
1.14.0