diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-01-08 16:51:31 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-01-08 16:51:31 (GMT) |
commit | d3db719f8dce8abfa81c39f54d0fd58b4e75a1ca (patch) | |
tree | c2cabcd9f3c2c06269a59ab57d548ddc5c29a275 | |
parent | 4a84b272459160780529f654e6aee3abf8569b51 (diff) | |
parent | a3e6a04448979aaa6ada7aa434de3137f6cf0563 (diff) | |
download | Qt-d3db719f8dce8abfa81c39f54d0fd58b4e75a1ca.zip Qt-d3db719f8dce8abfa81c39f54d0fd58b4e75a1ca.tar.gz Qt-d3db719f8dce8abfa81c39f54d0fd58b4e75a1ca.tar.bz2 |
Merge commit 'origin/mmfphonon' into 4.6
-rw-r--r-- | src/3rdparty/phonon/mmf/abstractaudioeffect.cpp | 11 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/abstractaudioeffect.h | 1 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/audioequalizer.cpp | 20 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/audioequalizer.h | 1 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/bassboost.cpp | 7 | ||||
-rw-r--r-- | src/3rdparty/phonon/mmf/bassboost.h | 1 |
6 files changed, 10 insertions, 31 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp b/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp index 8c73027..e7ef9b2 100644 --- a/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp +++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp @@ -80,15 +80,10 @@ void AbstractAudioEffect::connectMediaObject(MediaObject *mediaObject) if (AudioPlayer *audioPlayer = qobject_cast<AudioPlayer *>(player)) { connectAudioPlayer(audioPlayer->nativePlayer()); - } else { - VideoPlayer *videoPlayer = qobject_cast<VideoPlayer *>(player); - Q_ASSERT_X(videoPlayer, Q_FUNC_INFO, "Player type not recognised"); - connectVideoPlayer(videoPlayer->nativePlayer()); + applyParameters(); + // TODO: handle audio effect errors + TRAP_IGNORE(m_effect->EnableL()); } - - applyParameters(); - // TODO: handle audio effect errors - TRAP_IGNORE(m_effect->EnableL()); } } diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h index 10578af..6f74a73 100644 --- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h +++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h @@ -86,7 +86,6 @@ protected: void disconnectMediaObject(MediaObject *mediaObject); virtual void connectAudioPlayer(AudioPlayer::NativePlayer *player) = 0; - virtual void connectVideoPlayer(VideoPlayer::NativePlayer *player) = 0; virtual void applyParameters() = 0; virtual void parameterChanged(const int id, diff --git a/src/3rdparty/phonon/mmf/audioequalizer.cpp b/src/3rdparty/phonon/mmf/audioequalizer.cpp index 51f1c32..c2936c5 100644 --- a/src/3rdparty/phonon/mmf/audioequalizer.cpp +++ b/src/3rdparty/phonon/mmf/audioequalizer.cpp @@ -49,21 +49,15 @@ void AudioEqualizer::connectAudioPlayer(AudioPlayer::NativePlayer *player) m_effect.reset(ptr); } -void AudioEqualizer::connectVideoPlayer(VideoPlayer::NativePlayer *player) -{ - CAudioEqualizer *ptr = 0; - QT_TRAP_THROWING(ptr = CAudioEqualizer::NewL(*player)); - m_effect.reset(ptr); -} - void AudioEqualizer::applyParameters() { - Q_ASSERT_X(m_effect.data(), Q_FUNC_INFO, "Effect not created"); - EffectParameter param; - foreach (param, parameters()) { - const int band = param.id(); - const int level = parameterValue(param).toInt(); - setBandLevel(band, level); + if (m_effect.data()) { + EffectParameter param; + foreach (param, parameters()) { + const int band = param.id(); + const int level = parameterValue(param).toInt(); + setBandLevel(band, level); + } } } diff --git a/src/3rdparty/phonon/mmf/audioequalizer.h b/src/3rdparty/phonon/mmf/audioequalizer.h index 9910ea4..10fe9ad 100644 --- a/src/3rdparty/phonon/mmf/audioequalizer.h +++ b/src/3rdparty/phonon/mmf/audioequalizer.h @@ -44,7 +44,6 @@ public: protected: // AbstractAudioEffect virtual void connectAudioPlayer(AudioPlayer::NativePlayer *player); - virtual void connectVideoPlayer(VideoPlayer::NativePlayer *player); virtual void applyParameters(); virtual void parameterChanged(const int id, const QVariant &value); diff --git a/src/3rdparty/phonon/mmf/bassboost.cpp b/src/3rdparty/phonon/mmf/bassboost.cpp index 36069fb..ae96b45 100644 --- a/src/3rdparty/phonon/mmf/bassboost.cpp +++ b/src/3rdparty/phonon/mmf/bassboost.cpp @@ -46,13 +46,6 @@ void BassBoost::connectAudioPlayer(AudioPlayer::NativePlayer *player) m_effect.reset(ptr); } -void BassBoost::connectVideoPlayer(VideoPlayer::NativePlayer *player) -{ - CBassBoost *ptr = 0; - QT_TRAP_THROWING(ptr = CBassBoost::NewL(*player)); - m_effect.reset(ptr); -} - void BassBoost::applyParameters() { // No parameters to apply diff --git a/src/3rdparty/phonon/mmf/bassboost.h b/src/3rdparty/phonon/mmf/bassboost.h index 1b893db..4ad0a6c 100644 --- a/src/3rdparty/phonon/mmf/bassboost.h +++ b/src/3rdparty/phonon/mmf/bassboost.h @@ -42,7 +42,6 @@ public: protected: // AbstractAudioEffect virtual void connectAudioPlayer(AudioPlayer::NativePlayer *player); - virtual void connectVideoPlayer(VideoPlayer::NativePlayer *player); virtual void applyParameters(); virtual void parameterChanged(const int id, const QVariant &value); |