diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-02-24 00:00:19 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-02-24 00:00:19 (GMT) |
commit | 56fe1454fe08ec7cc258cbbd38486e721d088c99 (patch) | |
tree | 597051d1f3b73595f48bcad5a5acb24026c6ba66 /src/multimedia | |
parent | e26db74521e063a1513731eb14581d93a3d77481 (diff) | |
parent | af4f30abb88d242d1e310914b53bc91b24e45a59 (diff) | |
download | Qt-56fe1454fe08ec7cc258cbbd38486e721d088c99.zip Qt-56fe1454fe08ec7cc258cbbd38486e721d088c99.tar.gz Qt-56fe1454fe08ec7cc258cbbd38486e721d088c99.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt
Conflicts:
doc/src/declarative/advtutorial1.qdoc
src/declarative/qml/qmlmoduleplugin.cpp
src/declarative/util/qmlxmllistmodel.cpp
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/base/qmediaserviceprovider.cpp | 6 | ||||
-rw-r--r-- | src/multimedia/playback/qmediaplayer.cpp | 5 | ||||
-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 |
12 files changed, 39 insertions, 26 deletions
diff --git a/src/multimedia/base/qmediaserviceprovider.cpp b/src/multimedia/base/qmediaserviceprovider.cpp index 8d1e0fa..76377d9 100644 --- a/src/multimedia/base/qmediaserviceprovider.cpp +++ b/src/multimedia/base/qmediaserviceprovider.cpp @@ -48,7 +48,7 @@ #include "qmediapluginloader_p.h" #include <QtMultimedia/qmediaplayer.h> - +QT_BEGIN_NAMESPACE class QMediaServiceProviderHintPrivate : public QSharedData { @@ -594,6 +594,8 @@ QMediaServiceProvider *QMediaServiceProvider::defaultServiceProvider() #endif } +QT_END_NAMESPACE + /*! \class QMediaServiceProviderPlugin \preliminary @@ -697,5 +699,7 @@ QMediaServiceProvider *QMediaServiceProvider::defaultServiceProvider() Returns a set of features supported by a plug-in \a service. */ +QT_END_NAMESPACE + #include "moc_qmediaserviceprovider.cpp" #include "moc_qmediaserviceproviderplugin.cpp" diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index 5f50fdb..ca34993 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -947,9 +947,8 @@ QStringList QMediaPlayer::supportedMimeTypes(Flags flags) Such playback service can be used for beeps, ringtones, etc. */ -#include "moc_qmediaplayer.cpp" - QT_END_NAMESPACE -QT_END_NAMESPACE +QT_END_HEADER +#include "moc_qmediaplayer.cpp" 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 |