summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/audio/qaudio.cpp22
-rw-r--r--src/multimedia/audio/qaudio.h2
-rw-r--r--src/multimedia/camera/qcamera.h5
-rw-r--r--src/multimedia/qmediaobject.cpp8
4 files changed, 27 insertions, 10 deletions
diff --git a/src/multimedia/audio/qaudio.cpp b/src/multimedia/audio/qaudio.cpp
index d4f89e898..dea9a05a5 100644
--- a/src/multimedia/audio/qaudio.cpp
+++ b/src/multimedia/audio/qaudio.cpp
@@ -79,13 +79,18 @@ Q_CONSTRUCTOR_FUNCTION(qRegisterAudioMetaTypes)
/*!
\enum QAudio::State
- \value ActiveState Audio data is being processed, this state is set after start() is called
- and while audio data is available to be processed.
- \value SuspendedState The audio device is in a suspended state, this state will only be entered
- after suspend() is called.
- \value StoppedState The audio device is closed, and is not processing any audio data
- \value IdleState The QIODevice passed in has no data and audio system's buffer is empty, this state
- is set after start() is called and while no audio data is available to be processed.
+ \value ActiveState Audio data is being processed, this state is set after start() is called
+ and while audio data is available to be processed.
+ \value SuspendedState The audio stream is in a suspended state. Entered after suspend() is called
+ or when another stream takes control of the audio device. In the later case,
+ a call to resume will return control of the audio device to this stream. This
+ should usually only be done upon user request.
+ \value StoppedState The audio device is closed, and is not processing any audio data
+ \value IdleState The QIODevice passed in has no data and audio system's buffer is empty, this state
+ is set after start() is called and while no audio data is available to be processed.
+ \value InterruptedState This stream is in a suspended state because another higher priority stream currently
+ has control of the audio device. Playback cannot resume until the higher priority
+ stream relinquishes control of the audio device.
*/
/*!
@@ -285,6 +290,9 @@ QDebug operator<<(QDebug dbg, QAudio::State state)
case QAudio::IdleState:
dbg << "IdleState";
break;
+ case QAudio::InterruptedState:
+ dbg << "InterruptedState";
+ break;
}
return dbg;
}
diff --git a/src/multimedia/audio/qaudio.h b/src/multimedia/audio/qaudio.h
index 1c38e9f35..2603d71d1 100644
--- a/src/multimedia/audio/qaudio.h
+++ b/src/multimedia/audio/qaudio.h
@@ -55,7 +55,7 @@ class QString;
namespace QAudio
{
enum Error { NoError, OpenError, IOError, UnderrunError, FatalError };
- enum State { ActiveState, SuspendedState, StoppedState, IdleState };
+ enum State { ActiveState, SuspendedState, StoppedState, IdleState, InterruptedState };
enum Mode { AudioInput, AudioOutput };
enum Role {
diff --git a/src/multimedia/camera/qcamera.h b/src/multimedia/camera/qcamera.h
index 685298905..aebd1c013 100644
--- a/src/multimedia/camera/qcamera.h
+++ b/src/multimedia/camera/qcamera.h
@@ -262,7 +262,10 @@ QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
QT_WARNING_DISABLE_GCC("-Wfloat-equal")
Q_DECL_CONSTEXPR Q_INLINE_TEMPLATE bool operator==(const QCamera::FrameRateRange &r1, const QCamera::FrameRateRange &r2) Q_DECL_NOTHROW
-{ return r1.minimumFrameRate == r2.minimumFrameRate && r1.maximumFrameRate == r2.maximumFrameRate; }
+{
+ return qFuzzyCompare(r1.minimumFrameRate, r2.minimumFrameRate)
+ && qFuzzyCompare(r1.maximumFrameRate, r2.maximumFrameRate);
+}
QT_WARNING_POP
diff --git a/src/multimedia/qmediaobject.cpp b/src/multimedia/qmediaobject.cpp
index a2f0d58aa..71b2d148c 100644
--- a/src/multimedia/qmediaobject.cpp
+++ b/src/multimedia/qmediaobject.cpp
@@ -55,7 +55,13 @@ void QMediaObjectPrivate::_q_notify()
const QMetaObject* m = q->metaObject();
- for (int pi : qAsConst(notifyProperties)) {
+ // QTBUG-57045
+ // we create a copy of notifyProperties container to ensure that if a property is removed
+ // from the original container as a result of invoking propertyChanged signal, the iterator
+ // won't become invalidated
+ QSet<int> properties = notifyProperties;
+
+ for (int pi : qAsConst(properties)) {
QMetaProperty p = m->property(pi);
p.notifySignal().invoke(
q, QGenericArgument(QMetaType::typeName(p.userType()), p.read(q).data()));