--- a/src/3rdparty/phonon/mmf/abstractplayer.h Tue Feb 02 00:43:10 2010 +0200
+++ b/src/3rdparty/phonon/mmf/abstractplayer.h Wed Mar 31 11:06:36 2010 +0300
@@ -19,12 +19,12 @@
#ifndef PHONON_MMF_ABSTRACTPLAYER_H
#define PHONON_MMF_ABSTRACTPLAYER_H
-#include <Phonon/phononnamespace.h>
-#include <Phonon/MediaSource.h>
+#include <phonon/phononnamespace.h>
+#include <phonon/mediasource.h>
#include <QObject>
-#include "videooutput.h"
+#include "abstractvideooutput.h"
class RFile;
@@ -34,7 +34,6 @@
{
namespace MMF
{
-class VideoOutput;
/**
* @short Interface which abstracts from MediaObject the current
@@ -53,8 +52,9 @@
Q_OBJECT
public:
- AbstractPlayer();
- explicit AbstractPlayer(const AbstractPlayer& player);
+ AbstractPlayer(const AbstractPlayer *player);
+
+ virtual void open(const Phonon::MediaSource&, RFile&) = 0;
// MediaObjectInterface (implemented)
qint32 tickInterval() const;
@@ -75,22 +75,28 @@
virtual Phonon::ErrorType errorType() const;
virtual QString errorString() const;
virtual qint64 totalTime() const = 0;
- virtual Phonon::MediaSource source() const = 0;
- // This is a temporary hack to work around KErrInUse from MMF
- // client utility OpenFileL calls
- //virtual void setSource(const Phonon::MediaSource &) = 0;
- virtual void setFileSource(const Phonon::MediaSource&, RFile&) = 0;
- virtual void setNextSource(const Phonon::MediaSource &) = 0;
virtual void volumeChanged(qreal volume);
- void setVideoOutput(VideoOutput* videoOutput);
+ void setVideoOutput(AbstractVideoOutput *videoOutput);
+
+ /**
+ * Records error message and changes state to ErrorState
+ */
+ void setError(const QString &errorMessage);
/**
- * Records error and changes state to ErrorState
+ * Records error message and changes state to ErrorState
+ *
+ * Appends a human-readable version of symbianErrorCode to the error message,
+ * e.g.
+ * @code
+ * setError("Opening file failed", KErrPermissionDenied)
+ * @endcode
+ * results in the following error message:
+ * "Opening file failed: permission denied"
*/
- void setError(Phonon::ErrorType error,
- const QString &errorMessage = QString());
+ void setError(const QString &errorMessage, int symbianErrorCode);
Phonon::State state() const;
@@ -98,9 +104,12 @@
void totalTimeChanged(qint64 length);
void finished();
void tick(qint64 time);
- void stateChanged(Phonon::State oldState,
- Phonon::State newState);
+ void bufferStatus(int percentFilled);
+ void stateChanged(Phonon::State newState,
+ Phonon::State oldState);
void metaDataChanged(const QMultiMap<QString, QString>& metaData);
+ void aboutToFinish();
+ void prefinishMarkReached(qint32 remaining);
protected:
/**
@@ -146,7 +155,7 @@
protected:
// Not owned
- VideoOutput* m_videoOutput;
+ AbstractVideoOutput* m_videoOutput;
qreal m_volume;