[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [phonon/five] phonon: Begin refactoring Source, major clean up
From:       Casian Andrei <skeletk13 () gmail ! com>
Date:       2013-11-14 12:49:39
Message-ID: E1VgwMd-0005Zv-8O () scm ! kde ! org
[Download RAW message or body]

Git commit 65543cbbfac44d86d324f1cfa4d9c0423141f164 by Casian Andrei.
Committed on 12/11/2013 at 12:52.
Pushed by casianandrei into branch 'five'.

Begin refactoring Source, major clean up

Initial cleanup round for Source

Remove ifdef blocks about abstractmediastream

Horde of build fixes including fixes for AbstractMediaStream

Put prefix for SourcePrivate members

Virtual destructor for Source

Reorder Source copy constructor, remove friends

Device name from string to byte array

Rename (rhs) parameter to (other)

Reorganize includes for Source

Replace DiscType with Source::DeviceType

Add SourceControl skeleton code

Standardize header guards for Source related headers

M  +8    -3    phonon/CMakeLists.txt
M  +0    -24   phonon/abstractmediastream.cpp
M  +0    -4    phonon/abstractmediastream.h
M  +1    -6    phonon/abstractmediastream_p.h
M  +1    -3    phonon/iodevicestream.cpp
M  +0    -4    phonon/iodevicestream_p.h
M  +0    -22   phonon/phononnamespace.cpp
M  +0    -9    phonon/phononnamespace.h
M  +8    -35   phonon/player.cpp
M  +2    -0    phonon/player.h
M  +3    -6    phonon/player_p.h
M  +35   -265  phonon/source.cpp
M  +22   -41   phonon/source.h
M  +12   -45   phonon/source_p.h
A  +62   -0    phonon/sourcecontrol.cpp     [License: LGPL]
A  +48   -0    phonon/sourcecontrol.h     [License: LGPL]
A  +42   -0    phonon/sourcecontrol_p.h     [License: LGPL]
A  +44   -0    phonon/sourcecontrolinterface.h     [License: LGPL]
M  +6    -16   phonon/streaminterface.cpp
M  +0    -4    phonon/streaminterface.h
M  +2    -5    phonon/streaminterface_p.h

http://commits.kde.org/phonon/65543cbbfac44d86d324f1cfa4d9c0423141f164

diff --git a/phonon/CMakeLists.txt b/phonon/CMakeLists.txt
index b9b86cf..1edf2cb 100644
--- a/phonon/CMakeLists.txt
+++ b/phonon/CMakeLists.txt
@@ -6,6 +6,7 @@ set(phonon_LIB_SRCS
     frontend.cpp
     player.cpp
     source.cpp
+    sourcecontrol.cpp
 
     # Abstracts
     abstractoutput.cpp
@@ -19,17 +20,19 @@ set(phonon_LIB_SRCS
     frontend_p.h
     player_p.h
     source_p.h
+    sourcecontrol_p.h
 
     # Interfaces (QTC Compat)
     backendinterface.h
     playerinterface.h
+    sourcecontrolinterface.h
 )
 
 # random plunder battlefield4 sources
 set(phonon_LIB_SRCS
 ${phonon_LIB_SRCS}
 #   abstractaudiooutput_p.cpp
-#   abstractmediastream.cpp
+   abstractmediastream.cpp
 #   audiodataoutput.cpp
    audiooutput.cpp
    backendcapabilities.cpp
@@ -37,13 +40,13 @@ ${phonon_LIB_SRCS}
 #    effectparameter.cpp
 #    effectwidget.cpp
    globalconfig.cpp
-#   iodevicestream.cpp
+   iodevicestream.cpp
    objectdescription.cpp
    phononnamespace.cpp
    platform.cpp
 #   pulsesupport.cpp
 #    seekslider.cpp
-#   streaminterface.cpp
+   streaminterface.cpp
 #    swiftslider.cpp
 #    volumefadereffect.cpp
 #    volumeslider.cpp
@@ -111,6 +114,8 @@ install(FILES
     player.h
     playerinterface.h
     source.h
+    sourcecontrol.h
+    sourcecontrolinterface.h
     objectdescription.h
     phonon_export.h
     phonondefs.h
diff --git a/phonon/abstractmediastream.cpp b/phonon/abstractmediastream.cpp
index f895f8c..9367430 100644
--- a/phonon/abstractmediastream.cpp
+++ b/phonon/abstractmediastream.cpp
@@ -22,13 +22,9 @@
 
 #include "abstractmediastream.h"
 #include "abstractmediastream_p.h"
-#include "mediaobjectinterface.h"
-#include "mediaobject_p.h"
 #include "phonondefs_p.h"
 #include "streaminterface_p.h"
 
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 namespace Phonon
 {
 
@@ -117,10 +113,6 @@ void AbstractMediaStream::error(Phonon::ErrorType type, const \
QString &text)  Q_D(AbstractMediaStream);
     d->errorType = type;
     d->errorText = text;
-    if (d->mediaObjectPrivate) {
-        // TODO: MediaObject might be in a different thread
-        d->mediaObjectPrivate->streamError(type, text);
-    }
 }
 
 void AbstractMediaStream::enoughData()
@@ -134,10 +126,6 @@ void AbstractMediaStream::seekStream(qint64)
 
 AbstractMediaStreamPrivate::~AbstractMediaStreamPrivate()
 {
-    if (mediaObjectPrivate) {
-        // TODO: MediaObject might be in a different thread
-        mediaObjectPrivate->removeDestructionHandler(this);
-    }
     if (streamInterface) {
         // TODO: StreamInterface might be in a different thread
         streamInterface->d->disconnectMediaStream();
@@ -166,21 +154,9 @@ void \
AbstractMediaStreamPrivate::setStreamInterface(StreamInterface *iface)  }
 }
 
-void AbstractMediaStreamPrivate::setMediaObjectPrivate(MediaObjectPrivate *mop)
-{
-    // TODO: MediaObject might be in a different thread
-    mediaObjectPrivate = mop;
-    mediaObjectPrivate->addDestructionHandler(this);
-    if (!errorText.isEmpty()) {
-        mediaObjectPrivate->streamError(errorType, errorText);
-    }
-}
-
 } // namespace Phonon
 
 
 #include "moc_abstractmediastream.cpp"
 
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 // vim: sw=4 sts=4 et tw=100
diff --git a/phonon/abstractmediastream.h b/phonon/abstractmediastream.h
index ecf0e3b..7a4e6e6 100644
--- a/phonon/abstractmediastream.h
+++ b/phonon/abstractmediastream.h
@@ -30,8 +30,6 @@
 
 class QByteArray;
 
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 namespace Phonon
 {
 class Player;
@@ -217,7 +215,5 @@ class PHONON_EXPORT AbstractMediaStream : public QObject
 
 } // namespace Phonon
 
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 
 #endif // PHONON_ABSTRACTMEDIASTREAM_H
diff --git a/phonon/abstractmediastream_p.h b/phonon/abstractmediastream_p.h
index cba0547..fb47895 100644
--- a/phonon/abstractmediastream_p.h
+++ b/phonon/abstractmediastream_p.h
@@ -28,19 +28,16 @@
 #include "player_p.h"
 #include "streaminterface.h"
 
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 class MediaObjectPrivate;
 
 namespace Phonon
 {
-class PHONON_EXPORT AbstractMediaStreamPrivate : private MediaNodeDestructionHandler
+class PHONON_EXPORT AbstractMediaStreamPrivate
 {
     friend class Player;
     P_DECLARE_PUBLIC(AbstractMediaStream)
     public:
         void setStreamInterface(StreamInterface *);
-        void setMediaObjectPrivate(PlayerPrivate *);
         ~AbstractMediaStreamPrivate();
 
     protected:
@@ -70,7 +67,5 @@ class PHONON_EXPORT AbstractMediaStreamPrivate : private \
MediaNodeDestructionHan  };
 } // namespace Phonon
 
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 #endif // ABSTRACTMEDIASTREAM_P_H
 // vim: sw=4 sts=4 et tw=100
diff --git a/phonon/iodevicestream.cpp b/phonon/iodevicestream.cpp
index 080272e..ab5cddf 100644
--- a/phonon/iodevicestream.cpp
+++ b/phonon/iodevicestream.cpp
@@ -23,7 +23,7 @@
 #include "iodevicestream_p.h"
 #include "abstractmediastream_p.h"
 
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
+#include <QtCore/QIODevice>
 
 namespace Phonon
 {
@@ -84,8 +84,6 @@ void IODeviceStream::seekStream(qint64 offset)
 
 } // namespace Phonon
 
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 #include "moc_iodevicestream_p.cpp"
 
 // vim: sw=4 sts=4 et tw=100
diff --git a/phonon/iodevicestream_p.h b/phonon/iodevicestream_p.h
index 4b7274b..596b352 100644
--- a/phonon/iodevicestream_p.h
+++ b/phonon/iodevicestream_p.h
@@ -26,8 +26,6 @@
 #include "abstractmediastream.h"
 
 
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 class QIODevice;
 
 namespace Phonon
@@ -48,7 +46,5 @@ class IODeviceStream : public AbstractMediaStream
 };
 } // namespace Phonon
 
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 
 #endif // PHONON_IODEVICESTREAM_P_H
diff --git a/phonon/phononnamespace.cpp b/phonon/phononnamespace.cpp
index 70cb8b1..b60729e 100644
--- a/phonon/phononnamespace.cpp
+++ b/phonon/phononnamespace.cpp
@@ -70,28 +70,6 @@ QString categoryToString(CaptureCategory c)
     return QString();
 }
 
