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
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 <QtCore/qobject.h>
19#include <QtCore/private/qexpected_p.h>
20#include <QtMultimedia/private/qplatformaudioinput_p.h>
21
22#include <common/qgst_p.h>
23
24QT_BEGIN_NAMESPACE
25
26class QAudioDevice;
27
29{
30public:
31 static q23::expected<QPlatformAudioInput *, QString> create(QAudioInput *parent);
33
34 void setAudioDevice(const QAudioDevice &) override;
35 void setVolume(float) override;
36 void setMuted(bool) override;
37
38 QGstElement gstElement() const { return m_audioInputBin; }
39
40private:
41 explicit QGstreamerAudioInput(QAudioInput *parent);
42
43 QGstElement createGstElement();
44
45 QAudioDevice m_audioDevice;
46
47 // Gst elements
48 QGstBin m_audioInputBin;
49
50 QGstElement m_audioSrc;
51 QGstElement m_audioVolume;
52};
53
54QT_END_NAMESPACE
55
56#endif
static QGstBin createFromPipelineDescription(const char *pipelineDescription, const char *name=nullptr, bool ghostUnlinkedPads=false)
Definition qgst.cpp:1321
static QGstElement createFromFactory(const char *factory, const char *name=nullptr)
Definition qgst.cpp:956
void setMuted(bool) override
void setAudioDevice(const QAudioDevice &) override
static q23::expected< QPlatformAudioInput *, QString > create(QAudioInput *parent)
void setVolume(float) override
QGstElement gstElement() const
constexpr QLatin1String defaultSrcName
bool srcHasDeviceProperty(const QGstElement &element)