src/3rdparty/phonon/mmf/mediaobject.h
changeset 7 f7bc934e204c
parent 3 41300fa6a67c
--- a/src/3rdparty/phonon/mmf/mediaobject.h	Tue Feb 02 00:43:10 2010 +0200
+++ b/src/3rdparty/phonon/mmf/mediaobject.h	Wed Mar 31 11:06:36 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>
 
@@ -38,7 +38,7 @@
 namespace MMF
 {
 class AbstractPlayer;
-class VideoOutput;
+class AbstractVideoOutput;
 
 /**
  * @short Facade class which wraps MMF client utility instance
@@ -75,38 +75,40 @@
     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.
      */
     AbstractPlayer *abstractPlayer() const;
 
-    void setVideoOutput(VideoOutput* videoOutput);
-
-    virtual bool activateOnMediaObject(MediaObject *);
+    void setVideoOutput(AbstractVideoOutput* videoOutput);
 
 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;