-QDebug operator <<(QDebug dbg, const Phonon::DiscType &type)
-{
-    switch (type) {
-    case Phonon::NoDisc:
-        dbg.space() << "Phonon::NoDisc";
-        break;
-    case Phonon::Cd:
-        dbg.space() << "Phonon::Cd";
-        break;
-    case Phonon::Dvd:
-        dbg.space() << "Phonon::Dvd";
-        break;
-    case Phonon::Vcd:
-        dbg.space() << "Phonon::Vcd";
-        break;
-    case Phonon::BluRay:
-        dbg.space() << "Phonon::BluRay";
-        break;
-    }
-    return dbg.maybeSpace();
-}
-
 QDebug operator <<(QDebug dbg, const Phonon::MetaData &metaData)
 {
     switch (metaData) {
diff --git a/phonon/phononnamespace.h b/phonon/phononnamespace.h
index 405e1d1..6b8d429 100644
--- a/phonon/phononnamespace.h
+++ b/phonon/phononnamespace.h
@@ -29,14 +29,6 @@ class QString;
 
 namespace Phonon
 {
-enum DiscType {
-    NoDisc = -1, /** < No disc was selected. Only used as default value in
-                          \class MediaSource */
-    Cd = 0,      /** < Audio CD */
-    Dvd = 1,     /** < Video DVD (no arbitrary data DVDs) */
-    Vcd = 2,     /** < Video CD */
-    BluRay = 3   /** < BluRay video disc \since 4.7.0 */
-};
 
 // http://xiph.org/vorbis/doc/v-comment.html
 enum MetaData {
@@ -104,7 +96,6 @@ enum ErrorType {
 PHONON_EXPORT QString categoryToString(Category c);
 PHONON_EXPORT QString categoryToString(CaptureCategory c);
 
-PHONON_EXPORT QDebug operator <<(QDebug dbg, const Phonon::DiscType &);
 PHONON_EXPORT QDebug operator <<(QDebug dbg, const Phonon::MetaData &);
 PHONON_EXPORT QDebug operator <<(QDebug dbg, const Phonon::State &);
 PHONON_EXPORT QDebug operator <<(QDebug dbg, const Phonon::Category &);
diff --git a/phonon/player.cpp b/phonon/player.cpp
index 7e8ef44..ecd998a 100644
--- a/phonon/player.cpp
+++ b/phonon/player.cpp
@@ -102,38 +102,29 @@ qint64 Player::currentTime() const
     return d->interface->currentTime();
 }
 
-static inline bool isPlayable(const Source::Type t)
-{
-    return t != Source::Invalid && t != Source::Empty;
-}
-
 void Player::play()
 {
     P_D(Player);
-    if (d->interface && isPlayable(d->mediaSource.type()))
-        d->interface->play();
+    d->interface->play();
 }
 
 void Player::pause()
 {
     P_D(Player);
-    if (d->interface && isPlayable(d->mediaSource.type()))
-        d->interface->pause();
+    d->interface->pause();
 }
 
 void Player::stop()
 {
 #warning stop needs to force a state reset including signals (i.e. stop should not \
only stop but cause the gui to reflect that...)  P_D(Player);
-    if (d->interface && isPlayable(d->mediaSource.type()))
-        d->interface->stop();
+    d->interface->stop();
 }
 
 void Player::seek(qint64 time)
 {
     P_D(Player);
-    if (d->interface && isPlayable(d->mediaSource.type()))
-        d->interface->seek(time);
+    d->interface->seek(time);
 }
 
 QStringList Player::metaData(MetaData f) const
@@ -195,22 +186,16 @@ void Player::setSource(const Source &newSource)
         return;
     }
 
-    pDebug() << Q_FUNC_INFO << newSource.type() << newSource.url() << \
newSource.deviceName(); +    pDebug() << Q_FUNC_INFO << newSource.url() << \
newSource.deviceName();  
     // first call stop as that often is the expected state for setting a new URL
     stop();
 
     d->mediaSource = newSource;
 
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
     d->abstractStream = 0; // abstractStream auto-deletes
-    if (d->mediaSource.type() == Source::Stream) {
-        Q_ASSERT(d->mediaSource.stream());
-        d->mediaSource.stream()->d_func()->setMediaObjectPrivate(d);
-    }
 
     d->playingQueuedSource = false;
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
 
     d->interface->setSource(d->mediaSource);
 }
@@ -227,18 +212,15 @@ void PlayerPrivate::createBackendObject()
         setupBackendObject();
 }
 
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
 void PlayerPrivate::streamError(Phonon::ErrorType type, const QString &text)
 {
     P_Q(Player);
     State lastState = q->state();
     errorType = type;
-    errorString = text;
-    state = ErrorState;
-    QMetaObject::invokeMethod(q, "stateChanged", Qt::QueuedConnection, \
Q_ARG(Phonon::State, Phonon::ErrorState), Q_ARG(Phonon::State, lastState)); +    \
state = StoppedState; +    QMetaObject::invokeMethod(q, "stateChanged", \
Qt::QueuedConnection, Q_ARG(Phonon::State, Phonon::StoppedState), \
Q_ARG(Phonon::State, lastState));  //emit q->stateChanged(ErrorState, lastState);
 }
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
 
 void PlayerPrivate::setupBackendObject()
 {
@@ -280,16 +262,7 @@ void PlayerPrivate::setupBackendObject()
         state = backendState;
     }
 
