summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/mediaobject.h
diff options
context:
space:
mode:
authorGareth Stockwell <gareth.stockwell@sosco.com>2009-08-27 12:51:35 (GMT)
committerGareth Stockwell <gareth.stockwell@sosco.com>2009-08-28 12:30:33 (GMT)
commit76a7f0744cdfeb3ec25c77d4f237e60c74b7b141 (patch)
tree02a65a9bce2ff05ba363647b0e555531737920f2 /src/3rdparty/phonon/mmf/mediaobject.h
parent1a551b57e5c9738ba81200dae6aa33ac8b6d2b96 (diff)
downloadQt-76a7f0744cdfeb3ec25c77d4f237e60c74b7b141.zip
Qt-76a7f0744cdfeb3ec25c77d4f237e60c74b7b141.tar.gz
Qt-76a7f0744cdfeb3ec25c77d4f237e60c74b7b141.tar.bz2
Reformatted code to comply with Qt style
Diffstat (limited to 'src/3rdparty/phonon/mmf/mediaobject.h')
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.h176
1 files changed, 88 insertions, 88 deletions
diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h
index d9c32ce..c53b908 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.h
+++ b/src/3rdparty/phonon/mmf/mediaobject.h
@@ -34,94 +34,94 @@ QT_BEGIN_NAMESPACE
namespace Phonon
{
- namespace MMF
- {
- class AbstractPlayer;
- class VideoOutput;
-
- /**
- * @short Facade class which wraps MMF client utility instance
- */
- class MediaObject : public QObject
- , public MediaObjectInterface
- , public VolumeObserver
- {
- Q_OBJECT
- Q_INTERFACES(Phonon::MediaObjectInterface)
-
- public:
- MediaObject(QObject *parent);
- virtual ~MediaObject();
-
- // MediaObjectInterface
- virtual void play();
- virtual void pause();
- virtual void stop();
- virtual void seek(qint64 milliseconds);
- virtual qint32 tickInterval() const;
- virtual void setTickInterval(qint32 interval);
- virtual bool hasVideo() const;
- virtual bool isSeekable() const;
- virtual qint64 currentTime() const;
- virtual Phonon::State state() const;
- virtual QString errorString() const;
- virtual Phonon::ErrorType errorType() const;
- virtual qint64 totalTime() const;
- virtual MediaSource source() const;
- virtual void setSource(const MediaSource &);
- virtual void setNextSource(const MediaSource &source);
- virtual qint32 prefinishMark() const;
- virtual void setPrefinishMark(qint32);
- virtual qint32 transitionTime() const;
- virtual void setTransitionTime(qint32);
-
- // VolumeObserver
- void volumeChanged(qreal volume);
-
- void setVideoOutput(VideoOutput* videoOutput);
-
- Q_SIGNALS:
- 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);
- // 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 finished();
- void tick(qint64 time);
-
- private:
- void createPlayer(const MediaSource &source);
- bool openRecognizer();
-
- // Audio / video media type recognition
- MediaType fileMediaType(const QString& fileName);
- // TODO: urlMediaType function
-
- static qint64 toMilliSeconds(const TTimeIntervalMicroSeconds &);
-
- private:
- // Audio / video media type recognition
- bool m_recognizerOpened;
- RApaLsSession m_recognizer;
- RFs m_fileServer;
-
- // Storing the file handle here to work around KErrInUse error
- // from MMF player utility OpenFileL functions
- RFile m_file;
-
- QScopedPointer<AbstractPlayer> m_player;
-
- };
- }
+namespace MMF
+{
+class AbstractPlayer;
+class VideoOutput;
+
+/**
+ * @short Facade class which wraps MMF client utility instance
+ */
+class MediaObject : public QObject
+ , public MediaObjectInterface
+ , public VolumeObserver
+{
+ Q_OBJECT
+ Q_INTERFACES(Phonon::MediaObjectInterface)
+
+public:
+ MediaObject(QObject *parent);
+ virtual ~MediaObject();
+
+ // MediaObjectInterface
+ virtual void play();
+ virtual void pause();
+ virtual void stop();
+ virtual void seek(qint64 milliseconds);
+ virtual qint32 tickInterval() const;
+ virtual void setTickInterval(qint32 interval);
+ virtual bool hasVideo() const;
+ virtual bool isSeekable() const;
+ virtual qint64 currentTime() const;
+ virtual Phonon::State state() const;
+ virtual QString errorString() const;
+ virtual Phonon::ErrorType errorType() const;
+ virtual qint64 totalTime() const;
+ virtual MediaSource source() const;
+ virtual void setSource(const MediaSource &);
+ virtual void setNextSource(const MediaSource &source);
+ virtual qint32 prefinishMark() const;
+ virtual void setPrefinishMark(qint32);
+ virtual qint32 transitionTime() const;
+ virtual void setTransitionTime(qint32);
+
+ // VolumeObserver
+ void volumeChanged(qreal volume);
+
+ void setVideoOutput(VideoOutput* videoOutput);
+
+Q_SIGNALS:
+ 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);
+ // 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 finished();
+ void tick(qint64 time);
+
+private:
+ void createPlayer(const MediaSource &source);
+ bool openRecognizer();
+
+ // Audio / video media type recognition
+ MediaType fileMediaType(const QString& fileName);
+ // TODO: urlMediaType function
+
+ static qint64 toMilliSeconds(const TTimeIntervalMicroSeconds &);
+
+private:
+ // Audio / video media type recognition
+ bool m_recognizerOpened;
+ RApaLsSession m_recognizer;
+ RFs m_fileServer;
+
+ // Storing the file handle here to work around KErrInUse error
+ // from MMF player utility OpenFileL functions
+ RFile m_file;
+
+ QScopedPointer<AbstractPlayer> m_player;
+
+};
+}
}
QT_END_NAMESPACE