1 /* This file is part of the KDE project
2 Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
22 #include "sourcenode.h"
30 SinkNodeXT::~SinkNodeXT()
35 AudioPort
SinkNodeXT::audioPort() const
40 xine_video_port_t
*SinkNodeXT::videoPort() const
45 SinkNode::SinkNode(SinkNodeXT
*_xt
)
46 : m_threadSafeObject(_xt
), m_source(0)
54 m_source
->removeSink(this);
58 void SinkNode::setSource(SourceNode
*s
)
60 Q_ASSERT(m_source
== 0);
64 void SinkNode::unsetSource(SourceNode
*s
)
66 Q_ASSERT(m_source
== s
);
70 SourceNode
*SinkNode::source() const
75 SourceNode
*SinkNode::sourceInterface()
80 void SinkNode::upstreamEvent(Event
*e
)
84 m_source
->upstreamEvent(e
);
92 void SinkNode::downstreamEvent(Event
*e
)
95 SourceNode
*iface
= sourceInterface();
97 iface
->downstreamEvent(e
);
106 } // namespace Phonon