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
qgstreameraudiodevice.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 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
#
include
"qgstreameraudiodevice_p.h"
5
6
#
include
<
common
/
qgst_p
.
h
>
7
#
include
<
common
/
qgstutils_p
.
h
>
8
#
include
<
private
/
qplatformmediaintegration_p
.
h
>
9
10
QT_BEGIN_NAMESPACE
11
12
QGStreamerCustomAudioDeviceInfo::QGStreamerCustomAudioDeviceInfo(
const
QByteArray &gstreamerPipeline,
13
QAudioDevice::Mode mode)
14
: QAudioDevicePrivate{
15
gstreamerPipeline,
16
mode,
17
QString::fromUtf8(gstreamerPipeline),
18
false
,
19
std::future<QAudioDevicePrivate::AudioDeviceFormat>{}
// invalid future - format not predetermined
20
}
21
{
22
}
23
24
QAudioDevice
qMakeCustomGStreamerAudioInput
(
const
QByteArray &gstreamerPipeline)
25
{
26
auto
deviceInfo = std::make_unique<QGStreamerCustomAudioDeviceInfo>(gstreamerPipeline,
27
QAudioDevice::Mode::Input);
28
29
return
QAudioDevicePrivate::createQAudioDevice(std::move(deviceInfo));
30
}
31
32
QAudioDevice
qMakeCustomGStreamerAudioOutput
(
const
QByteArray &gstreamerPipeline)
33
{
34
auto
deviceInfo = std::make_unique<QGStreamerCustomAudioDeviceInfo>(gstreamerPipeline,
35
QAudioDevice::Mode::Output);
36
37
return
QAudioDevicePrivate::createQAudioDevice(std::move(deviceInfo));
38
}
39
40
bool
isCustomAudioDevice
(
const
QAudioDevicePrivate *device)
41
{
42
return
dynamic_cast
<
const
QGStreamerCustomAudioDeviceInfo *>(device);
43
}
44
45
bool
isCustomAudioDevice
(
const
QAudioDevice &device)
46
{
47
return
isCustomAudioDevice(QAudioDevicePrivate::handle(device));
48
}
49
50
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
isCustomAudioDevice
bool isCustomAudioDevice(const QAudioDevicePrivate *device)
Definition
qgstreameraudiodevice.cpp:40
isCustomAudioDevice
bool isCustomAudioDevice(const QAudioDevice &device)
Definition
qgstreameraudiodevice.cpp:45
qMakeCustomGStreamerAudioInput
QAudioDevice qMakeCustomGStreamerAudioInput(const QByteArray &gstreamerPipeline)
Definition
qgstreameraudiodevice.cpp:24
qMakeCustomGStreamerAudioOutput
QAudioDevice qMakeCustomGStreamerAudioOutput(const QByteArray &gstreamerPipeline)
Definition
qgstreameraudiodevice.cpp:32
qtmultimedia
src
plugins
multimedia
gstreamer
audio
qgstreameraudiodevice.cpp
Generated on
for Qt by
1.16.1