Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qgstreameraudioinput_p.h
Go to the documentation of this file.
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 QGSTREAMERAUDIOINPUT_P_H
5#define QGSTREAMERAUDIOINPUT_P_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 <private/qmultimediautils_p.h>
20#include <qaudiodevice.h>
21
22#include <QtCore/qobject.h>
23
24#include <qgst_p.h>
25#include <qgstpipeline_p.h>
26#include <private/qplatformaudioinput_p.h>
27
29
31class QAudioDevice;
32
33class Q_MULTIMEDIA_EXPORT QGstreamerAudioInput : public QObject, public QPlatformAudioInput
34{
36
37public:
40
41 int volume() const;
42 bool isMuted() const;
43
45 QAudioDevice audioInput() const;
46
47 void setAudioDevice(const QAudioDevice &) override;
48 void setVolume(float volume) override;
49 void setMuted(bool muted) override;
50
51 QGstElement gstElement() const { return gstAudioInput; }
52
54 void mutedChanged(bool);
55 void volumeChanged(int);
56
57private:
59
60 float m_volume = 1.;
61 bool m_muted = false;
62
63 QAudioDevice m_audioDevice;
64
65 // Gst elements
66 QGstBin gstAudioInput;
67
68 QGstElement audioSrc;
69 QGstElement audioVolume;
70};
71
73
74#endif
The QAudioDevice class provides an information about audio devices and their functionality.
\qmltype AudioInput \instantiates QAudioInput
Definition qaudioinput.h:19
void mutedChanged(bool)
static QMaybe< QPlatformAudioInput * > create(QAudioInput *parent)
bool setAudioInput(const QAudioDevice &)
QGstElement gstElement() const
\inmodule QtCore
Definition qobject.h:90
virtual void setVolume(float)
virtual void setMuted(bool)
virtual void setAudioDevice(const QAudioDevice &)
Combined button and popup list for selecting options.
#define Q_OBJECT
#define Q_SIGNALS
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent