diff options
Diffstat (limited to 'src/multimedia/qml')
-rw-r--r-- | src/multimedia/qml/qmlaudio.cpp | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qmlgraphicsvideo.cpp | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect.cpp | 12 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_p.h | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_pulse_p.cpp | 18 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_pulse_p.h | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_qmedia_p.cpp | 8 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_qmedia_p.h | 2 | ||||
-rw-r--r-- | src/multimedia/qml/qsoundeffect_qsound_p.cpp | 2 | ||||
-rw-r--r-- | src/multimedia/qml/wavedecoder_p.cpp | 4 |
10 files changed, 32 insertions, 22 deletions
diff --git a/src/multimedia/qml/qmlaudio.cpp b/src/multimedia/qml/qmlaudio.cpp index b54d644..89f045e 100644 --- a/src/multimedia/qml/qmlaudio.cpp +++ b/src/multimedia/qml/qmlaudio.cpp @@ -315,7 +315,7 @@ QmlAudio::Error QmlAudio::error() const /*! \qmlsignal Audio::onError(error, errorString) - This property is called when an \l {Error}{error} has occurred. The errorString parameter + This handler is called when an \l {Error}{error} has occurred. The errorString parameter may contain more detailed information about the error. */ diff --git a/src/multimedia/qml/qmlgraphicsvideo.cpp b/src/multimedia/qml/qmlgraphicsvideo.cpp index 9e30774..7289f4d 100644 --- a/src/multimedia/qml/qmlgraphicsvideo.cpp +++ b/src/multimedia/qml/qmlgraphicsvideo.cpp @@ -316,7 +316,7 @@ QmlGraphicsVideo::Error QmlGraphicsVideo::error() const /*! \qmlsignal Video::onError(error, errorString) - This property is called when an \l {Error}{error} has occurred. The errorString parameter + This handler is called when an \l {Error}{error} has occurred. The errorString parameter may contain more detailed information about the error. */ diff --git a/src/multimedia/qml/qsoundeffect.cpp b/src/multimedia/qml/qsoundeffect.cpp index f0c9659..919aa75 100644 --- a/src/multimedia/qml/qsoundeffect.cpp +++ b/src/multimedia/qml/qsoundeffect.cpp @@ -52,6 +52,7 @@ #include "qsoundeffect_qsound_p.h" #endif +QT_BEGIN_NAMESPACE /*! \qmlclass SoundEffect QSoundEffect @@ -139,7 +140,7 @@ QSoundEffect::QSoundEffect(QObject *parent) : QObject(parent), m_loopCount(1), - m_volume(100), + m_vol(100), m_muted(false), m_runningCount(0) { @@ -165,7 +166,7 @@ void QSoundEffect::setSource(const QUrl &url) if (d != 0 && d->media().canonicalUrl() == url) return; - d->setVolume(m_volume); + d->setVolume(m_vol); d->setMuted(m_muted); d->setMedia(url); @@ -191,15 +192,15 @@ void QSoundEffect::setLoopCount(int loopCount) int QSoundEffect::volume() const { - return d != 0 ? d->volume() : m_volume; + return d != 0 ? d->volume() : m_vol; } void QSoundEffect::setVolume(int volume) { - if (m_volume == volume) + if (m_vol == volume) return; - m_volume = volume; + m_vol = volume; if (d != 0) d->setVolume(volume); else @@ -250,3 +251,4 @@ void QSoundEffect::repeat() } } +QT_END_NAMESPACE diff --git a/src/multimedia/qml/qsoundeffect_p.h b/src/multimedia/qml/qsoundeffect_p.h index ab6f9e5..4b440ec 100644 --- a/src/multimedia/qml/qsoundeffect_p.h +++ b/src/multimedia/qml/qsoundeffect_p.h @@ -109,7 +109,7 @@ private: Q_DISABLE_COPY(QSoundEffect) int m_loopCount; - int m_volume; + int m_vol; bool m_muted; int m_runningCount; diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.cpp b/src/multimedia/qml/qsoundeffect_pulse_p.cpp index 7057022..ec851aa 100644 --- a/src/multimedia/qml/qsoundeffect_pulse_p.cpp +++ b/src/multimedia/qml/qsoundeffect_pulse_p.cpp @@ -67,6 +67,8 @@ #include <pulse/ext-stream-restore.h> #endif +#include <unistd.h> + // Less than ideal #define PA_SCACHE_ENTRY_SIZE_MAX (1024*1024*16) @@ -128,13 +130,13 @@ public: int volume() { - return m_volume; + return m_vol; } private: void prepare() { - m_volume = 100; + m_vol = 100; m_mainLoop = pa_threaded_mainloop_new(); if (m_mainLoop == 0) { @@ -215,13 +217,13 @@ private: const unsigned str_length = 256; char str[str_length]; pa_cvolume_snprint(str, str_length, &info->volume); - self->m_volume = QString(str).replace(" ","").replace("%","").mid(2).toInt(); + self->m_vol = QString(str).replace(" ","").replace("%","").mid(2).toInt(); } } } #endif - int m_volume; + int m_vol; bool m_prepared; pa_context *m_context; pa_threaded_mainloop *m_mainLoop; @@ -236,7 +238,7 @@ QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): QObject(parent), m_muted(false), m_playQueued(false), - m_volume(100), + m_vol(100), m_duration(0), m_dataUploaded(0), m_state(QMediaPlayer::StoppedState), @@ -260,7 +262,7 @@ qint64 QSoundEffectPrivate::duration() const int QSoundEffectPrivate::volume() const { - return m_volume; + return m_vol; } bool QSoundEffectPrivate::isMuted() const @@ -298,7 +300,7 @@ void QSoundEffectPrivate::play() daemon()->lock(); #if(Q_WS_MAEMO_5) - m_vol = PA_VOLUME_NORM/100*((daemon()->volume()+m_volume)/2); + m_vol = PA_VOLUME_NORM/100*((daemon()->volume()+m_vol)/2); #endif pa_operation_unref( pa_context_play_sample(daemon()->context(), @@ -322,7 +324,7 @@ void QSoundEffectPrivate::stop() void QSoundEffectPrivate::setVolume(int volume) { - m_volume = volume; + m_vol = volume; } void QSoundEffectPrivate::setMuted(bool muted) diff --git a/src/multimedia/qml/qsoundeffect_pulse_p.h b/src/multimedia/qml/qsoundeffect_pulse_p.h index 58a05d2..247f8a3 100644 --- a/src/multimedia/qml/qsoundeffect_pulse_p.h +++ b/src/multimedia/qml/qsoundeffect_pulse_p.h @@ -117,7 +117,7 @@ private: bool m_muted; bool m_playQueued; - int m_volume; + int m_vol; int m_duration; int m_dataUploaded; QTime m_playbackTime; diff --git a/src/multimedia/qml/qsoundeffect_qmedia_p.cpp b/src/multimedia/qml/qsoundeffect_qmedia_p.cpp index e5ac0d3..886380a 100644 --- a/src/multimedia/qml/qsoundeffect_qmedia_p.cpp +++ b/src/multimedia/qml/qsoundeffect_qmedia_p.cpp @@ -62,7 +62,7 @@ QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): QObject(parent), m_muted(false), - m_volume(100), + m_vol(100), m_player(0) { } @@ -83,7 +83,7 @@ int QSoundEffectPrivate::volume() const { if (m_player) return m_player->volume(); - return m_volume; + return m_vol; } bool QSoundEffectPrivate::isMuted() const @@ -128,7 +128,7 @@ void QSoundEffectPrivate::stop() void QSoundEffectPrivate::setVolume(int volume) { - m_volume = volume; + m_vol = volume; if (m_player) m_player->setVolume(volume); @@ -149,7 +149,7 @@ void QSoundEffectPrivate::setMedia(const QMediaContent &media) if (m_player == 0) { m_player = new QMediaPlayer(this, QMediaPlayer::LowLatency); - m_player->setVolume(m_volume); + m_player->setVolume(m_vol); m_player->setMuted(m_muted); connect(m_player, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged(int))); diff --git a/src/multimedia/qml/qsoundeffect_qmedia_p.h b/src/multimedia/qml/qsoundeffect_qmedia_p.h index e17d720..8267f79 100644 --- a/src/multimedia/qml/qsoundeffect_qmedia_p.h +++ b/src/multimedia/qml/qsoundeffect_qmedia_p.h @@ -98,7 +98,7 @@ Q_SIGNALS: private: bool m_muted; - int m_volume; + int m_vol; QMediaPlayer *m_player; }; diff --git a/src/multimedia/qml/qsoundeffect_qsound_p.cpp b/src/multimedia/qml/qsoundeffect_qsound_p.cpp index 33f5bd4..0292d26 100644 --- a/src/multimedia/qml/qsoundeffect_qsound_p.cpp +++ b/src/multimedia/qml/qsoundeffect_qsound_p.cpp @@ -65,6 +65,7 @@ #include "qsoundeffect_qsound_p.h" +QT_BEGIN_NAMESPACE QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): QObject(parent), @@ -221,3 +222,4 @@ void QSoundEffectPrivate::unloadSample() m_sound = 0; } +QT_END_NAMESPACE diff --git a/src/multimedia/qml/wavedecoder_p.cpp b/src/multimedia/qml/wavedecoder_p.cpp index 5fc5a96..b7d6101 100644 --- a/src/multimedia/qml/wavedecoder_p.cpp +++ b/src/multimedia/qml/wavedecoder_p.cpp @@ -44,6 +44,8 @@ #include <QtCore/qtimer.h> #include <QtCore/qendian.h> +QT_BEGIN_NAMESPACE + WaveDecoder::WaveDecoder(QIODevice *s, QObject *parent): QIODevice(parent), haveFormat(false), @@ -134,3 +136,5 @@ void WaveDecoder::handleData() emit formatKnown(); } } + +QT_END_NAMESPACE |