diff options
author | Frans Englich <frans.englich@nokia.com> | 2009-08-17 14:58:44 (GMT) |
---|---|---|
committer | Frans Englich <frans.englich@nokia.com> | 2009-08-17 14:58:44 (GMT) |
commit | a7b1ad0b2ecdedd5f2a9d52fe09c4497078bc669 (patch) | |
tree | a9f0a85ff43d1a73b1016d5a649e062d7cbaa1a0 /src | |
parent | d10291404e189e3a57cda7fac6f69aa5f9629cae (diff) | |
download | Qt-a7b1ad0b2ecdedd5f2a9d52fe09c4497078bc669.zip Qt-a7b1ad0b2ecdedd5f2a9d52fe09c4497078bc669.tar.gz Qt-a7b1ad0b2ecdedd5f2a9d52fe09c4497078bc669.tar.bz2 |
Delegate from MediaObject.
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/phonon/mmf/abstractplayer.h | 13 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/mediaobject.cpp | 25 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/mediaobject.h | 4 |
3 files changed, 41 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h index 6452090..0188068 100644 --- a/src/3rdparty/phonon/mmf/abstractplayer.h +++ b/src/3rdparty/phonon/mmf/abstractplayer.h @@ -27,6 +27,8 @@ namespace Phonon { namespace MMF { + class AudioOutput; + class AbstractPlayer : public QObject { public: @@ -42,9 +44,20 @@ namespace Phonon virtual Phonon::State state() const = 0; virtual QString errorString() const = 0; virtual Phonon::ErrorType errorType() const = 0; + virtual qint64 totalTime() const = 0; virtual Phonon::MediaSource source() const = 0; virtual void setSource(const Phonon::MediaSource &) = 0; virtual void setNextSource(const Phonon::MediaSource &) = 0; + + virtual void setTransitionTime(qint32) = 0; + virtual qint32 transitionTime() const = 0; + virtual qint32 prefinishMark() const = 0; + virtual void setPrefinishMark(qint32) = 0; + + virtual bool setVolume(qreal) = 0; + virtual qreal volume() const = 0; + + virtual void setAudioOutput(AudioOutput *) = 0; }; } } diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp index fb079f0..4769249 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.cpp +++ b/src/3rdparty/phonon/mmf/mediaobject.cpp @@ -16,6 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. */ +#include "abstractplayer.h" #include "mediaobject.h" using namespace Phonon; @@ -39,83 +40,102 @@ MMF::MediaObject::~MediaObject() void MMF::MediaObject::play() { + m_player->play(); } void MMF::MediaObject::pause() { + m_player->pause(); } void MMF::MediaObject::stop() { + m_player->stop(); } void MMF::MediaObject::seek(qint64 ms) { - Q_UNUSED(ms); + m_player->seek(ms); } qint32 MMF::MediaObject::tickInterval() const { + return m_player->tickInterval(); } void MMF::MediaObject::setTickInterval(qint32 interval) { + m_player->setTransitionTime(interval); } bool MMF::MediaObject::hasVideo() const { + return m_player->hasVideo(); } bool MMF::MediaObject::isSeekable() const { + return m_player->isSeekable(); } Phonon::State MMF::MediaObject::state() const { + return m_player->state(); } qint64 MMF::MediaObject::currentTime() const { + return m_player->currentTime(); } QString MMF::MediaObject::errorString() const { + return m_player->errorString(); } Phonon::ErrorType MMF::MediaObject::errorType() const { + return m_player->errorType(); } qint64 MMF::MediaObject::totalTime() const { + return m_player->totalTime(); } MediaSource MMF::MediaObject::source() const { + return m_player->source(); } void MMF::MediaObject::setSource(const MediaSource &source) { + return m_player->setSource(source); } void MMF::MediaObject::setNextSource(const MediaSource &source) { + return m_player->setNextSource(source); } qint32 MMF::MediaObject::prefinishMark() const { + return m_player->prefinishMark(); } void MMF::MediaObject::setPrefinishMark(qint32 mark) { + m_player->setPrefinishMark(mark); } qint32 MMF::MediaObject::transitionTime() const { + return m_player->transitionTime(); } void MMF::MediaObject::setTransitionTime(qint32 time) { + m_player->setTransitionTime(time); } //----------------------------------------------------------------------------- @@ -124,13 +144,16 @@ void MMF::MediaObject::setTransitionTime(qint32 time) qreal MMF::MediaObject::volume() const { + return m_player->volume(); } bool MMF::MediaObject::setVolume(qreal volume) { + return m_player->setVolume(volume); } void MMF::MediaObject::setAudioOutput(AudioOutput* audioOutput) { + m_player->setAudioOutput(audioOutput); } diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h index d162455..9b1e914 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.h +++ b/src/3rdparty/phonon/mmf/mediaobject.h @@ -26,6 +26,7 @@ namespace Phonon { namespace MMF { + class AbstractPlayer; class AudioOutput; /** @@ -73,6 +74,9 @@ namespace Phonon Phonon::State newState); void finished(); void tick(qint64 time); + + private: + AbstractPlayer *m_player; }; } } |