summaryrefslogtreecommitdiffstats
path: root/src/PulseAudioQt/stream.cpp
blob: 8a392f00033ebd5d63aaef1fb2f47b90105785e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
    SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org>

    SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/

#include "stream.h"
#include "context_p.h"
#include "stream_p.h"
#include "volumeobject_p.h"

namespace PulseAudioQt
{
Stream::Stream(QObject *parent)
    : VolumeObject(parent)
    , d(new StreamPrivate(this))
{
    VolumeObject::d->m_volumeWritable = false;
}

Stream::~Stream()
{
    delete d;
}

StreamPrivate::StreamPrivate(Stream *q)
    : q(q)
{
}

StreamPrivate::~StreamPrivate()
{
}

Client *Stream::client() const
{
    return Context::instance()->d->m_clients.data().value(d->m_clientIndex, nullptr);
}

bool Stream::isVirtualStream() const
{
    return d->m_virtualStream;
}

quint32 Stream::deviceIndex() const
{
    return d->m_deviceIndex;
}

bool Stream::isCorked() const
{
    return d->m_corked;
}

bool Stream::hasVolume() const
{
    return d->m_hasVolume;
}

} // PulseAudioQt