summaryrefslogtreecommitdiff
path: root/src/multimedia
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-04 11:27:51 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-04 11:30:08 +0100
commitd3a2d9c96994c56d67467c131b8f080510d1a8fd (patch)
tree088c55da965b1fb6bb327b2821afc4755eab8117 /src/multimedia
parent256ff7bb1551f6c62c4ac861472ea29f45dbab3a (diff)
parent75b4283fb05d07fb8654e031f266e9918f1ae647 (diff)
downloadqtmultimedia-d3a2d9c96994c56d67467c131b8f080510d1a8fd.tar.gz
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: Ib038c5e3ebb48c0e46569a35d530fa5ceaf06a32
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/camera/qcamera.cpp10
-rw-r--r--src/multimedia/playback/qmediaplayer.cpp20
-rw-r--r--src/multimedia/qmediametadata.cpp2
3 files changed, 15 insertions, 17 deletions
diff --git a/src/multimedia/camera/qcamera.cpp b/src/multimedia/camera/qcamera.cpp
index 4c1c0a924..fd804316c 100644
--- a/src/multimedia/camera/qcamera.cpp
+++ b/src/multimedia/camera/qcamera.cpp
@@ -71,17 +71,15 @@ static void qRegisterCameraMetaTypes()
Q_CONSTRUCTOR_FUNCTION(qRegisterCameraMetaTypes)
-static bool qt_sizeLessThan(const QSize &s1, const QSize &s2)
+Q_DECL_CONSTEXPR static bool qt_sizeLessThan(const QSize &s1, const QSize &s2) Q_DECL_NOTHROW
{
return (s1.width() * s1.height()) < (s2.width() * s2.height());
}
-static bool qt_frameRateRangeLessThan(const QCamera::FrameRateRange &s1, const QCamera::FrameRateRange &s2)
+Q_DECL_CONSTEXPR static bool qt_frameRateRangeLessThan(const QCamera::FrameRateRange &s1, const QCamera::FrameRateRange &s2) Q_DECL_NOTHROW
{
- if (s1.maximumFrameRate == s2.maximumFrameRate)
- return s1.minimumFrameRate < s2.minimumFrameRate;
-
- return s1.maximumFrameRate < s2.maximumFrameRate;
+ return qFuzzyCompare(s1.maximumFrameRate, s2.maximumFrameRate) ? (s1.minimumFrameRate < s2.minimumFrameRate)
+ : (s1.maximumFrameRate < s2.maximumFrameRate);
}
/*!
diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp
index 08f194be7..fdb7ef7fa 100644
--- a/src/multimedia/playback/qmediaplayer.cpp
+++ b/src/multimedia/playback/qmediaplayer.cpp
@@ -100,7 +100,6 @@ static void qRegisterMediaPlayerMetaTypes()
Q_CONSTRUCTOR_FUNCTION(qRegisterMediaPlayerMetaTypes)
-
#define MAX_NESTED_PLAYLISTS 16
class QMediaPlayerPrivate : public QMediaObjectPrivate
@@ -112,38 +111,39 @@ public:
: provider(0)
, control(0)
, audioRoleControl(0)
+ , playlist(0)
+ , networkAccessControl(0)
, state(QMediaPlayer::StoppedState)
, status(QMediaPlayer::UnknownMediaStatus)
, error(QMediaPlayer::NoError)
, ignoreNextStatusChange(-1)
- , playlist(0)
- , networkAccessControl(0)
- , hasStreamPlaybackFeature(false)
, nestedPlaylists(0)
+ , hasStreamPlaybackFeature(false)
{}
QMediaServiceProvider *provider;
QMediaPlayerControl* control;
QAudioRoleControl *audioRoleControl;
- QMediaPlayer::State state;
- QMediaPlayer::MediaStatus status;
- QMediaPlayer::Error error;
QString errorString;
- int ignoreNextStatusChange;
QPointer<QObject> videoOutput;
QMediaPlaylist *playlist;
QMediaNetworkAccessControl *networkAccessControl;
QVideoSurfaceOutput surfaceOutput;
- bool hasStreamPlaybackFeature;
QMediaContent qrcMedia;
QScopedPointer<QFile> qrcFile;
QMediaContent rootMedia;
QMediaContent pendingPlaylist;
+ QMediaPlayer::State state;
+ QMediaPlayer::MediaStatus status;
+ QMediaPlayer::Error error;
+ int ignoreNextStatusChange;
+ int nestedPlaylists;
+ bool hasStreamPlaybackFeature;
+
QMediaPlaylist *parentPlaylist(QMediaPlaylist *pls);
bool isInChain(QUrl url);
- int nestedPlaylists;
void setMedia(const QMediaContent &media, QIODevice *stream = 0);
diff --git a/src/multimedia/qmediametadata.cpp b/src/multimedia/qmediametadata.cpp
index 9ffd2a727..42fabbe7e 100644
--- a/src/multimedia/qmediametadata.cpp
+++ b/src/multimedia/qmediametadata.cpp
@@ -164,7 +164,7 @@ Q_DEFINE_METADATA(ThumbnailImage);
\ingroup multimedia
\inmodule QtMultimedia
- This namespace provides identifiers for meta-data attributes.
+ \brief Provides identifiers for meta-data attributes.
\note Not all identifiers are supported on all platforms. Please consult vendor documentation for specific support
on different platforms.