File indexing completed on 2023-12-10 11:57:39
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 #include "context_p.h" 0009 #include "stream_p.h" 0010 #include "volumeobject_p.h" 0011 0012 namespace PulseAudioQt 0013 { 0014 Stream::Stream(QObject *parent) 0015 : VolumeObject(parent) 0016 , d(new StreamPrivate(this)) 0017 { 0018 VolumeObject::d->m_volumeWritable = false; 0019 } 0020 0021 Stream::~Stream() 0022 { 0023 delete d; 0024 } 0025 0026 StreamPrivate::StreamPrivate(Stream *q) 0027 : q(q) 0028 { 0029 } 0030 0031 StreamPrivate::~StreamPrivate() 0032 { 0033 } 0034 0035 Client *Stream::client() const 0036 { 0037 return Context::instance()->d->m_clients.data().value(d->m_clientIndex, nullptr); 0038 } 0039 0040 bool Stream::isVirtualStream() const 0041 { 0042 return d->m_virtualStream; 0043 } 0044 0045 quint32 Stream::deviceIndex() const 0046 { 0047 return d->m_deviceIndex; 0048 } 0049 0050 bool Stream::isCorked() const 0051 { 0052 return d->m_corked; 0053 } 0054 0055 bool Stream::hasVolume() const 0056 { 0057 return d->m_hasVolume; 0058 } 0059 0060 } // PulseAudioQt