summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/abstractaudioeffect.h
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-01-11 15:30:15 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-01-11 15:30:15 (GMT)
commite53306725e52407146304df9d8d3a65920fc3e8d (patch)
treeb3b8f4d25616ac8171af60f86ad1c060d26ac33c /src/3rdparty/phonon/mmf/abstractaudioeffect.h
parent483893142dcec15c646ef997309dcede76466766 (diff)
downloadQt-e53306725e52407146304df9d8d3a65920fc3e8d.zip
Qt-e53306725e52407146304df9d8d3a65920fc3e8d.tar.gz
Qt-e53306725e52407146304df9d8d3a65920fc3e8d.tar.bz2
Delayed creation of audio effect object until audio is initialized
When applying effects to an audio stream, we must ensure that the MMF utility API (CMdaAudioPlayerUtility or CVideoPlayerUtility) instance has loaded a controller before calling attempting to create a CAudioEffect- derived object. If the controller has not been loaded, construction of the effect object will fail. Even if we mitigate against this, calling CAudioEffect::ApplyL() will only have an effect if there is a controller object - or more precisely, a DevSound instance - on which to apply the effect. This patch delays construction of the effect object until the MediaObject has transitioned out of the LoadingState, indicating that an underlying DevSound instance will have been created. Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
Diffstat (limited to 'src/3rdparty/phonon/mmf/abstractaudioeffect.h')
-rw-r--r--src/3rdparty/phonon/mmf/abstractaudioeffect.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
index 4772eb8..7d44bf0 100644
--- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h
+++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
@@ -36,6 +36,7 @@ namespace Phonon
{
namespace MMF
{
+class AbstractPlayer;
class AbstractMediaPlayer;
/**
@@ -69,17 +70,25 @@ public:
virtual void setParameterValue(const Phonon::EffectParameter &,
const QVariant &newValue);
+public Q_SLOTS:
+ void abstractPlayerChanged(AbstractPlayer *player);
+ void stateChanged(Phonon::State newState,
+ Phonon::State oldState);
+
protected:
// MediaNode
void connectMediaObject(MediaObject *mediaObject);
void disconnectMediaObject(MediaObject *mediaObject);
- virtual void connectAudioPlayer(AudioPlayer::NativePlayer *player) = 0;
+ virtual void createEffect(AudioPlayer::NativePlayer *player) = 0;
virtual void applyParameters() = 0;
virtual void parameterChanged(const int id,
const QVariant &value) = 0;
+private:
+ void createEffect();
+
protected:
QScopedPointer<CAudioEffect> m_effect;
const QList<EffectParameter> m_params;