src/3rdparty/phonon/mmf/mediaobject.h
changeset 18 2f34d5167611
parent 3 41300fa6a67c
child 8 3f74d0d4af4c
--- a/src/3rdparty/phonon/mmf/mediaobject.h	Tue Feb 02 00:43:10 2010 +0200
+++ b/src/3rdparty/phonon/mmf/mediaobject.h	Fri Apr 16 15:50:13 2010 +0300
@@ -19,8 +19,8 @@
 #ifndef PHONON_MMF_MEDIAOBJECT_H
 #define PHONON_MMF_MEDIAOBJECT_H
 
-#include <Phonon/MediaSource>
-#include <Phonon/MediaObjectInterface>
+#include <phonon/mediasource.h>
+#include <phonon/mediaobjectinterface.h>
 #include <QScopedPointer>
 #include <QTimer>
 
@@ -75,6 +75,10 @@
     virtual qint32 transitionTime() const;
     virtual void setTransitionTime(qint32);
 
+    // MediaNode
+    void connectMediaObject(MediaObject *mediaObject);
+    void disconnectMediaObject(MediaObject *mediaObject);
+
     /**
      * This class owns the AbstractPlayer, and will delete it upon
      * destruction.
@@ -83,30 +87,28 @@
 
     void setVideoOutput(VideoOutput* videoOutput);
 
-    virtual bool activateOnMediaObject(MediaObject *);
-
 public Q_SLOTS:
     void volumeChanged(qreal volume);
+    void switchToNextSource();
 
 Q_SIGNALS:
+    void abstractPlayerChanged(AbstractPlayer *player);
     void totalTimeChanged(qint64 length);
     void hasVideoChanged(bool hasVideo);
     void seekableChanged(bool seekable);
-    // TODO: emit bufferStatus from MediaObject
     void bufferStatus(int);
-    // TODO: emit aboutToFinish from MediaObject
     void aboutToFinish();
-    // TODO: emit prefinishMarkReached from MediaObject
-    void prefinishMarkReached(qint32);
+    void prefinishMarkReached(qint32 remaining);
     // TODO: emit metaDataChanged from MediaObject
     void metaDataChanged(const QMultiMap<QString, QString>& metaData);
     void currentSourceChanged(const MediaSource& source);
-    void stateChanged(Phonon::State oldState,
-                      Phonon::State newState);
+    void stateChanged(Phonon::State newState,
+                      Phonon::State oldState);
     void finished();
     void tick(qint64 time);
 
 private:
+    void switchToSource(const MediaSource &source);
     void createPlayer(const MediaSource &source);
     bool openRecognizer();
 
@@ -123,6 +125,10 @@
     RApaLsSession                       m_recognizer;
     RFs                                 m_fileServer;
 
+    MediaSource                         m_source;
+    MediaSource                         m_nextSource;
+    bool                                m_nextSourceSet;
+
     // Storing the file handle here to work around KErrInUse error
     // from MMF player utility OpenFileL functions
     RFile                               m_file;