summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-09-20 11:33:29 +0200
committerLars Knoll <lars.knoll@qt.io>2021-09-22 13:51:09 +0200
commit702dbfc7c293066a0ac4b6de9208faa7f7b81939 (patch)
treee27b78df1362355a3c290fb670a60c1333c9e722
parent3d393a9aa8788d80e8f0d6d03d3c217d8b532c59 (diff)
Fix the MediaPlayer docs
Remove all properties that don't exist in Qt 6. Move the QML docs into qmediaplayer.cpp, add docs for some missing methods and document the AudioInput and AudioOutput QML types. Fixes: QTBUG-96641 Fixes: QTBUG-96653 Task-number: QTBUG-95066 Change-Id: I8c2339d85cf06ae39f8baf7f44543e961e01c433 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> (cherry picked from commit 627c0df99cd2bd5e0c66bf8b904bb9dc82f1ea98) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--examples/multimedia/video/android/gstreamer/main.qml2
-rw-r--r--src/multimedia/audio/qaudioinput.cpp149
-rw-r--r--src/multimedia/audio/qaudiooutput.cpp173
-rw-r--r--src/multimedia/doc/snippets/multimedia-snippets/multiple-videooutputs.qml1
-rw-r--r--src/multimedia/playback/qmediaplayer.cpp428
-rw-r--r--src/multimediaquick/mediaplayer.qdoc691
-rw-r--r--src/multimediaquick/qquickvideooutput.cpp1
7 files changed, 604 insertions, 841 deletions
diff --git a/examples/multimedia/video/android/gstreamer/main.qml b/examples/multimedia/video/android/gstreamer/main.qml
index 8e41d6c1d..c4663cb9a 100644
--- a/examples/multimedia/video/android/gstreamer/main.qml
+++ b/examples/multimedia/video/android/gstreamer/main.qml
@@ -61,8 +61,6 @@ ApplicationWindow {
Video {
id: video
anchors.fill: parent
- autoPlay: true
- autoLoad: true
source: "gst-pipeline: videotestsrc ! qtvideosink"
}
diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp
index 431e2a871..6b1c830e3 100644
--- a/src/multimedia/audio/qaudioinput.cpp
+++ b/src/multimedia/audio/qaudioinput.cpp
@@ -44,6 +44,36 @@
#include <private/qplatformmediaintegration_p.h>
/*!
+ \qmltype AudioInput
+ \instantiates QAudioInput
+ \brief An audio input to be used for capturing audio in a capture session.
+
+ \inqmlmodule QtMultimedia
+ \ingroup multimedia_qml
+ \ingroup multimedia_audio_qml
+
+ \qml
+ CaptureSession {
+ id: playMusic
+ audioInput: AudioInput {
+ volume: slider
+ }
+ recorder: MediaRecorder { ... }
+ }
+ Slider {
+ id: slider
+ from: 0.
+ to: 1.
+ }
+ \endqml
+
+ You can use AudioInput together with a QtMultiMedia::CaptureSession to capture audio from an audio
+ input device.
+
+ \sa Camera AudioOutput
+*/
+
+/*!
\class QAudioInput
\brief Represents an input channel for audio.
\inmodule QtMultimedia
@@ -55,52 +85,15 @@
to be used, muting the channel, and changing the channel's volume.
*/
-/*!
- \property QAudioInput::volume
- \brief The current volume.
-
- The volume is scaled linearly, ranging from \c 0 (silence) to \c 1
- (full volume).
- \note values outside this range will be clamped.
-
- By default the volume is \c 1.
-
- UI volume controls should usually be scaled non-linearly. For example,
- using a logarithmic scale will produce linear changes in perceived loudness,
- which is what a user would normally expect from a volume control.
- \sa QAudio::convertVolume()
-*/
-
-/*!
- \property QAudioInput::muted
- \brief The muted state of the current media.
-
- The value will be \c true if the input is muted; otherwise \c false.
-*/
-
-/*!
- \property QAudioInput::device
- \brief The audio device connected to this input.
-
- The device property represents the audio device connected to this input. A
- default constructed QAudioInput object will be connected to the system's
- default audio input at construction time.
-
- This property can be used to select any other input device listed by
- QMediaDevices::audioInputs().
-*/
-
QAudioInput::QAudioInput(QObject *parent)
- : QAudioInput(QMediaDevices::defaultAudioInput(), parent)
+ : QAudioInput(QMediaDevices::defaultAudioInput(), parent)
{}
QAudioInput::QAudioInput(const QAudioDevice &device, QObject *parent)
- : QObject(parent),
+ : QObject(parent),
d(QPlatformMediaIntegration::instance()->createAudioInput(this))
{
- d->device = device;
- if (!d->device.isNull() && d->device.mode() != QAudioDevice::Input)
- d->device = QMediaDevices::defaultAudioInput();
+ d->device = device.mode() == QAudioDevice::Input ? device : QMediaDevices::defaultAudioInput();
d->setAudioDevice(d->device);
}
@@ -109,20 +102,19 @@ QAudioInput::~QAudioInput()
delete d;
}
-QAudioDevice QAudioInput::device() const
-{
- return d->device;
-}
+/*!
+ \qmlproperty real QtMultimedia::AudioInput::volume
-void QAudioInput::setDevice(const QAudioDevice &device)
-{
- if (device.mode() == QAudioDevice::Output)
- return;
- d->device = device;
- d->setAudioDevice(device);
- emit deviceChanged();
-}
+ The volume is scaled linearly, ranging from \c 0 (silence) to \c 1 (full volume).
+ \note values outside this range will be clamped.
+ By default the volume is \c 1.
+
+ UI volume controls should usually be scaled non-linearly. For example,
+ using a logarithmic scale will produce linear changes in perceived loudness,
+ which is what a user would normally expect from a volume control.
+ \sa QAudio::convertVolume()
+*/
float QAudioInput::volume() const
{
return d->volume;
@@ -138,6 +130,20 @@ void QAudioInput::setVolume(float volume)
emit volumeChanged(volume);
}
+/*!
+ \qmlproperty bool QtMultimedia::AudioInput::muted
+
+ This property holds whether the audio input is muted.
+
+ Defaults to \c{false}.
+*/
+
+/*!
+ \property QAudioInput::muted
+ \brief The muted state of the current media.
+
+ The value will be \c true if the input is muted; otherwise \c false.
+*/
bool QAudioInput::isMuted() const
{
return d->muted;
@@ -152,4 +158,43 @@ void QAudioInput::setMuted(bool muted)
emit mutedChanged(muted);
}
+/*!
+ \qmlproperty QtMultimedia::AudioInput::device
+
+ This property describes the audio device connected to this input.
+
+ The device property represents the audio device this input is connected to.
+ This property can be used to select an output device from the
+ QtMultimedia::MediaDevices::audioInputs() list.
+*/
+
+/*!
+ \property QAudioInput::device
+ \brief The audio device connected to this input.
+
+ The device property represents the audio device connected to this input.
+ This property can be used to select an input device from the
+ QMediaDevices::audioInputs() list.
+
+ You can select the system default audio input by setting this property to
+ a default constructed QAudioDevice object.
+*/
+QAudioDevice QAudioInput::device() const
+{
+ return d->device;
+}
+
+void QAudioInput::setDevice(const QAudioDevice &device)
+{
+ auto dev = device;
+ if (dev.isNull())
+ dev = QMediaDevices::defaultAudioInput();
+ if (dev.mode() != QAudioDevice::Input)
+ return;
+ if (d->device == dev)
+ return;
+ d->device = dev;
+ d->setAudioDevice(dev);
+ emit deviceChanged();
+}
#include "moc_qaudioinput.cpp"
diff --git a/src/multimedia/audio/qaudiooutput.cpp b/src/multimedia/audio/qaudiooutput.cpp
index 5f49e8f26..a514e2866 100644
--- a/src/multimedia/audio/qaudiooutput.cpp
+++ b/src/multimedia/audio/qaudiooutput.cpp
@@ -44,6 +44,36 @@
#include <private/qplatformmediaintegration_p.h>
/*!
+ \qmltype AudioOutput
+ \instantiates QAudioOutput
+ \brief An audio output to be used for playback or monitoring of a capture session.
+
+ \inqmlmodule QtMultimedia
+ \ingroup multimedia_qml
+ \ingroup multimedia_audio_qml
+
+ \qml
+ MediaPlayer {
+ id: playMusic
+ source: "music.wav"
+ audioOutput: AudioOutput {
+ volume: slider
+ }
+ }
+ Slider {
+ id: slider
+ from: 0.
+ to: 1.
+ }
+ \endqml
+
+ You can use AudioOutput together with a QtMultiMedia::MediaPlayer to play audio content, or you can use it
+ in conjunction with a MultiMedia::CaptureSession to monitor the audio processed by the capture session.
+
+ \sa VideoOutput AudioInput
+*/
+
+/*!
\class QAudioOutput
\brief Represents an output channel for audio.
\inmodule QtMultimedia
@@ -56,44 +86,6 @@
physical output device to be used, muting the channel, and changing the
channel's volume.
*/
-
-/*!
- \property QAudioOutput::volume
- \brief The current volume.
-
- The volume is scaled linearly, ranging from \c 0 (silence) to \c 1
- (full volume).
- \note values outside this range will be clamped.
-
- By default the volume is \c 1.
-
- UI volume controls should usually be scaled non-linearly. For example,
- using a logarithmic scale will produce linear changes in perceived loudness,
- which is what a user would normally expect from a volume control.
-
- \sa QAudio::convertVolume()
-*/
-
-/*!
- \property QAudioOutput::muted
- \brief The muted state of the current media.
-
- The value will be \c true if the output is muted; otherwise \c{false}.
-*/
-
-/*!
- \property QAudioOutput::device
- \brief The audio device connected to this output.
-
- The device property represents the audio device connected to this output.
- A default constructed
- QAudioOutput object will be connected to the systems default audio output at
- construction time.
-
- This property can be used to select any other output device listed by
- QMediaDevices::audioOutputs().
-*/
-
QAudioOutput::QAudioOutput(QObject *parent)
: QAudioOutput(QMediaDevices::defaultAudioOutput(), parent)
{}
@@ -102,9 +94,7 @@ QAudioOutput::QAudioOutput(const QAudioDevice &device, QObject *parent)
: QObject(parent),
d(QPlatformMediaIntegration::instance()->createAudioOutput(this))
{
- d->device = device;
- if (!d->device.isNull() && d->device.mode() != QAudioDevice::Output)
- d->device = QMediaDevices::defaultAudioOutput();
+ d->device = device.mode() == QAudioDevice::Output ? device : QMediaDevices::defaultAudioOutput();
d->setAudioDevice(d->device);
}
@@ -113,22 +103,42 @@ QAudioOutput::~QAudioOutput()
delete d;
}
-QAudioDevice QAudioOutput::device() const
-{
- return d->device;
-}
-void QAudioOutput::setDevice(const QAudioDevice &device)
-{
- if (!device.isNull() && device.mode() != QAudioDevice::Output)
- return;
- if (d->device == device)
- return;
- d->device = device;
- d->setAudioDevice(device);
- emit deviceChanged();
-}
+/*!
+ \qmlproperty real QtMultimedia::AudioOutput::volume
+
+ This property holds the volume of the audio output.
+
+ The volume is scaled linearly from \c 0.0 (silence) to \c 1.0 (full volume).
+ Values outside this range will be clamped: a value lower than 0.0 is set to
+ 0.0, a value higher than 1.0 will set to 1.0.
+
+ The default volume is \c{1.0}.
+
+ UI \l{volume controls} should usually be scaled non-linearly. For example,
+ using a logarithmic scale will produce linear changes in perceived \l{loudness},
+ which is what a user would normally expect from a volume control.
+ See \l {QAudio::convertVolume()}{QtMultimedia.convertVolume()}
+ for more details.
+*/
+
+/*!
+ \property QAudioOutput::volume
+ \brief The current volume.
+
+ The volume is scaled linearly, ranging from \c 0 (silence) to \c 1
+ (full volume).
+ \note values outside this range will be clamped.
+
+ By default the volume is \c 1.
+
+ UI volume controls should usually be scaled non-linearly. For example,
+ using a logarithmic scale will produce linear changes in perceived loudness,
+ which is what a user would normally expect from a volume control.
+
+ \sa QAudio::convertVolume()
+*/
float QAudioOutput::volume() const
{
return d->volume;
@@ -144,6 +154,20 @@ void QAudioOutput::setVolume(float volume)
emit volumeChanged(volume);
}
+/*!
+ \qmlproperty bool QtMultimedia::AudioOutput::muted
+
+ This property holds whether the audio output is muted.
+
+ Defaults to \c{false}.
+*/
+
+/*!
+ \property QAudioOutput::muted
+ \brief The muted state of the current media.
+
+ The value will be \c true if the output is muted; otherwise \c{false}.
+*/
bool QAudioOutput::isMuted() const
{
return d->muted;
@@ -158,4 +182,43 @@ void QAudioOutput::setMuted(bool muted)
emit mutedChanged(muted);
}
+/*!
+ \qmlproperty QtMultimedia::AudioOutput::device
+
+ This property describes the audio device connected to this output.
+
+ The device property represents the audio device this output is connected to.
+ This property can be used to select an output device from the
+ QtMultimedia::MediaDevices::audioOutputs() list.
+*/
+
+/*!
+ \property QAudioOutput::device
+ \brief The audio device connected to this output.
+
+ The device property represents the audio device this output is connected to.
+ This property can be used to select an output device from the
+ QMediaDevices::audioOutputs() list.
+ You can select the system default audio output by setting this property to
+ a default constructed QAudioDevice object.
+*/
+QAudioDevice QAudioOutput::device() const
+{
+ return d->device;
+}
+
+void QAudioOutput::setDevice(const QAudioDevice &device)
+{
+ auto dev = device;
+ if (dev.isNull())
+ dev = QMediaDevices::defaultAudioOutput();
+ if (dev.mode() != QAudioDevice::Output)
+ return;
+ if (d->device == dev)
+ return;
+ d->device = dev;
+ d->setAudioDevice(dev);
+ emit deviceChanged();
+}
+
#include "moc_qaudiooutput.cpp"
diff --git a/src/multimedia/doc/snippets/multimedia-snippets/multiple-videooutputs.qml b/src/multimedia/doc/snippets/multimedia-snippets/multiple-videooutputs.qml
index 8484a5f28..f50c9f169 100644
--- a/src/multimedia/doc/snippets/multimedia-snippets/multiple-videooutputs.qml
+++ b/src/multimedia/doc/snippets/multimedia-snippets/multiple-videooutputs.qml
@@ -45,7 +45,6 @@ import QtMultimedia
Item {
MediaPlayer {
id: mediaplayer
- autoPlay: true
source: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
videoOutput: [v1, v2]
audioOutput: AudioOutput {
diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp
index 4c43ec576..fa7316d41 100644
--- a/src/multimedia/playback/qmediaplayer.cpp
+++ b/src/multimedia/playback/qmediaplayer.cpp
@@ -73,6 +73,62 @@ QT_BEGIN_NAMESPACE
\sa QVideoWidget
*/
+/*!
+ \qmltype MediaPlayer
+ \instantiates QMediaPlayer
+ \brief Adds media playback to a scene.
+
+ \inqmlmodule QtMultimedia
+ \ingroup multimedia_qml
+ \ingroup multimedia_audio_qml
+ \ingroup multimedia_video_qml
+
+ \qml
+ Text {
+ text: "Click Me!";
+ font.pointSize: 24;
+ width: 150; height: 50;
+
+ MediaPlayer {
+ id: playMusic
+ source: "music.wav"
+ audioOutput: AudioOutput {}
+ }
+ MouseArea {
+ id: playArea
+ anchors.fill: parent
+ onPressed: { playMusic.play() }
+ }
+ }
+ \endqml
+
+ You can use MediaPlayer together with a MultiMedia::AudioOutput to play audio content, or you can use it
+ in conjunction with a Multimedia::VideoOutput for rendering video.
+
+ \qml
+ Item {
+ MediaPlayer {
+ id: mediaplayer
+ source: "groovy_video.mp4"
+ audioOutput: AudioOutput {}
+ videoOutput: videoOutput
+ }
+
+ VideoOutput {
+ anchors.fill: parent
+ }
+
+ MouseArea {
+ id: playArea
+ anchors.fill: parent
+ onPressed: mediaplayer.play();
+ }
+ }
+ \endqml
+
+ \sa AudioOutput, VideoOutput
+*/
+
void QMediaPlayerPrivate::setState(QMediaPlayer::PlaybackState ps)
{
Q_Q(QMediaPlayer);
@@ -327,6 +383,16 @@ QMediaTimeRange QMediaPlayer::bufferedTimeRange() const
return {};
}
+/*!
+ \qmlproperty bool QtMultimedia::MediaPlayer::hasAudio
+
+ This property holds whether the media contains audio.
+*/
+
+/*!
+ \property bool QMediaPlayer::hasAudio
+ \brief This property holds whether the media contains audio.
+*/
bool QMediaPlayer::hasAudio() const
{
Q_D(const QMediaPlayer);
@@ -337,6 +403,16 @@ bool QMediaPlayer::hasAudio() const
return false;
}
+/*!
+ \qmlproperty bool QtMultimedia::MediaPlayer::hasVideo
+
+ This property holds whether the media contains video.
+*/
+
+/*!
+ \property bool QMediaPlayer::hasVideo
+ \brief This property holds whether the media contains video.
+*/
bool QMediaPlayer::hasVideo() const
{
Q_D(const QMediaPlayer);
@@ -384,15 +460,36 @@ QMediaPlayer::Error QMediaPlayer::error() const
return d_func()->error;
}
+/*!
+ \qmlproperty string QtMultimedia::MediaPlayer::errorString
+
+ This property holds a string describing the current error condition in more
+ detail.
+*/
+
+/*!
+ \property string QtMultimedia::MediaPlayer::errorString
+ \brief This property holds a string describing the current error condition in
+ more detail.
+*/
QString QMediaPlayer::errorString() const
{
return d_func()->errorString;
}
/*!
- Start or resume playing the current source.
+ \qmlmethod QtMultimedia::MediaPlayer::play()
+
+ Starts or resumes playback of the media.
+
+ Sets the \l playbackState property to PlayingState.
*/
+/*!
+ Start or resume playing the current source.
+
+ \sa pause(), stop()
+*/
void QMediaPlayer::play()
{
Q_D(QMediaPlayer);
@@ -408,9 +505,18 @@ void QMediaPlayer::play()
}
/*!
- Pause playing the current source.
+ \qmlmethod QtMultimedia::MediaPlayer::pause()
+
+ Pauses playback of the media.
+
+ Sets the \l playbackState property to PausedState.
*/
+/*!
+ Pause playing the current source.
+
+ \sa play(), stop()
+*/
void QMediaPlayer::pause()
{
Q_D(QMediaPlayer);
@@ -420,9 +526,18 @@ void QMediaPlayer::pause()
}
/*!
- Stop playing, and reset the play position to the beginning.
+ \qmlmethod QtMultimedia::MediaPlayer::stop()
+
+ Stops playback of the media.
+
+ Sets the \l playbackState property to StoppedState.
*/
+/*!
+ Stop playing, and reset the play position to the beginning.
+
+ \sa play(), pause()
+*/
void QMediaPlayer::stop()
{
Q_D(QMediaPlayer);
@@ -450,6 +565,16 @@ void QMediaPlayer::setPlaybackRate(qreal rate)
}
/*!
+ \qmlproperty url QtMultimedia::MediaPlayer::source
+
+ This property holds the source URL of the media.
+
+ \snippet multimedia-snippets/qtvideosink.qml complete
+
+ \sa QMediaPlayer::setSource()
+*/
+
+/*!
Sets the current \a source.
Setting the media to a null QUrl will cause the player to discard all
@@ -507,13 +632,23 @@ void QMediaPlayer::setSourceDevice(QIODevice *device, const QUrl &sourceUrl)
}
/*!
- Sets the audio \a output device.
+ \qmlproperty QAudioOutput* QtMultimedia::MediaPlayer::audioOutput
- If \a output is \nullptr, sets the output to the system default output
- device.
+ This property holds the target audio output.
+ Accepts one AudioOutput elements.
- Listen for the audioOutputChanged() signal to be notified if the output is
- successfully changed.
+ \sa QMediaPlayer::setAudioOutput()
+*/
+
+
+/*!
+ \property QMediaPlayer::audioOutput
+ \brief The audio output device used by the media player.
+
+ The current audio output to be used when playing back media. Setting
+ a new audio output will replace the currently used output.
+
+ Setting this property to \c nullptr will disable any audio output.
*/
void QMediaPlayer::setAudioOutput(QAudioOutput *output)
{
@@ -532,6 +667,21 @@ QAudioOutput *QMediaPlayer::audioOutput() const
}
/*!
+ \qmlproperty QList<QMediaMetaData> QtMultimedia::MediaPlayer::audioTracks
+
+ This property holds a list of metadata.
+ Each index refers to an audio track.
+
+ The metadata holds 2 properties;
+ \list
+ \li \l{QtMultimedia::MediaPlayer::metaData.language}{Language}
+ \li \l{QtMultimedia::MediaPlayer::metaData.mediaType}{MimeType}
+ \endlist
+
+ \sa {MetaData}
+*/
+
+/*!
Lists the set of available audio tracks inside the media.
The QMediaMetaData returned describes the properties of individual
@@ -546,6 +696,21 @@ QList<QMediaMetaData> QMediaPlayer::audioTracks() const
}
/*!
+ \qmlproperty QList<QMediaMetaData> QtMultimedia::MediaPlayer::videoTracks
+
+ This property holds a list of metadata.
+ Each index refers to a video track.
+
+ The metadata holds 2 properties;
+ \list
+ \li \l{QtMultimedia::MediaPlayer::metaData.language}{Language}
+ \li \l{QtMultimedia::MediaPlayer::metaData.mediaType}{MimeType}
+ \endlist
+
+ \sa {MetaData}
+*/
+
+/*!
Lists the set of available video tracks inside the media.
The QMediaMetaData returned describes the properties of individual
@@ -558,6 +723,21 @@ QList<QMediaMetaData> QMediaPlayer::videoTracks() const
}
/*!
+ \qmlproperty QList<QMediaMetaData> QtMultimedia::MediaPlayer::subtitleTracks
+
+ This property holds a list of metadata.
+ Each index refers to a subtitle track.
+
+ The metadata holds 2 properties;
+ \list
+ \li \l{QtMultimedia::MediaPlayer::metaData.language}{Language}
+ \li \l{QtMultimedia::MediaPlayer::metaData.mediaType}{MimeType}
+ \endlist
+
+ \sa {MetaData}
+*/
+
+/*!
Lists the set of available subtitle tracks inside the media.
The QMediaMetaData returned describes the properties of individual
@@ -570,7 +750,21 @@ QList<QMediaMetaData> QMediaPlayer::subtitleTracks() const
}
/*!
- Returns the currently active audio track.
+ \qmlproperty int QtMultimedia::MediaPlayer::activeAudioTrack
+
+ This property holds the track number of the currently active audio track.
+ Set to \c{-1} to disable audio track.
+
+ The default property value is \c{0}: the first audio track.
+*/
+
+/*!
+ \property QMediaPlayer::activeAudioTrack
+ \brief Returns the currently active audio track.
+
+ By default, the first available audio track will be chosen.
+
+ Set \a index to \c -1 to disable all audio tracks.
*/
int QMediaPlayer::activeAudioTrack() const
{
@@ -581,7 +775,22 @@ int QMediaPlayer::activeAudioTrack() const
}
/*!
- Returns the currently active video track.
+ \since 6.2
+ \qmlproperty int QtMultimedia::MediaPlayer::activeVideoTrack
+
+ This property holds the track number of the currently active video audio track.
+ Set to \c{-1} to disable video track.
+
+ The default property value is \c{0}: the first video track.
+*/
+
+/*!
+ \property QMediaPlayer::activeVideoTrack
+ \brief Returns the currently active video track.
+
+ By default, the first available audio track will be chosen.
+
+ Set \a index to \c -1 to disable all video tracks.
*/
int QMediaPlayer::activeVideoTrack() const
{
@@ -592,7 +801,22 @@ int QMediaPlayer::activeVideoTrack() const
}
/*!
- Returns the currently active subtitle track.
+ \since 6.2
+ \qmlproperty int QtMultimedia::MediaPlayer::activeSubtitleTrack
+
+ This property holds the track number of the currently active subtitle track.
+ Set to \c{-1} to disable subtitle track.
+
+ The default property value is \c{-1}: no subtitles active.
+*/
+
+/*!
+ \property QMediaPlayer::activeSubtitleTrack
+ \brief Returns the currently active subtitle track.
+
+ Set \a index to \c -1 to disable subtitles.
+
+ Subtitles are disabled by default.
*/
int QMediaPlayer::activeSubtitleTrack() const
{
@@ -602,13 +826,6 @@ int QMediaPlayer::activeSubtitleTrack() const
return -1;
}
-/*!
- Sets the currently active audio track to one at the given \a index.
-
- By default, the first available audio track will be chosen.
-
- Set \a index to \c -1 to disable all audio tracks.
-*/
void QMediaPlayer::setActiveAudioTrack(int index)
{
Q_D(QMediaPlayer);
@@ -620,11 +837,6 @@ void QMediaPlayer::setActiveAudioTrack(int index)
d->control->setActiveTrack(QPlatformMediaPlayer::AudioStream, index);
}
-/*!
- Sets the currently active video track to one at the given \a index.
-
- By default, the first available video track will be chosen.
-*/
void QMediaPlayer::setActiveVideoTrack(int index)
{
Q_D(QMediaPlayer);
@@ -636,13 +848,6 @@ void QMediaPlayer::setActiveVideoTrack(int index)
d->control->setActiveTrack(QPlatformMediaPlayer::VideoStream, index);
}
-/*!
- Sets the currently active subtitle track to one at the given \a index.
-
- Set \a index to \c -1 to disable subtitles.
-
- Subtitles are disabled by default.
-*/
void QMediaPlayer::setActiveSubtitleTrack(int index)
{
Q_D(QMediaPlayer);
@@ -654,18 +859,31 @@ void QMediaPlayer::setActiveSubtitleTrack(int index)
d->control->setActiveTrack(QPlatformMediaPlayer::SubtitleStream, index);
}
+/*!
+ \qmlproperty QObject* QtMultimedia::MediaPlayer::videoOutput
+
+ This property holds the target video output.
+ Accepts one VideoOutput elements.
+
+ \sa QMediaPlayer::setVideoOutput()
+*/
+
+/*!
+ \property QMediaPlayer::videoOutput
+ \brief The video output to be used by the media player.
+
+ A media player can only have one video output attached, so
+ setting this property will replace the previously connected
+ video output.
+
+ Setting this property to \c nullptr will disable video output.
+*/
QObject *QMediaPlayer::videoOutput() const
{
Q_D(const QMediaPlayer);
return d->videoOutput;
}
-/*!
- Attach a video \a output to the media player.
-
- If the media player has already video output attached,
- it will be replaced with a new one.
-*/
void QMediaPlayer::setVideoOutput(QObject *output)
{
Q_D(QMediaPlayer);
@@ -756,6 +974,29 @@ QMediaMetaData QMediaPlayer::metaData() const
*/
/*!
+ \qmlproperty enumeration QtMultimedia::MediaPlayer::playbackState
+
+ This property holds the state of media playback. It can be one of the following:
+
+ \table
+ \header \li Property value
+ \li Description
+ \row \li PlayingState
+ \li The media is currently playing.
+ \row \li PausedState
+ \li Playback of the media has been suspended.
+ \row \li StoppedState
+ \li Playback of the media is yet to begin.
+ \endtable
+*/
+
+/*!
+ \qmlsignal QtMultimedia::MediaPlayer::playbackStateChanged()
+
+ This signal is emitted when the \l playbackState property is altered.
+*/
+
+/*!
\enum QMediaPlayer::MediaStatus
Defines the status of a media player's current media.
@@ -775,6 +1016,54 @@ QMediaMetaData QMediaPlayer::metaData() const
*/
/*!
+ \qmlproperty enumeration QtMultimedia::MediaPlayer::mediaStatus
+
+ This property holds the status of media loading. It can be one of the following:
+
+ \table
+ \header
+ \li Property value
+ \li Description
+ \row \li NoMedia
+ \li No media has been set.
+ \row \li LoadingMedia
+ \li The media is currently being loaded.
+ \row \li LoadedMedia
+ \li The media has been loaded.
+ \row \li BufferingMedia
+ \li The media is buffering data.
+ \row \li StalledMedia
+ \li Playback has been interrupted while the media is buffering data.
+ \row \li BufferedMedia
+ \li The media has buffered data.
+ \row \li EndOfMedia
+ \li The media has played to the end.
+ \row \li InvalidMedia
+ \li The media cannot be played.
+ \endtable
+*/
+
+/*!
+ \qmlproperty enumeration QtMultimedia::MediaPlayer::error
+
+ This property holds the error state of the audio. It can be one of the following.
+
+ \table
+ \header \li Value \li Description
+ \row \li NoError
+ \li There is no current error.
+ \row \li ResourceError
+ \li The audio cannot be played due to a problem allocating resources.
+ \row \li FormatError
+ \li The audio format is not supported.
+ \row \li NetworkError
+ \li The audio cannot be played due to network issues.
+ \row \li AccessDeniedError
+ \li The audio cannot be played due to insufficient permissions.
+ \endtable
+*/
+
+/*!
\enum QMediaPlayer::Error
Defines a media player error condition.
@@ -787,7 +1076,15 @@ QMediaMetaData QMediaPlayer::metaData() const
\value AccessDeniedError There are not the appropriate permissions to play a media resource.
*/
-// Signals
+/*!
+ \qmlsignal QtMultimedia::MediaPlayer::errorOccurred(error, errorString)
+
+ This signal is emitted when an \a error has occurred. The \a errorString
+ parameter may contain more detailed information about the error.
+
+ \sa QMediaPlayer::Error
+*/
+
/*!
\fn QMediaPlayer::errorOccurred(QMediaPlayer::Error error, const QString &errorString)
@@ -859,6 +1156,15 @@ QMediaMetaData QMediaPlayer::metaData() const
*/
/*!
+ \qmlproperty int QtMultimedia::MediaPlayer::duration
+
+ This property holds the duration of the media in milliseconds.
+
+ If the media doesn't have a fixed duration (a live stream for example) this
+ will be set to \c{0}.
+*/
+
+/*!
\property QMediaPlayer::duration
\brief the duration of the current media.
@@ -869,18 +1175,47 @@ QMediaMetaData QMediaPlayer::metaData() const
*/
/*!
+ \qmlproperty int QtMultimedia::MediaPlayer::position
+
+ The value is the current playback position, expressed in milliseconds since
+ the beginning of the media. Periodically changes in the position will be
+ indicated with the positionChanged() signal.
+
+ If the \l seekable property is true, this property can be set to milliseconds.
+*/
+
+/*!
\property QMediaPlayer::position
\brief the playback position of the current media.
The value is the current playback position, expressed in milliseconds since
the beginning of the media. Periodically changes in the position will be
- indicated with the signal positionChanged().
+ indicated with the positionChanged() signal.
+
+ If the \l seekable property is true, this property can be set to milliseconds.
*/
/*!
+ \qmlproperty real QtMultimedia::MediaPlayer::bufferProgress
+
+ 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.
+ When the buffer is filled, \c MediaPlayer.Buffered is true.
+ When buffer progress is between \c 0.0 and \c 0.1, \c MediaPlayer.Buffering
+ is set to \c{true}.
+
+ A value lower than \c 1.0 implies that the property \c MediaPlayer.StalledMedia
+ is \c{true}.
+
+ \sa mediaStatus
+ */
+
+/*!
\property QMediaPlayer::bufferProgress
\brief the percentage of the temporary buffer filled before playback begins or resumes, from
- \c 0 (empty) to \c 100 (full).
+ \c 0. (empty) to \c 1. (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%
@@ -912,6 +1247,12 @@ QMediaMetaData QMediaPlayer::metaData() const
*/
/*!
+ \qmlproperty bool QtMultimedia::MediaPlayer::seekable
+
+ This property holds whether the \l position of the media can be changed.
+*/
+
+/*!
\property QMediaPlayer::seekable
\brief the seek-able status of the current media
@@ -921,6 +1262,15 @@ QMediaMetaData QMediaPlayer::metaData() const
*/
/*!
+ \qmlproperty real QtMultimedia::MediaPlayer::playbackRate
+
+ This property holds the rate at which audio is played at as a multiple of
+ the normal rate.
+
+ Defaults to \c{1.0}.
+*/
+
+/*!
\property QMediaPlayer::playbackRate
\brief the playback rate of the current media.
diff --git a/src/multimediaquick/mediaplayer.qdoc b/src/multimediaquick/mediaplayer.qdoc
deleted file mode 100644
index d25089ee8..000000000
--- a/src/multimediaquick/mediaplayer.qdoc
+++ /dev/null
@@ -1,691 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \qmltype MediaPlayer
- \instantiates QMediaPlayer
- \brief Add media playback to a scene.
-
- \inqmlmodule QtMultimedia
- \ingroup multimedia_qml
- \ingroup multimedia_audio_qml
- \ingroup multimedia_video_qml
-
- \qml
- Text {
- text: "Click Me!";
- font.pointSize: 24;
- width: 150; height: 50;
-
- MediaPlayer {
- id: playMusic
- source: "music.wav"
- }
- MouseArea {
- id: playArea
- anchors.fill: parent
- onPressed: { playMusic.play() }
- }
- }
- \endqml
-
- You can use MediaPlayer by itself to play audio content, or you can use it
- in conjunction with a Multimedia::VideoOutput for rendering video.
-
- \qml
- Item {
- MediaPlayer {
- id: mediaplayer
- source: "groovy_video.mp4"
- }
-
- VideoOutput {
- anchors.fill: parent
- source: mediaplayer
- }
-
- MouseArea {
- id: playArea
- anchors.fill: parent
- onPressed: mediaplayer.play();
- }
- }
- \endqml
-
- \sa VideoOutput
-*/
-
-/*!
- \since 5.15
- \qmlproperty QObject* QtMultimedia::MediaPlayer::videoOutput
-
- This property holds the target video output.
- Accepts one VideoOutput elements.
-
- \snippet multimedia-snippets/multiple-videooutputs.qml
-
- \sa QMediaPlayer::setVideoOutput()
-*/
-
-/*!
- \qmlproperty QAudioOutput* QtMultimedia::MediaPlayer::audioOutput
-
- This property holds the target audio output.
- Accepts one AudioOutput elements.
-
-
- \sa QMediaPlayer::setAudioOutput()
-*/
-
-/*!
- \qmlproperty enumeration QtMultimedia::MediaPlayer::availability
-
- Returns the media player's state, which can be one of the following:
-
- \table
- \header \li State value \li Description
- \row \li Available
- \li The media player is available to use.
- \row \li Busy
- \li The media player is usually available, but some other
- process is utilizing the hardware necessary to play media.
- \row \li Unavailable
- \li There are no supported media playback facilities.
- \row \li ResourceMissing
- \li There is one or more resources missing, so the media player cannot
- be used. It may be possible to try again at a later time.
- \endtable
- */
-
-/*!
- \qmlproperty enumeration QtMultimedia::MediaPlayer::audioRole
-
- This property holds the role of the audio stream. It can be set to specify
- the type of audio being played, allowing the system to make appropriate
- decisions when it comes to volume, routing or post-processing.
-
- The audio role must be set before setting the source property.
-
- Supported values can be retrieved with supportedAudioRoles().
-
- The value for an audio role can be one of the following:
- \table
- \header \li Role \li Description
- \row \li UnknownRole
- \li The role is unknown or undefined.
- \row \li MusicRole
- \li For music.
- \row \li VideoRole
- \li Soundtrack from a movie or a video.
- \row \li VoiceCommunicationRole
- \li Voice communications, such as telephony.
- \row \li AlarmRole
- \li Alarms or timers.
- \row \li NotificationRole
- \li Notification, such as an incoming e-mail or a chat request.
- \row \li RingtoneRole
- \li For ringtones.
- \row \li AccessibilityRole
- \li For accessibility, such as a screen reader.
- \row \li SonificationRole
- \li \l{Sonification}, such as with user interface sounds.
- \row \li GameRole
- \li For game audio.
- \endtable
-
- \since 5.6
-*/
-
-/*!
- \qmlmethod list<int> QtMultimedia::MediaPlayer::supportedAudioRoles()
-
- Returns a list of supported audio roles.
-
- If setting the audio role is not supported, an empty list is returned.
-
- \since 5.6
- \sa audioRole
-*/
-
-/*!
- \qmlmethod QtMultimedia::MediaPlayer::play()
-
- Starts playback of the media.
-
- Sets the \l playbackState property to PlayingState.
-*/
-
-/*!
- \qmlmethod QtMultimedia::MediaPlayer::pause()
-
- Pauses playback of the media.
-
- Sets the \l playbackState property to PausedState.
-*/
-
-/*!
- \qmlmethod QtMultimedia::MediaPlayer::stop()
-
- Stops playback of the media.
-
- Sets the \l playbackState property to StoppedState.
-*/
-
-/*!
- \qmlproperty url QtMultimedia::MediaPlayer::source
-
- This property holds the source URL of the media.
-
- Since Qt 5.12.2, the url scheme \c gst-pipeline provides custom pipelines
- for the GStreamer backend.
-
- If the pipeline contains a \c qtvideosink element,
- the current VideoOutput will be used for rendering video.
-
- \snippet multimedia-snippets/qtvideosink.qml complete
-
- \sa QMediaPlayer::setMedia()
-*/
-
-/*!
- \qmlproperty int QtMultimedia::MediaPlayer::loops
-
- This property holds the number of times the media is played. A value of
- \c 0 or \c 1 means the media will be played only once.
- Set the property to \c MediaPlayer.Infinite to enable infinite looping.
-
- The value can be changed while the media is playing, in which case it will
- update the remaining loops to the new value.
-
- The default property value is \c{1}.
-*/
-
-/*!
- \qmlproperty bool QtMultimedia::MediaPlayer::autoLoad
-
- This property controls if loading of media should begin immediately.
-
- Defaults to \b{true}.
-
- If set to \c{false}, the media will not be loaded until playback is started.
-
- The value of autoLoad will be overwritten to true, if \l autoPlay is set
- to \b{true}.
-*/
-
-/*!
- \qmlsignal QtMultimedia::MediaPlayer::playbackStateChanged()
-
- This signal is emitted when the \l playbackState property is altered.
-*/
-
-/*!
- \qmlproperty enumeration QtMultimedia::MediaPlayer::status
-
- This property holds the status of media loading. It can be one of the
- following:
-
- \table
- \header
- \li Property value
- \li Description
- \row \li NoMedia
- \li No media has been set.
- \row \li Loading
- \li The media is currently being loaded.
- \row \li Loaded
- \li The media has been loaded.
- \row \li Buffering
- \li The media is buffering data.
- \row \li Stalled
- \li Playback has been interrupted while the media is buffering data.
- \row \li Buffered
- \li The media has buffered data.
- \row \li EndOfMedia
- \li The media has played to the end.
- \row \li InvalidMedia
- \li The media cannot be played.
- \row \li UnknownStatus
- \li The status of the media is unknown.
- \endtable
-*/
-
-/*!
- \qmlproperty enumeration QtMultimedia::MediaPlayer::playbackState
-
- This property holds the state of media playback.It can be one of the
- following:
-
- \table
- \header \li Property value
- \li Description
- \row \li PlayingState
- \li The media is currently playing.
- \row \li PausedState
- \li Playback of the media has been suspended.
- \row \li StoppedState
- \li Playback of the media is yet to begin.
- \endtable
-*/
-
-/*!
- \qmlproperty bool QtMultimedia::MediaPlayer::autoPlay
-
- This property controls whether the media will begin to play on start up.
-
- The property defaults to \c{false}.
-
- If autoPlay is set to \c{true}, the value of \l{autoLoad} will be overwritten
- to true.
-*/
-
-/*!
- \qmlproperty int QtMultimedia::MediaPlayer::duration
-
- This property holds the duration of the media in milliseconds.
-
- If the media doesn't have a fixed duration (a live stream for example) this
- will be set to \c{0}.
-*/
-
-/*!
- \qmlproperty int QtMultimedia::MediaPlayer::position
-
- This property holds the current playback position in milliseconds.
-
- If the \l seekable property is true, this property can be set to
- milliseconds.
-
- Setting the position may be asynchronous, so this may not be updated
- immediately.
-*/
-
-/*!
- \qmlproperty real QtMultimedia::MediaPlayer::volume
-
- This property holds the audio volume of the media player.
-
- The volume is scaled linearly from \c 0.0 (silence) to \c 1.0 (full volume).
- Values outside this range will be clamped: a value lower than 0.0 is set to
- 0.0, a value higher than 1.0 will set to 1.0.
-
- The default volume is \c{1.0}.
-
- UI \l{volume controls} should usually be scaled non-linearly. For example,
- using a logarithmic scale will produce linear changes in perceived \l{loudness},
- which is what a user would normally expect from a volume control.
-
- See \l {QAudio::convertVolume()}{QtMultimedia.convertVolume()}
- for more details.
-*/
-
-/*!
- \qmlproperty bool QtMultimedia::MediaPlayer::muted
-
- This property holds whether the audio output is muted.
-
- Defaults to \c{false}.
-*/
-
-/*!
- \qmlproperty bool QtMultimedia::MediaPlayer::hasAudio
-
- This property holds whether the media contains audio.
-*/
-
-/*!
- \qmlproperty bool QtMultimedia::MediaPlayer::hasVideo
-
- This property holds whether the media contains video.
-*/
-
-/*!
- \qmlproperty real QtMultimedia::MediaPlayer::bufferProgress
-
- 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.
- When the buffer is filled, \c MediaPlayer.Buffered is true.
- When buffer progress is between \c 0.0 and \c 0.1, \c MediaPlayer.Buffering
- is set to \c{true}.
-
- A value lower than \c 1.0 implies that the property \c MediaPlayer.Stalled
- is \c{true}.
-
- \sa status
-*/
-
-/*!
- \qmlproperty bool QtMultimedia::MediaPlayer::seekable
-
- This property holds whether position of the audio can be changed.
-
- If true, calling the \l setPosition() method will cause playback to seek to the new
- position.
-*/
-
-/*!
- \qmlproperty real QtMultimedia::MediaPlayer::playbackRate
-
- This property holds the rate at which audio is played at as a multiple of
- the normal rate.
-
- Defaults to \c{1.0}.
-*/
-
-/*!
- \qmlproperty enumeration QtMultimedia::MediaPlayer::error
-
- This property holds the error state of the audio. It can be one of the
- following.
-
- \table
- \header \li Value \li Description
- \row \li NoError
- \li There is no current error.
- \row \li ResourceError
- \li The audio cannot be played due to a problem allocating resources.
- \row \li FormatError
- \li The audio format is not supported.
- \row \li NetworkError
- \li The audio cannot be played due to network issues.
- \row \li AccessDenied
- \li The audio cannot be played due to insufficient permissions.
- \row \li ServiceMissing
- \li The audio cannot be played because the media service could not be
- instantiated.
- \endtable
-*/
-
-/*!
- \qmlproperty string QtMultimedia::MediaPlayer::errorString
-
- This property holds a string describing the current error condition in more
- detail.
-*/
-
-/*!
- \qmlsignal QtMultimedia::MediaPlayer::errorOccurred(error, errorString)
-
- This signal is emitted when an \a error has occurred. The \a errorString
- parameter may contain more detailed information about the error.
-
- \sa QMediaPlayer::Error
-*/
-
-/*!
- \qmlproperty variant QtMultimedia::MediaPlayer::mediaSource
-
- This property holds the native media object.
-
- It can be used to get a pointer to the QMediaPlayer object in order to
- integrate with C++ code.
-
- \code
- QObject *qmlMediaPlayer; // The QML MediaPlayer object
- QMediaPlayer *player = qvariant_cast<QMediaPlayer *>(qmlMediaPlayer->property("mediaSource"));
- \endcode
-
- \note This property is not accessible from QML.
-*/
-
-/*!
- \since 6.2
- \qmlproperty int QtMultimedia::MediaPlayer::activeAudioTrack
-
- This property holds the track number of the currently active audio track.
- Set to \c{-1} to disable audio track.
-
- The default property value is \c{0}: the first audio track.
-*/
-
-/*!
- \since 6.2
- \qmlproperty int QtMultimedia::MediaPlayer::activeVideoTrack
-
- This property holds the track number of the currently active video audio track.
- Set to \c{-1} to disable video track.
-
- The default property value is \c{0}: the first video track.
-*/
-
-/*!
- \since 6.2
- \qmlproperty int QtMultimedia::MediaPlayer::activeSubtitleTrack
-
- This property holds the track number of the currently active subtitle track.
- Set to \c{-1} to disable subtitle track.
-
- The default property value is \c{-1}: no subtitles active.
-*/
-
-/*!
- \since 6.2
- \qmlproperty QList<QMediaMetaData> QtMultimedia::MediaPlayer::audioTracks
-
- This property holds a list of metadata.
- Each index refers to a audio track.
-
- The metadata holds 2 properties;
- \list
- \li \l{QtMultimedia::MediaPlayer::metaData.language}{Language}
- \li \l{QtMultimedia::MediaPlayer::metaData.mediaType}{MimeType}
- \endlist
-
- \sa {MetaData}
-*/
-
-/*!
- \since 6.2
- \qmlproperty QList<QMediaMetaData> QtMultimedia::MediaPlayer::videoTracks
-
- This property holds a list of metadata.
- Each index refers to a video track.
-
- The metadata holds 2 properties;
- \list
- \li \l{QtMultimedia::MediaPlayer::metaData.language}{Language}
- \li \l{QtMultimedia::MediaPlayer::metaData.mediaType}{MimeType}
- \endlist
-
- \sa {MetaData}
-*/
-
-/*!
- \since 6.2
- \qmlproperty QList<QMediaMetaData> QtMultimedia::MediaPlayer::subtitleTracks
-
- This property holds a list of metadata.
- Each index refers to a subtitle track.
-
- The metadata holds 2 properties;
- \list
- \li \l{QtMultimedia::MediaPlayer::metaData.language}{Language}
- \li \l{QtMultimedia::MediaPlayer::metaData.mediaType}{MimeType}
- \endlist
-
- \sa {MetaData}
-*/
-
-/*!
- \qmlpropertygroup QtMultimedia::MediaPlayer::metaData
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.title
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.subTitle
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.author
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.comment
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.description
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.category
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.genre
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.year
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.date
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.userRating
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.keywords
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.language
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.publisher
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.copyright
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.parentalRating
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.ratingOrganization
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.size
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.mediaType
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.audioBitRate
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.audioCodec
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.averageLevel
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.channelCount
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.peakValue
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.sampleRate
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.albumTitle
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.albumArtist
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.contributingArtist
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.composer
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.conductor
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.lyrics
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.mood
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.trackNumber
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.trackCount
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.coverArtUrlSmall
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.coverArtUrlLarge
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.resolution
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.videoFrameRate
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.videoBitRate
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.videoCodec
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.posterUrl
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.chapterNumber
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.director
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.leadPerformer
- \qmlproperty variant QtMultimedia::MediaPlayer::metaData.writer
-
- These properties hold the meta data for the current media.
-
- \table
- \header \li Property name
- \li Description
- \row \li \c metaData.title
- \li The title of the media.
- \row \li \c metaData.subTitle
- \li The sub-title of the media.
- \row \li \c metaData.author
- \li The author of the media.
- \row \li \c metaData.comment
- \li A user comment about the media.
- \row \li \c metaData.description
- \li A description of the media.
- \row \li \c metaData.category
- \li The category of the media.
- \row \li \c metaData.genre
- \li The genre of the media.
- \row \li \c metaData.year
- \li The year of release of the media.
- \row \li \c metaData.date
- \li The date of the media.
- \row \li \c metaData.userRating
- \li A user rating of the media in the range of 0 to 100.
- \row \li \c metaData.keywords
- \li A list of keywords describing the media.
- \row \li \c metaData.language
- \li The language of the media, as an \l{ISO 639-2 code}.
- \row \li \c metaData.publisher
- \li The publisher of the media.
- \row \li \c metaData.copyright
- \li The media's copyright notice.
- \row \li \c metaData.parentalRating
- \li The parental rating of the media.
- \row \li \c metaData.ratingOrganization
- \li The name of the rating organization responsible for the parental rating
- of the media.
- \row \li \c metaData.size
- \li The size of the media in bytes.
- \row \li \c metaData.mediaType
- \li The type of the media.
- \row \li \c metaData.audioBitRate
- \li The bit rate of the media's audio stream in bits per second.
- \row \li \c metaData.audioCodec
- \li The encoding of the media audio stream.
- \row \li \c metaData.averageLevel
- \li The average volume level of the media.
- \row \li \c metaData.channelCount
- \li The number of channels in the media's audio stream.
- \row \li \c metaData.peakValue
- \li The peak volume of media's audio stream.
- \row \li \c metaData.sampleRate
- \li The sample rate of the media's audio stream in hertz.
- \row \li \c metaData.albumTitle
- \li The title of the album the media belongs to.
- \row \li \c metaData.albumArtist
- \li The name of the principal artist of the album the media belongs to.
- \row \li \c metaData.contributingArtist
- \li The names of artists contributing to the media.
- \row \li \c metaData.composer
- \li The composer of the media.
- \row \li \c metaData.conductor
- \li The conductor of the media.
- \row \li \c metaData.lyrics
- \li The lyrics to the media.
- \row \li \c metaData.mood
- \li The mood of the media.
- \row \li \c metaData.trackNumber
- \li The track number of the media.
- \row \li \c metaData.trackCount
- \li The number of tracks on the album containing the media.
- \row \li \c metaData.coverArtUrlSmall
- \li The URL of a small cover art image.
- \row \li \c metaData.coverArtUrlLarge
- \li The URL of a large cover art image.
- \row \li \c metaData.resolution
- \li The dimension of an image or video.
- \row \li \c metaData.videoFrameRate
- \li The frame rate of the media's video stream.
- \row \li \c metaData.videoBitRate
- \li The bit rate of the media's video stream in bits per second.
- \row \li \c metaData.videoCodec
- \li The encoding of the media's video stream.
- \row \li \c metaData.posterUrl
- \li The URL of a poster image.
- \row \li \c metaData.chapterNumber
- \li The chapter number of the media.
- \row \li \c metaData.director
- \li The director of the media.
- \row \li \c metaData.leadPerformer
- \li The lead performer in the media.
- \row \li \c metaData.writer
- \li The writer of the media.
- \endtable
-
- \sa {QMediaMetaData}
-*/
diff --git a/src/multimediaquick/qquickvideooutput.cpp b/src/multimediaquick/qquickvideooutput.cpp
index b49a6f249..f25ab0c84 100644
--- a/src/multimediaquick/qquickvideooutput.cpp
+++ b/src/multimediaquick/qquickvideooutput.cpp
@@ -93,7 +93,6 @@ inline int qNormalizedOrientation(int o)
MediaPlayer {
id: player
source: "file://video.webm"
- autoPlay: true
}
VideoOutput {