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
qgstreameraudiooutput_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 QGSTREAMERAUDIOOUTPUT_P_H
5#define QGSTREAMERAUDIOOUTPUT_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/qplatformaudiooutput_p.h>
21
22#include <common/qgst_p.h>
23
24QT_BEGIN_NAMESPACE
25
26class QAudioDevice;
27
29{
30public:
31 static q23::expected<QPlatformAudioOutput *, QString> create(QAudioOutput *parent);
33
34 void setAudioDevice(const QAudioDevice &) override;
35 void setVolume(float) override;
36 void setMuted(bool) override;
37 void setAsync(bool);
38
39 QGstElement gstElement() const { return m_audioOutputBin; }
40
41private:
42 explicit QGstreamerAudioOutput(QAudioOutput *parent);
43
44 QGstElement createGstElement();
45
46 QAudioDevice m_audioDevice;
47
48 // Gst elements
49 QGstBin m_audioOutputBin;
50
51 QGstElement m_audioQueue;
52 QGstElement m_audioConvert;
53 QGstElement m_audioResample;
54 QGstElement m_audioVolume;
55 QGstElement m_audioSink;
56
57 bool m_sinkIsAsync = true;
58};
59
60QT_END_NAMESPACE
61
62#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 setAudioDevice(const QAudioDevice &) override
void setVolume(float) override
QGstElement gstElement() const
static q23::expected< QPlatformAudioOutput *, QString > create(QAudioOutput *parent)
constexpr QLatin1String defaultSinkName
bool sinkHasDeviceProperty(const QGstElement &element)