From 9cf77e3bb531320f3c982a88ee31df8a75482f13 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Mon, 12 May 2014 16:50:30 +0200 Subject: [PATCH] Improve documentation for the QMediaPlayer::bufferStatus property. The corresponding properties in the Audio and MediaPlayer QML elements are also updated. Change-Id: I7104d274d431e7712db2f045c375756e8c2ac03a Reviewed-by: Jerome Pasion --- src/imports/multimedia/qdeclarativeaudio.cpp | 20 ++++++++++++++++---- src/multimedia/playback/qmediaplayer.cpp | 8 +++++--- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/imports/multimedia/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp index 37509b17..83e42019 100644 --- a/src/imports/multimedia/qdeclarativeaudio.cpp +++ b/src/imports/multimedia/qdeclarativeaudio.cpp @@ -601,8 +601,14 @@ bool QDeclarativeAudio::hasVideo() const /*! \qmlproperty real QtMultimedia::Audio::bufferProgress - This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0 - (full). + This property holds how much of the data buffer is currently filled, from \c 0.0 (empty) to + \c 1.0 (full). + + Playback can start or resume only when the buffer is entirely filled, in which case the + status is \c Audio.Buffered or \c Audio.Buffering. A value lower than \c 1.0 implies that + the status is \c Audio.Stalled. + + \sa status */ /*! @@ -1394,8 +1400,14 @@ void QDeclarativeAudio::_q_statusChanged() /*! \qmlproperty real QtMultimedia::MediaPlayer::bufferProgress - This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0 - (full). + This property holds how much of the data buffer is currently filled, from \c 0.0 (empty) to + \c 1.0 (full). + + Playback can start or resume only when the buffer is entirely filled, in which case the + status is \c MediaPlayer.Buffered or \c MediaPlayer.Buffering. A value lower than \c 1.0 + implies that the status is \c MediaPlayer.Stalled. + + \sa status */ /*! diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index bf6294a1..cb054fe5 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -1238,12 +1238,14 @@ QMultimedia::AvailabilityStatus QMediaPlayer::availability() const /*! \property QMediaPlayer::bufferStatus - \brief the percentage of the temporary buffer filled before playback begins. + \brief the percentage of the temporary buffer filled before playback begins or resumes, from + \c 0 (empty) to \c 100 (full). When the player object is buffering; this property holds the percentage of the temporary buffer that is filled. The buffer will need to reach 100% - filled before playback can resume, at which time the MediaStatus will be - BufferedMedia. + filled before playback can start or resume, at which time mediaStatus() will return + BufferedMedia or BufferingMedia. If the value is anything lower than \c 100, mediaStatus() will + return StalledMedia. \sa mediaStatus() */