-    // set up attributes
-    if (isPlayable(mediaSource.type())) {
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
-        if (mediaSource.type() == Source::Stream) {
-            Q_ASSERT(mediaSource.stream());
-            mediaSource.stream()->d_func()->setMediaObjectPrivate(this);
-        }
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-        interface->setSource(mediaSource);
-    }
+    interface->setSource(mediaSource);
 }
 
 #warning why are metadata cached instead of passing it through? also why is there no \
                interface getter for it...
diff --git a/phonon/player.h b/phonon/player.h
index c805a4e..6aabf58 100644
--- a/phonon/player.h
+++ b/phonon/player.h
@@ -26,6 +26,8 @@
 #include "frontend.h"
 #include "source.h"
 
+#include <QtCore/QObject>
+
 namespace Phonon {
 
 class AbstractOutput;
diff --git a/phonon/player_p.h b/phonon/player_p.h
index 6a52a6f..5fe9e60 100644
--- a/phonon/player_p.h
+++ b/phonon/player_p.h
@@ -28,6 +28,9 @@
 #include "player.h"
 #include "playerinterface.h"
 
+#include <QtCore/QMultiMap>
+#include <QtCore/QString>
+
 namespace Phonon {
 
 class FrontendInterfacePrivate;
@@ -50,20 +53,16 @@ protected:
     void _k_aboutToFinish();
     void _k_currentSourceChanged(const Source &);
     PHONON_EXPORT void _k_stateChanged(Phonon::State, Phonon::State);
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
     void streamError(Phonon::ErrorType, const QString &);
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
 
     PlayerPrivate()
         : currentTime(0)
         , tickInterval(0)
         , metaData()
         , state(Phonon::StoppedState)
-    #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
         , abstractStream(0)
         , playingQueuedSource(false)
         , errorType(Phonon::NormalError)
-    #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
         , interface(0)
     {}
 
@@ -74,11 +73,9 @@ protected:
     qint32 tickInterval;
     QMultiMap<MetaData, QString> metaData;
     State state;
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
     AbstractMediaStream *abstractStream;
     bool playingQueuedSource;
     ErrorType errorType;
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
     Source mediaSource;
 
     QList<AbstractOutput *> outputs;
diff --git a/phonon/source.cpp b/phonon/source.cpp
index 27a8855..607e1bb 100644
--- a/phonon/source.cpp
+++ b/phonon/source.cpp
@@ -23,10 +23,7 @@
 #include "source.h"
 #include "source_p.h"
 #include "iodevicestream_p.h"
-#include "abstractmediastream_p.h"
-#include "globalconfig.h"
 
-#include <QtCore/QFileInfo>
 #include <QtCore/QFile>
 
 namespace Phonon
@@ -38,99 +35,58 @@ Source::Source(SourcePrivate &dd)
 }
 
 Source::Source()
-    : d(new SourcePrivate(Empty))
+    : d(new SourcePrivate())
+{
+}
+
+Source::Source(const Source &other)
+    : d(other.d)
 {
 }
 
 Source::Source(const QUrl &url)
-    : d(new SourcePrivate(Url))
+    : d(new SourcePrivate())
 {
     if (url.isValid()) {
         if (url.scheme() == QLatin1String("qrc")) {
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
             // QFile needs :/ syntax
             QString path(QLatin1Char(':') + url.path());
 
             if (QFile::exists(path)) {
-                d->type = Stream;
-                d->ioDevice = new QFile(path);
-                d->setStream(new IODeviceStream(d->ioDevice, d->ioDevice));
-            } else {
-                d->type = Invalid;
+                d->m_ioDevice = new QFile(path);
+                d->setStream(new IODeviceStream(d->m_ioDevice, d->m_ioDevice));
             }
-#else
-            d->type = Invalid;
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
         }
-        d->url = url;
-    } else {
-        d->type = Invalid;
+        d->m_url = url;
     }
 }
 
-Source::Source(DiscType dt, const QString &deviceName)
-    : d(new SourcePrivate(Disc))
+Source::Source(DeviceType deviceType, const QByteArray &deviceName)
+    : d(new SourcePrivate())
 {
-    if (dt == NoDisc) {
-        d->type = Invalid;
+    if (deviceType == NoDevice) {
         return;
     }
-    d->discType = dt;
-    d->deviceName = deviceName;
-}
-
-#ifndef PHONON_NO_AUDIOCAPTURE
-Source::Source(const AudioCaptureDevice& device)
-    : d(new SourcePrivate(CaptureDevice))
-{
-    d->setCaptureDevices(device, VideoCaptureDevice());
+    d->m_deviceType = deviceType;
+    d->m_deviceName = deviceName;
 }
-#endif //PHONON_NO_AUDIOCAPTURE
 
-#ifndef PHONON_NO_VIDEOCAPTURE
-Source::Source(const VideoCaptureDevice& device)
-    : d(new SourcePrivate(CaptureDevice))
-{
-    d->setCaptureDevices(AudioCaptureDevice(), device);
-}
-#endif //PHONON_NO_VIDEOCAPTURE
-
-#if !defined(PHONON_NO_VIDEOCAPTURE) && !defined(PHONON_NO_AUDIOCAPTURE)
-Source::Source(CaptureCategory category)
-    : d(new SourcePrivate(AudioVideoCapture))
-{
-    d->setCaptureDevices(category);
-}
-
-Source::Source(Capture::DeviceType deviceType, CaptureCategory category)
-    : d(new SourcePrivate(CaptureDevice))
-{
-    d->setCaptureDevice(deviceType, category);
-}
-#endif // !PHONON_NO_VIDEOCAPTURE && !PHONON_NO_AUDIOCAPTURE
-
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
 Source::Source(AbstractMediaStream *stream)
-    : d(new SourcePrivate(Stream))
+    : d(new SourcePrivate())
 {
     if (stream) {
         d->setStream(stream);
-    } else {
-        d->type = Invalid;
     }
 }
 
 Source::Source(QIODevice *ioDevice)
-    : d(new SourcePrivate(Stream))
+    : d(new SourcePrivate())
 {
     if (ioDevice) {
         d->setStream(new IODeviceStream(ioDevice, ioDevice));
-        d->ioDevice = ioDevice;
-    } else {
-        d->type = Invalid;
+        d->m_ioDevice = ioDevice;
     }
 }
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
 
 Source::~Source()
 {
@@ -138,234 +94,48 @@ Source::~Source()
 
 SourcePrivate::~SourcePrivate()
 {
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
-    if (autoDelete) {
-        //here we use deleteLater because this object
-        //might be destroyed from another thread
-        if (stream)
-            stream->deleteLater();
-        if (ioDevice)
-            ioDevice->deleteLater();
-    }
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-}
-
-Source::Source(const Source &rhs)
-    : d(rhs.d)
-{
+    //here we use deleteLater because this object
+    //might be destroyed from another thread
+    if (m_stream)
+        m_stream->deleteLater();
+    if (m_ioDevice)
+        m_ioDevice->deleteLater();
 }
 
-Source &Source::operator=(const Source &rhs)
+Source &Source::operator=(const Source &other)
 {
-    d = rhs.d;
+    d = other.d;
     return *this;
 }
 
-bool Source::operator==(const Source &rhs) const
+bool Source::operator==(const Source &other) const
 {
-    return d == rhs.d;
-}
-
-void Source::setAutoDelete(bool autoDelete)
-{
-    d->autoDelete = autoDelete;
-}
-
-bool Source::autoDelete() const
-{
-    return d->autoDelete;
-}
-
-Source::Type Source::type() const
-{
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
-    if (d->type == Stream && d->stream == 0) {
-        return Invalid;
-    }
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-    return d->type;
-}
-
-QString Source::fileName() const
-{
-    return d->url.toLocalFile();
+    return d == other.d;
 }
 
 QUrl Source::url() const
 {
-    return d->url;
+    return d->m_url;
 }
 
-DiscType Source::discType() const
+Source::DeviceType Source::deviceType() const
 {
-    return d->discType;
+    return d->m_deviceType;
 }
 
-const DeviceAccessList& Source::deviceAccessList() const
+QByteArray Source::deviceName() const
 {
-#ifndef PHONON_NO_AUDIOCAPTURE
-    if (d->audioCaptureDevice.isValid())
-        return d->audioDeviceAccessList;
-#endif
-
-#ifndef PHONON_NO_VIDEOCAPTURE
-    if (d->videoCaptureDevice.isValid())
-        return d->videoDeviceAccessList;
-#endif
-
-    return d->audioDeviceAccessList;    // It should be invalid
+    return d->m_deviceName;
 }
 
-const DeviceAccessList& Source::audioDeviceAccessList() const
-{
-    return d->audioDeviceAccessList;
-}
-
-const DeviceAccessList& Source::videoDeviceAccessList() const
-{
-    return d->videoDeviceAccessList;
-}
-
-QString Source::deviceName() const
-{
-    return d->deviceName;
-}
-
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
 AbstractMediaStream *Source::stream() const
 {
-    return d->stream;
+    return d->m_stream;
 }
 
 void SourcePrivate::setStream(AbstractMediaStream *s)
 {
-    stream = s;
-}
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
-#ifndef PHONON_NO_AUDIOCAPTURE
-AudioCaptureDevice Source::audioCaptureDevice() const
-{
-    return d->audioCaptureDevice;
-}
-#endif //PHONON_NO_AUDIOCAPTURE
-
-#ifndef PHONON_NO_VIDEOCAPTURE
-VideoCaptureDevice Source::videoCaptureDevice() const
-{
-    return d->videoCaptureDevice;
-}
-#endif //PHONON_NO_VIDEOCAPTURE
-
-#if !defined(PHONON_NO_VIDEOCAPTURE) && !defined(PHONON_NO_AUDIOCAPTURE)
-void SourcePrivate::setCaptureDevice(Capture::DeviceType deviceType, CaptureCategory \
                category)
-{
-    switch (deviceType) {
-        case Capture::VideoType: {
-            setCaptureDevices(AudioCaptureDevice(),
-                VideoCaptureDevice::fromIndex(GlobalConfig().videoCaptureDeviceFor(category)));
                
-            break;
-        }
-        case Capture::AudioType: {
-            setCaptureDevices(
-                AudioCaptureDevice::fromIndex(GlobalConfig().audioCaptureDeviceFor(category)), \
                VideoCaptureDevice());
-            break;
-        }
-    }
-}
-
-void SourcePrivate::setCaptureDevices(CaptureCategory category)
-{
-    setCaptureDevices(
-        AudioCaptureDevice::fromIndex(GlobalConfig().audioCaptureDeviceFor(category)),
                
-        VideoCaptureDevice::fromIndex(GlobalConfig().videoCaptureDeviceFor(category)));
                
-}
-
-void SourcePrivate::setCaptureDevices(const AudioCaptureDevice &audioDevice, const \
                VideoCaptureDevice &videoDevice)
-{
-    audioCaptureDevice = audioDevice;
-    videoCaptureDevice = videoDevice;
-
-    if (audioDevice.propertyNames().contains("deviceAccessList") &&
-            !audioDevice.property("deviceAccessList").value<DeviceAccessList>().isEmpty()) \
                {
-        audioDeviceAccessList = \
                audioDevice.property("deviceAccessList").value<DeviceAccessList>();
-    }
-
-    if (videoDevice.propertyNames().contains("deviceAccessList") &&
-            !videoDevice.property("deviceAccessList").value<DeviceAccessList>().isEmpty()) \
                {
-        videoDeviceAccessList = \
                videoDevice.property("deviceAccessList").value<DeviceAccessList>();
-    }
-
-    bool validAudio = !audioDeviceAccessList.isEmpty();
-    bool validVideo = !videoDeviceAccessList.isEmpty();
-    type = Source::Invalid;
-    if (validAudio && validVideo)
-        type = Source::AudioVideoCapture;
-    else if (validAudio || validVideo)
-        type = Source::CaptureDevice;
-}
-#endif // !PHONON_NO_VIDEOCAPTURE && !PHONON_NO_AUDIOCAPTURE
-
-QDebug operator <<(QDebug dbg, const Phonon::Source &source)
-{
-    switch (source.type()) {
-    case Source::Invalid:
-        dbg.nospace() << "Invalid()";
-        break;
-    case Source::LocalFile:
-        dbg.nospace() << "LocalFile(" << source.url() << ")";
-        break;
-    case Source::Url:
-        dbg.nospace() << "Url(" << source.url() << ")";
-        break;
-    case Source::Disc:
-        dbg.nospace() << "Disc(";
-        switch (source.discType()) {
-        case NoDisc:
-            dbg.nospace() << "NoDisc";
-            break;
-        case Cd:
-            dbg.nospace() << "Cd: " << source.deviceName();
-            break;
-        case Dvd:
-            dbg.nospace() << "Dvd: " << source.deviceName();
-            break;
-        case Vcd:
-            dbg.nospace() << "Vcd: " << source.deviceName();
-            break;
-        case BluRay:
-            dbg.nospace() << "BluRay: " << source.deviceName();
-            break;
-        }
-        dbg.nospace() << ")";
-        break;
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
-    case Source::Stream: {
-        dbg.nospace() << "Stream(IOAddr: " << source.d->ioDevice;
-        QObject *qiodevice = qobject_cast<QObject *>(source.d->ioDevice);
-        if (qiodevice)
-            dbg.nospace() << " IOClass: " << qiodevice->metaObject()->className();
-
-        dbg.nospace() << "; StreamAddr: " << source.stream();
-        QObject *qstream = qobject_cast<QObject *>(source.stream());
-        if (qstream)
-            dbg.nospace() << " StreamClass: " << qstream->metaObject()->className();
-
-        dbg.nospace() << ")";
-        break;
-    }
-#endif // QT_NO_PHONON_ABSTRACTMEDIASTREAM
-    case Source::CaptureDevice:
-    case Source::AudioVideoCapture:
-        dbg.nospace() << "AudioVideoCapture(A:" << \
                source.audioCaptureDevice().name()
-                      << "/V: " << source.videoCaptureDevice().name() << ")";
-        break;
-    case Source::Empty:
-        dbg.nospace() << "Empty()";
-        break;
-    }
-
-    return dbg.maybeSpace();
+    m_stream = s;
 }
 
 } // namespace Phonon
diff --git a/phonon/source.h b/phonon/source.h
index ad56ec5..c1cf05f 100644
--- a/phonon/source.h
+++ b/phonon/source.h
@@ -20,16 +20,13 @@
 
 */
 
-#ifndef PHONON_MEDIASOURCE_H
-#define PHONON_MEDIASOURCE_H
+#ifndef PHONON_SOURCE_H_
+#define PHONON_SOURCE_H_
 
 #include "phonon_export.h"
 #include "phononnamespace.h"
 
-#include "objectdescription.h"
-
 #include <QtCore/QSharedData>
-#include <QtCore/QString>
 
 class QUrl;
 class QIODevice;
@@ -42,55 +39,39 @@ class AbstractMediaStream;
 
 class PHONON_EXPORT Source
 {
-    friend class StreamInterface;
-    friend QDebug operator <<(QDebug dbg, const Phonon::Source &);
 public:
-    enum Type {
-        Invalid = -1,
-        LocalFile,
-        Url,
-        Disc,
-        Stream,
-        CaptureDevice,
-        Empty,
-        AudioVideoCapture
+    enum DeviceType {
+        NoDevice = -1,
+        AudioCd,
+        VideoCd,
+        Dvd,
+        BluRay,
+        AudioCapture,
+        VideoCapture
     };
-
+public:
     Source();
+    Source(const Source &other);
     Source(const QUrl &url);
-    Source(DiscType discType, const QString &deviceName = QString());
-    Source(const AudioCaptureDevice& device);
-    Source(const VideoCaptureDevice& device);
-    Source(Capture::DeviceType deviceType, CaptureCategory category = \
                NoCaptureCategory);
-    Source(CaptureCategory category);
-
+    Source(DeviceType deviceType, const QByteArray &deviceName = QByteArray());
     Source(AbstractMediaStream *stream);
     Source(QIODevice *ioDevice);
-    ~Source();
-    Source(const Source &rhs);
-    Source &operator=(const Source &rhs);
-    bool operator==(const Source &rhs) const;
-    void setAutoDelete(bool enable);
-    bool autoDelete() const;
-    Type type() const;
-    QString fileName() const;
+
+    virtual ~Source();
+
+    Source &operator=(const Source &other);
+    bool operator==(const Source &other) const;
+
     QUrl url() const;
-    DiscType discType() const;
-    const DeviceAccessList& deviceAccessList() const;
-    const DeviceAccessList& videoDeviceAccessList() const;
-    const DeviceAccessList& audioDeviceAccessList() const;
-    QString deviceName() const;
+    DeviceType deviceType() const;
+    QByteArray deviceName() const;
     AbstractMediaStream *stream() const;
-    AudioCaptureDevice audioCaptureDevice() const;
-    VideoCaptureDevice videoCaptureDevice() const;
 
 protected:
     QExplicitlySharedDataPointer<SourcePrivate> d;
     Source(SourcePrivate &);
 };
 
-PHONON_EXPORT QDebug operator <<(QDebug dbg, const Phonon::Source &);
-
 } // namespace Phonon
 
-#endif // PHONON_MEDIASOURCE_H
+#endif // PHONON_SOURCE_H_
diff --git a/phonon/source_p.h b/phonon/source_p.h
index cf44885..9deb354 100644
--- a/phonon/source_p.h
+++ b/phonon/source_p.h
@@ -20,76 +20,43 @@
     License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#ifndef SOURCE_P_H
-#define SOURCE_P_H
+#ifndef PHONON_SOURCE_P_H_
+#define PHONON_SOURCE_P_H_
 
-#include "abstractmediastream.h"
 #include "source.h"
-#include "objectdescription.h"
 
 #include <QtCore/QUrl>
-#include <QtCore/QString>
-#include <QtCore/QSharedData>
 #include <QtCore/QPointer>
 
-class QFile;
-
 namespace Phonon {
 
 class PHONON_EXPORT SourcePrivate : public QSharedData
 {
 public:
-    SourcePrivate(Source::Type t)
-        : type(t)
-        , discType(NoDisc)
-        , autoDelete(false)
-    #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
-        , stream(0)
-        , ioDevice(0)
-    #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
+    SourcePrivate()
+        : m_deviceType(Source::NoDevice)
+        , m_stream(0)
+        , m_ioDevice(0)
     {
     }
 
     virtual ~SourcePrivate();
 
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
     void setStream(AbstractMediaStream *s);
-#endif
-
-    Source::Type type;
-    QUrl url;
-    Phonon::DiscType discType;
-    QString deviceName;                         // Used for discs
-    Phonon::DeviceAccessList audioDeviceAccessList;
-    Phonon::DeviceAccessList videoDeviceAccessList;
 
-    bool autoDelete;
+    QUrl m_url;
+    Source::DeviceType m_deviceType;
+    QByteArray m_deviceName;
 
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
     // The AbstractMediaStream(2) may be deleted at any time by the application. If \
                that happens
     // stream will be 0 automatically, but streamEventQueue will stay valid as we \
                hold a
     // reference to it. This is necessary to avoid a races when setting the \
                MediaSource while
     // another thread deletes the AbstractMediaStream2. StreamInterface(2) will then \
just get a  // StreamEventQueue where nobody answers.
-    QPointer<AbstractMediaStream> stream;
-    QIODevice *ioDevice;
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
-#if !defined(PHONON_NO_VIDEOCAPTURE) && !defined(PHONON_NO_AUDIOCAPTURE)
-    void setCaptureDevice(Capture::DeviceType deviceType, CaptureCategory category);
-    void setCaptureDevices(CaptureCategory category);
-    void setCaptureDevices(const AudioCaptureDevice &audioDevice, const \
                VideoCaptureDevice &videoDevice);
-#endif // !PHONON_NO_VIDEOCAPTURE && !PHONON_NO_AUDIOCAPTURE
-
-#ifndef PHONON_NO_AUDIOCAPTURE
-    AudioCaptureDevice audioCaptureDevice;
-#endif
-
-#ifndef PHONON_NO_VIDEOCAPTURE
-    VideoCaptureDevice videoCaptureDevice;
-#endif
+    QPointer<AbstractMediaStream> m_stream;
+    QIODevice *m_ioDevice;
 };
 
 } // namespace Phonon
 
-#endif // SOURCE_P_H
+#endif // PHONON_SOURCE_P_H_
diff --git a/phonon/sourcecontrol.cpp b/phonon/sourcecontrol.cpp
new file mode 100644
index 0000000..ec4c459
--- /dev/null
+++ b/phonon/sourcecontrol.cpp
@@ -0,0 +1,62 @@
+/*
+ * This file is part of the KDE project
+ * Copyright (C) 2013 Casian Andrei <skeletk13@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), Nokia Corporation
+ * (or its successors, if any) and the KDE Free Qt Foundation, which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "sourcecontrol.h"
+#include "sourcecontrol_p.h"
+
+namespace Phonon
+{
+
+SourceControl::SourceControl(Source &source)
+    : d(new SourceControlPrivate(source))
+{
+
+}
+
+SourceControl::SourceControl(SourceControlPrivate &dd)
+    : d(&dd)
+{
+
+}
+
+SourceControl::~SourceControl()
+{
+
+}
+
+Source SourceControl::source() const
+{
+    return d->m_source;
+}
+
+SourceControlPrivate::SourceControlPrivate(Source &source)
+    : m_source(source)
+{
+
+}
+
+SourceControlPrivate::~SourceControlPrivate()
+{
+
+}
+
+} // Phonon namespace
diff --git a/phonon/sourcecontrol.h b/phonon/sourcecontrol.h
new file mode 100644
index 0000000..e7450d1
--- /dev/null
+++ b/phonon/sourcecontrol.h
@@ -0,0 +1,48 @@
+/*
+ * This file is part of the KDE project
+ * Copyright (C) 2013 Casian Andrei <skeletk13@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), Nokia Corporation
+ * (or its successors, if any) and the KDE Free Qt Foundation, which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PHONON_SOURCE_CONTROL_H_
+#define PHONON_SOURCE_CONTROL_H_
+
+#include "source.h"
+
+namespace Phonon
+{
+
+class SourceControlPrivate;
+
+class PHONON_EXPORT SourceControl
+{
+public:
+    explicit SourceControl(Source &source);
+    virtual ~SourceControl();
+
+    Source source() const;
+
+protected:
+    QExplicitlySharedDataPointer<SourceControlPrivate> d;
+    SourceControl(SourceControlPrivate &);
+};
+
+} // Phonon namespace
+
+#endif // PHONON_SOURCE_CONTROL_H_
diff --git a/phonon/sourcecontrol_p.h b/phonon/sourcecontrol_p.h
new file mode 100644
index 0000000..0ef4c1d
--- /dev/null
+++ b/phonon/sourcecontrol_p.h
@@ -0,0 +1,42 @@
+/*
+ * This file is part of the KDE project
+ * Copyright (C) 2013 Casian Andrei <skeletk13@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), Nokia Corporation
+ * (or its successors, if any) and the KDE Free Qt Foundation, which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PHONON_SOURCE_CONTROL_P_H_
+#define PHONON_SOURCE_CONTROL_P_H_
+
+#include "sourcecontrol.h"
+
+namespace Phonon
+{
+
+class PHONON_EXPORT SourceControlPrivate : public QSharedData
+{
+public:
+    explicit SourceControlPrivate(Source &source);
+    virtual ~SourceControlPrivate();
+
+    Source m_source;
+};
+
+} // Phonon namespace
+
+#endif // PHONON_SOURCE_CONTROL_P_H_
diff --git a/phonon/sourcecontrolinterface.h b/phonon/sourcecontrolinterface.h
new file mode 100644
index 0000000..8f7313c
--- /dev/null
+++ b/phonon/sourcecontrolinterface.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of the KDE project
+ * Copyright (C) 2013 Casian Andrei <skeletk13@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), Nokia Corporation
+ * (or its successors, if any) and the KDE Free Qt Foundation, which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PHONON_SOURCE_CONTROL_INTERFACE_H_
+#define PHONON_SOURCE_CONTROL_INTERFACE_H_
+
+namespace Phonon
+{
+
+class SourceControl;
+
+class SourceControlInterface
+{
+public:
+    virtual ~SourceControlInterface() {}
+
+    virtual SourceControl *frontendObject() const = 0;
+    virtual void setFrontendObject(SourceControl *) = 0;
+};
+
+} // namespace Phonon
+
+Q_DECLARE_INTERFACE(Phonon::SourceControlInterface, \
"0SourceControlInterface.phonon.kde.org") +
+#endif // PHONON_SOURCE_CONTROL_INTERFACE_H_
diff --git a/phonon/streaminterface.cpp b/phonon/streaminterface.cpp
index 2e9311b..bd0b1da 100644
--- a/phonon/streaminterface.cpp
+++ b/phonon/streaminterface.cpp
@@ -24,9 +24,6 @@
 #include "streaminterface_p.h"
 #include "abstractmediastream.h"
 #include "abstractmediastream_p.h"
-#include "mediasource_p.h"
-
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
 
 namespace Phonon
 {
@@ -46,7 +43,7 @@ StreamInterface::~StreamInterface()
     delete d;
 }
 
-void StreamInterface::connectToSource(const MediaSource &mediaSource)
+void StreamInterface::connectToSource(const Source &mediaSource)
 {
     Q_ASSERT(!d->connected);
     d->connected = true;
@@ -66,18 +63,14 @@ void StreamInterfacePrivate::disconnectMediaStream()
     Q_ASSERT(connected);
     connected = false;
 
-    // if mediaSource has autoDelete set then it will delete the AbstractMediaStream \
                again who's
-    // destructor is calling us right now
-    mediaSource.setAutoDelete(false);
-
-    mediaSource = MediaSource();
+    mediaSource = Source();
     q->endOfData();
     q->setStreamSeekable(false);
 }
 
 void StreamInterface::needData()
 {
-    if (d->mediaSource.type() == MediaSource::Stream) {
+    if (d->mediaSource.stream()) {
         QMetaObject::invokeMethod(d->mediaSource.stream(), "needData", \
Qt::QueuedConnection);  }
 }
@@ -85,7 +78,7 @@ void StreamInterface::needData()
 void StreamInterface::enoughData()
 {
     Q_ASSERT(d->connected);
-    if (d->mediaSource.type() == MediaSource::Stream) {
+    if (d->mediaSource.stream()) {
          QMetaObject::invokeMethod(d->mediaSource.stream(), "enoughData", \
Qt::QueuedConnection);  }
 }
@@ -93,7 +86,7 @@ void StreamInterface::enoughData()
 void StreamInterface::seekStream(qint64 offset)
 {
     Q_ASSERT(d->connected);
-    if (d->mediaSource.type() == MediaSource::Stream) {
+    if (d->mediaSource.stream()) {
          QMetaObject::invokeMethod(d->mediaSource.stream(), "seekStream", \
Qt::QueuedConnection, Q_ARG(qint64, offset));  }
 }
@@ -101,13 +94,10 @@ void StreamInterface::seekStream(qint64 offset)
 void StreamInterface::reset()
 {
     Q_ASSERT(d->connected);
-    if (d->mediaSource.type() == MediaSource::Stream) {
+    if (d->mediaSource.stream()) {
          QMetaObject::invokeMethod(d->mediaSource.stream(), "reset", \
Qt::QueuedConnection);  }
 }
 
 } // namespace Phonon
 
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
-
diff --git a/phonon/streaminterface.h b/phonon/streaminterface.h
index ac5d7c7..7e9c0b8 100644
--- a/phonon/streaminterface.h
+++ b/phonon/streaminterface.h
@@ -27,8 +27,6 @@
 #include <QtCore/QObject>
 
 
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 namespace Phonon
 {
 class StreamInterfacePrivate;
@@ -131,7 +129,5 @@ class PHONON_EXPORT StreamInterface
 
 Q_DECLARE_INTERFACE(Phonon::StreamInterface, "StreamInterface1.phonon.kde.org")
 
-#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 
 #endif // PHONON_STREAMINTERFACE_H
diff --git a/phonon/streaminterface_p.h b/phonon/streaminterface_p.h
index 6cf0901..b12cad2 100644
--- a/phonon/streaminterface_p.h
+++ b/phonon/streaminterface_p.h
@@ -24,9 +24,8 @@
 #define STREAMINTERFACE_P_H
 
 #include "streaminterface.h"
-#include "mediasource.h"
 
-#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
+#include "source.h"
 
 namespace Phonon
 {
@@ -43,13 +42,11 @@ class StreamInterfacePrivate
         }
 
         StreamInterface *q;
-        MediaSource mediaSource;
+        Source mediaSource;
         bool connected;
 };
 
 } // namespace Phonon
 
-#endif // QT_NO_PHONON_ABSTRACTMEDIASTREAM
-
 #endif // STREAMINTERFACE_P_H
 // vim: sw=4 sts=4 et tw=100


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic