diff options
author | Christian Stromme <christian.stromme@qt.io> | 2016-09-08 00:20:06 +0200 |
---|---|---|
committer | Christian Stromme <christian.stromme@qt.io> | 2016-10-19 12:12:09 +0000 |
commit | ae995b68ce19f7434269802e5eb9333d75049987 (patch) | |
tree | 093ff19a377ccd52dd31beda9f86d42675844a06 /src/multimedia | |
parent | 5415e94d8a7bcfb71d74e7c8d1183e54d410609e (diff) | |
download | qtmultimedia-ae995b68ce19f7434269802e5eb9333d75049987.tar.gz |
Reduce size of QMediaPlayerPrivate
Rearranged the data members to reduce the object size
(-16 bytes on 64 bit systems).
Change-Id: I0f285fafc42633fff42eba1ddc68c6f9bee2cec8
Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Diffstat (limited to 'src/multimedia')
-rw-r--r-- | src/multimedia/playback/qmediaplayer.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index d349654ff..98c2cf8c6 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -94,7 +94,6 @@ static void qRegisterMediaPlayerMetaTypes() Q_CONSTRUCTOR_FUNCTION(qRegisterMediaPlayerMetaTypes) - #define MAX_NESTED_PLAYLISTS 16 class QMediaPlayerPrivate : public QMediaObjectPrivate @@ -106,38 +105,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); |