File indexing completed on 2024-12-08 08:02:48

0001 /*
0002     SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #include "stream.h"
0008 
0009 namespace QPulseAudio
0010 {
0011 Stream::Stream(QObject *parent)
0012     : VolumeObject(parent)
0013     , m_deviceIndex(PA_INVALID_INDEX)
0014     , m_clientIndex(PA_INVALID_INDEX)
0015 {
0016     m_volumeWritable = false;
0017     m_hasVolume = false;
0018 }
0019 
0020 Stream::~Stream() = default;
0021 
0022 QString Stream::name() const
0023 {
0024     return m_name;
0025 }
0026 
0027 Client *Stream::client() const
0028 {
0029     return context()->clients().data().value(m_clientIndex, nullptr);
0030 }
0031 
0032 bool Stream::isVirtualStream() const
0033 {
0034     return m_virtualStream;
0035 }
0036 
0037 quint32 Stream::deviceIndex() const
0038 {
0039     return m_deviceIndex;
0040 }
0041 
0042 bool Stream::isCorked() const
0043 {
0044     return m_corked;
0045 }
0046 
0047 } // QPulseAudio