23#include "streaminterface.h"
24#include "streaminterface_p.h"
25#include "abstractmediastream.h"
26#include "abstractmediastream_p.h"
27#include "mediasource_p.h"
29#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
34StreamInterface::StreamInterface()
35 : d(new StreamInterfacePrivate)
40StreamInterface::~StreamInterface()
43 AbstractMediaStreamPrivate *dd = d->mediaSource.stream()->d_func();
44 dd->setStreamInterface(
nullptr);
49void StreamInterface::connectToSource(
const MediaSource &mediaSource)
51 Q_ASSERT(!d->connected);
53 d->mediaSource = mediaSource;
54 Q_ASSERT(d->mediaSource.type() == MediaSource::Stream);
55 Q_ASSERT(d->mediaSource.stream());
56 AbstractMediaStreamPrivate *dd = d->mediaSource.stream()->d_func();
57 dd->setStreamInterface(
this);
64void StreamInterfacePrivate::disconnectMediaStream()
71 mediaSource.setAutoDelete(
false);
75 q->setStreamSeekable(
false);
78void StreamInterface::needData()
80 if (d->mediaSource.type() == MediaSource::Stream) {
85void StreamInterface::enoughData()
87 Q_ASSERT(d->connected);
88 if (d->mediaSource.type() == MediaSource::Stream) {
93void StreamInterface::seekStream(qint64 offset)
95 Q_ASSERT(d->connected);
96 if (d->mediaSource.type() == MediaSource::Stream) {
101void StreamInterface::reset()
103 Q_ASSERT(d->connected);
104 if (d->mediaSource.type() == MediaSource::Stream) {
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 11:55:56 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.