diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-09 04:02:18 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-01-09 04:02:18 (GMT) |
commit | ec82a2e2c596fd623c58a4a003dd2e7603931993 (patch) | |
tree | c2cabcd9f3c2c06269a59ab57d548ddc5c29a275 /src/3rdparty/phonon/mmf/audioplayer.h | |
parent | 4596db451cd2c53768e42b00a4234e7de2149f39 (diff) | |
parent | d3db719f8dce8abfa81c39f54d0fd58b4e75a1ca (diff) | |
download | Qt-ec82a2e2c596fd623c58a4a003dd2e7603931993.zip Qt-ec82a2e2c596fd623c58a4a003dd2e7603931993.tar.gz Qt-ec82a2e2c596fd623c58a4a003dd2e7603931993.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: (23 commits)
Fixed build breakage on S60 3.1 due to audio effects changes
Added a flag to avoid construction of application panes.
Fixed QDesktopWidget autotest.
Fixed a doc error.
Enable building with MSVC2008
Added mention of Symbian binary packages to INSTALL file
Fix for QTBUG-5870 QGraphicsProxyWidget does not show children on
Deploy sqlite3.sis instead of sqlite3.dll in Symbian
Separated "make run" and "make runonphone" targets
Added UIDs and icons to some webkit examples
Implemented node disconnection in Phonon MMF backend
Removed dead code from Phonon MMF backend
Re-emit prefinishMarkReached and aboutToFinish if rewound back past mark.
Implemented support for playlist handling in Phonon MMF backend
Mediaplayer: enqueue all entries from .ram file before starting playback
Changed call sequence of seeking in Phonon MMF backend, for streaming
Implemented buffer status notifications in Phonon MMF backend
Added support for streaming playback to Phonon MMF backend
Phonon MMF: leaves during object construction throw exceptions
Removed stale TODO comments from Phonon MMF backend
...
Diffstat (limited to 'src/3rdparty/phonon/mmf/audioplayer.h')
-rw-r--r-- | src/3rdparty/phonon/mmf/audioplayer.h | 59 |
1 files changed, 34 insertions, 25 deletions
diff --git a/src/3rdparty/phonon/mmf/audioplayer.h b/src/3rdparty/phonon/mmf/audioplayer.h index bc60076..0eb8bb7 100644 --- a/src/3rdparty/phonon/mmf/audioplayer.h +++ b/src/3rdparty/phonon/mmf/audioplayer.h @@ -26,12 +26,10 @@ class TTimeIntervalMicroSeconds; #ifdef QT_PHONON_MMF_AUDIO_DRM #include <drmaudiosampleplayer.h> -typedef CDrmPlayerUtility CPlayerType; -typedef MDrmAudioPlayerCallback MPlayerObserverType; +typedef MDrmAudioPlayerCallback NativePlayerObserver; #else #include <mdaaudiosampleplayer.h> -typedef CMdaAudioPlayerUtility CPlayerType; -typedef MMdaAudioPlayerCallback MPlayerObserverType; +typedef MMdaAudioPlayerCallback NativePlayerObserver; #endif QT_BEGIN_NAMESPACE @@ -44,18 +42,23 @@ namespace MMF * @short Wrapper over MMF audio client utility */ class AudioPlayer : public AbstractMediaPlayer - , public MPlayerObserverType // typedef -#ifdef QT_PHONON_MMF_AUDIO_DRM + , public NativePlayerObserver , public MAudioLoadingObserver -#endif { Q_OBJECT public: - AudioPlayer(); - explicit AudioPlayer(const AbstractPlayer& player); + AudioPlayer(MediaObject *parent = 0, const AbstractPlayer *player = 0); virtual ~AudioPlayer(); +#ifdef QT_PHONON_MMF_AUDIO_DRM +typedef CDrmPlayerUtility NativePlayer; +#else +typedef CMdaAudioPlayerUtility NativePlayer; +#endif + + NativePlayer *nativePlayer() const; + // AbstractMediaPlayer virtual void doPlay(); virtual void doPause(); @@ -63,6 +66,8 @@ public: virtual void doSeek(qint64 milliseconds); virtual int setDeviceVolume(int mmfVolume); virtual int openFile(RFile& file); + virtual int openUrl(const QString& url); + virtual int bufferStatus() const; virtual void close(); // MediaObjectInterface @@ -70,15 +75,24 @@ public: virtual qint64 currentTime() const; virtual qint64 totalTime() const; + // AbstractMediaPlayer + virtual int numberOfMetaDataEntries() const; + virtual QPair<QString, QString> metaDataEntry(int index) const; + + /** + * This class owns the pointer. + */ + NativePlayer *player() const; + +private: + void construct(); + +private: #ifdef QT_PHONON_MMF_AUDIO_DRM // MDrmAudioPlayerCallback virtual void MdapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds &aDuration); virtual void MdapcPlayComplete(TInt aError); - - // MAudioLoadingObserver - virtual void MaloLoadingStarted(); - virtual void MaloLoadingComplete(); #else // MMdaAudioPlayerCallback virtual void MapcInitComplete(TInt aError, @@ -86,24 +100,19 @@ public: virtual void MapcPlayComplete(TInt aError); #endif - /** - * This class owns the pointer. - */ - CPlayerType *player() const; - -private: - void construct(); - - // AbstractMediaPlayer - virtual int numberOfMetaDataEntries() const; - virtual QPair<QString, QString> metaDataEntry(int index) const; + // MAudioLoadingObserver + virtual void MaloLoadingStarted(); + virtual void MaloLoadingComplete(); private: /** * Using CPlayerType typedef in order to be able to easily switch between * CMdaAudioPlayerUtility and CDrmPlayerUtility */ - QScopedPointer<CPlayerType> m_player; + QScopedPointer<NativePlayer> m_player; + + qint64 m_totalTime; + }; } } |