From e22ddea9d62d84a4b28b2395d4f259dd1d4b1094 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 9 Sep 2021 14:56:54 +0200 Subject: Doc: Fix various documentation issues * Fix linking issues * Document all QMediaFormat::AudioCodec enum values * Fix example \quotefromfile paths * Document QMediaFormat::ResolveFlags * Drop links to removed classes/functions Pick-to: 6.2 6.2.0 Fixes: QTBUG-96340 Change-Id: Iae82295e9cd396b392af2e577b21158ad1509fd3 Reviewed-by: Lars Knoll --- src/multimedia/camera/qimagecapture.cpp | 4 ++- src/multimedia/doc/qtmultimedia.qdocconf | 2 +- .../doc/src/examples/video-qml-paint-rate.qdocinc | 6 ++-- src/multimedia/doc/src/qm-external-pages.qdoc | 15 +++++++++ src/multimedia/platform/qplatformaudiodecoder.cpp | 5 +-- src/multimedia/platform/qplatformmediaencoder.cpp | 2 +- src/multimedia/qmediaformat.cpp | 38 +++++++++++++++------- src/multimedia/qmediametadata.cpp | 15 +++++---- src/multimedia/recording/qmediarecorder.cpp | 4 +-- src/multimedia/video/qvideoframeformat.cpp | 3 +- src/multimedia/video/qvideosink.cpp | 4 +-- src/multimedia/video/qvideowindow.cpp | 1 + 12 files changed, 63 insertions(+), 36 deletions(-) (limited to 'src/multimedia') diff --git a/src/multimedia/camera/qimagecapture.cpp b/src/multimedia/camera/qimagecapture.cpp index eedb7ecbb..7b8473c7a 100644 --- a/src/multimedia/camera/qimagecapture.cpp +++ b/src/multimedia/camera/qimagecapture.cpp @@ -244,7 +244,9 @@ void QImageCapture::addMetaData(const QMediaMetaData &metaData) } /*! - Returns true if the camera is ready to capture an image immediately. + \property QImageCapture::readyForCapture + + Holds \c true if the camera is ready to capture an image immediately. Calling capture() while \c readyForCapture is \c false is not permitted and results in an error. */ diff --git a/src/multimedia/doc/qtmultimedia.qdocconf b/src/multimedia/doc/qtmultimedia.qdocconf index 7e9a97b54..9032c1bb7 100644 --- a/src/multimedia/doc/qtmultimedia.qdocconf +++ b/src/multimedia/doc/qtmultimedia.qdocconf @@ -59,7 +59,7 @@ sourcedirs += ../.. excludedirs += ../../gsttools -depends += qtcore qtdoc qtgui qtquick qtqml qtwidgets qtnetwork +depends += qtcore qtdoc qtgui qtquick qtqml qtwidgets qtnetwork qmake qtcmake navigation.landingpage = "Qt Multimedia" navigation.cppclassespage = "Qt Multimedia C++ Classes" diff --git a/src/multimedia/doc/src/examples/video-qml-paint-rate.qdocinc b/src/multimedia/doc/src/examples/video-qml-paint-rate.qdocinc index 533bdf37f..f531e613a 100644 --- a/src/multimedia/doc/src/examples/video-qml-paint-rate.qdocinc +++ b/src/multimedia/doc/src/examples/video-qml-paint-rate.qdocinc @@ -24,8 +24,8 @@ The FrequencyMonitor class is exposed to QML like this \printuntil } and its data is displayed by defining a QML item called FrequencyItem, like this: -qmlvideo\qml\frequencymonitor -\quotefromfile multimedia/video/qmlvideo/frequencymonitor/qml/frequencymonitor/FrequencyItem.qml + +\quotefromfile multimedia/video/qmlvideo/qml/frequencymonitor/FrequencyItem.qml \skipto import FrequencyMonitor \printuntil id: root \dots @@ -39,5 +39,3 @@ qmlvideo\qml\frequencymonitor The result looks like this: \image video-qml-paint-rate.png - - diff --git a/src/multimedia/doc/src/qm-external-pages.qdoc b/src/multimedia/doc/src/qm-external-pages.qdoc index 5f0f45629..97964b059 100644 --- a/src/multimedia/doc/src/qm-external-pages.qdoc +++ b/src/multimedia/doc/src/qm-external-pages.qdoc @@ -111,6 +111,11 @@ \title Advanced Audio Coding */ +/*! + \externalpage https://en.wikipedia.org/wiki/ALAC + \title Apple Lossless Audio Codec +*/ + /*! \externalpage https://en.wikipedia.org/wiki/Matroska \title Matroska (MKV) @@ -171,6 +176,16 @@ \title Dolby Digital */ +/*! + \externalpage https://en.wikipedia.org/wiki/Dolby_Digital_Plus + \title Dolby Digital Plus (EAC3) +*/ + +/*! + \externalpage https://en.wikipedia.org/wiki/Opus_(audio_format) + \title Opus Audio Format +*/ + /*! \externalpage https://en.wikipedia.org/wiki/Dolby_TrueHD \title Dolby TrueHD diff --git a/src/multimedia/platform/qplatformaudiodecoder.cpp b/src/multimedia/platform/qplatformaudiodecoder.cpp index 76b376078..61492defb 100644 --- a/src/multimedia/platform/qplatformaudiodecoder.cpp +++ b/src/multimedia/platform/qplatformaudiodecoder.cpp @@ -109,8 +109,7 @@ QPlatformAudioDecoder::QPlatformAudioDecoder(QAudioDecoder *parent) Stops playback of the current media and discards any buffers. - If successful the player control will immediately enter the \l {QAudioDecoder::StoppedState} - {stopped} state. + If successful, the player control will immediately stop decoding. */ /*! @@ -172,8 +171,6 @@ void QPlatformAudioDecoder::sourceChanged() \fn QPlatformAudioDecoder::formatChanged(const QAudioFormat &format) Signals that the current audio format of the decoder has changed to \a format. - - \sa audioFormat(), setAudioFormat() */ void QPlatformAudioDecoder::formatChanged(const QAudioFormat &format) { diff --git a/src/multimedia/platform/qplatformmediaencoder.cpp b/src/multimedia/platform/qplatformmediaencoder.cpp index a4001b762..b803740c3 100644 --- a/src/multimedia/platform/qplatformmediaencoder.cpp +++ b/src/multimedia/platform/qplatformmediaencoder.cpp @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE functionality. This control provides a means to set the \l {outputLocation()}{output location}, - and record, pause and stop recording via the \l setState() method. It also + and record(), pause(), resume(), and stop() recording. It also provides feedback on the \l {duration()}{duration} of the recording. \sa QMediaRecorder diff --git a/src/multimedia/qmediaformat.cpp b/src/multimedia/qmediaformat.cpp index 2df37ce52..e464195bb 100644 --- a/src/multimedia/qmediaformat.cpp +++ b/src/multimedia/qmediaformat.cpp @@ -48,13 +48,12 @@ QT_BEGIN_NAMESPACE \ingroup multimedia \inmodule QtMultimedia \brief Describes an encoding format for a multimedia file or stream. + \since 6.2 QMediaFormat describes an encoding format for a multimedia file or stream. You can check whether a certain media format can be used for encoding or decoding using QMediaFormat. - - \since 6.2 */ namespace { @@ -174,7 +173,7 @@ QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QMediaFormatPrivate); /*! \enum QMediaFormat::AudioCodec - Describes the audio coded used in multimedia file or stream. + Describes the audio codec used in multimedia file or stream. \value WMA \l {Windows Media Audio} @@ -183,9 +182,11 @@ QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QMediaFormatPrivate); \value AAC \l{Advanced Audio Coding} \value ALAC - Apple Lossless Audio Codec + \l{Apple Lossless Audio Codec} \value DolbyTrueHD \l{Dolby TrueHD} + \value EAC3 + \l {Dolby Digital Plus (EAC3)} \value MP3 \l{MPEG-1 Audio Layer III or MPEG-2 Audio Layer III} \value Wave @@ -195,9 +196,7 @@ QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QMediaFormatPrivate); \value FLAC \l{Free Lossless Audio Codec} \value Opus - Voice-over-IP codec - \value EAC - Enhanced Audio Codec + \l{Opus Audio Format} \value Unspecified Unspecified codec @@ -322,7 +321,7 @@ QMediaFormat &QMediaFormat::operator=(const QMediaFormat &other) noexcept = defa */ /*! - Returns true if Qt Multimedia can encode or decode this format, + Returns \c true if Qt Multimedia can encode or decode this format, depending on \a mode. */ @@ -349,7 +348,7 @@ static QPlatformMediaFormatInfo *formatInfo() } /*! - The function returns a list of file formats for the audio and video + Returns a list of file formats for the audio and video codec indicated by \a{m}. To get all supported file formats, run this query on a default constructed @@ -362,7 +361,7 @@ QList QMediaFormat::supportedFileFormats(QMediaFormat: } /*! - The function returns a list of video codecs for the chosen file format and + Returns a list of video codecs for the chosen file format and audio codec (\a m). To get all supported video codecs, run this query on a default constructed @@ -376,7 +375,7 @@ QList QMediaFormat::supportedVideoCodecs(QMediaFormat: /*! - The function returns a list of audio codecs for the chosen file format and + Returns a list of audio codecs for the chosen file format and video codec (\a m). To get all supported audio codecs, run this query on a default constructed @@ -517,7 +516,22 @@ bool QMediaFormat::operator==(const QMediaFormat &other) const } /*! - Resolves the format to a format that is supported by QMediaRecorder. + \enum QMediaFormat::ResolveFlags + + Describes the requirements for resolving a suitable format for + QMediaRecorder. + + \value NoFlags + No requirements + \value RequiresVideo + A video codec is required + + \sa resolveForEncoding() +*/ + +/*! + Resolves the format, based on \a flags, to a format that is supported by + QMediaRecorder. This method tries to find the best possible match for unspecified settings. Settings that are not supported by the recorder will be modified to the closest diff --git a/src/multimedia/qmediametadata.cpp b/src/multimedia/qmediametadata.cpp index c80a2ef32..cc580b482 100644 --- a/src/multimedia/qmediametadata.cpp +++ b/src/multimedia/qmediametadata.cpp @@ -109,6 +109,7 @@ QT_BEGIN_NAMESPACE /*! \qmltype MetaData + \inqmlmodule QtMultimedia \since 6.2 \instantiates QMediaMetaData \brief Provides meta-data for media files. @@ -234,7 +235,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn bool QMediaMetaData::isEmpty() + \fn bool QMediaMetaData::isEmpty() const Returns \c true if the meta data contains no items: otherwise returns \c{false}. */ @@ -273,7 +274,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QList QMediaMetaData::keys() + \fn QMediaMetaData::keys() const Returns a QList of QMediaMetaData::Keys. */ @@ -416,7 +417,7 @@ QString QMediaMetaData::metaDataKeyToString(QMediaMetaData::Key key) // operator documentation /*! \fn QVariant &QMediaMetaData ::operator[](QMediaMetaData::Key k) - The \c [] operator returns data stored at the Key \a{k}. + Returns data stored at the Key \a{k}. \code QMediaMetaData rockBallad1; rockBalad[QMediaMetaData::Genre]="Rock" @@ -425,19 +426,19 @@ QString QMediaMetaData::metaDataKeyToString(QMediaMetaData::Key key) /*! \fn bool QMediaMetaData::operator==(const QMediaMetaData &a, const QMediaMetaData &b) - The \c == operator will compare two meta data objects, and return + Compares two meta data objects \a a and \a b, and returns \c true if they are identical or \c false if they differ. */ /*! \fn bool QMediaMetaData::operator!=(const QMediaMetaData &a, const QMediaMetaData &b) - The \c != operator will compare two meta data objects, and return + Compares two meta data objects \a a and \a b, and returns \c false if they are identical or \c true if they differ. */ /*! -\property QHash QMediaMetaData::data - This property holds the metaData. + \variable QMediaMetaData::data + \brief the meta data. \note this is a \c protected member of its class. */ diff --git a/src/multimedia/recording/qmediarecorder.cpp b/src/multimedia/recording/qmediarecorder.cpp index 1f6ba06f7..c90c88ba2 100644 --- a/src/multimedia/recording/qmediarecorder.cpp +++ b/src/multimedia/recording/qmediarecorder.cpp @@ -195,7 +195,7 @@ void QMediaRecorder::setCaptureSession(QMediaCaptureSession *session) The location can be relative or empty. If empty the recorder uses the system specific place and file naming scheme. - \sa errorOccured() + \sa errorOccurred() */ /*! @@ -581,7 +581,7 @@ QMediaCaptureSession *QMediaRecorder::captureSession() const return d->captureSession; } /*! - \qmlproprty enumeration QtMultimedia::MediaRecorder::quality + \qmlproperty enumeration QtMultimedia::MediaRecorder::quality Enumerates quality encoding levels. diff --git a/src/multimedia/video/qvideoframeformat.cpp b/src/multimedia/video/qvideoframeformat.cpp index 9685aac19..a2833828d 100644 --- a/src/multimedia/video/qvideoframeformat.cpp +++ b/src/multimedia/video/qvideoframeformat.cpp @@ -290,8 +290,7 @@ QVideoFrameFormat::QVideoFrameFormat() } /*! - Constructs a description of stream which receives stream of \a d type buffers with given frame - \a size and pixel \a format. + Constructs a video stream with the given frame \a size and pixel \a format. */ QVideoFrameFormat::QVideoFrameFormat( const QSize& size, QVideoFrameFormat::PixelFormat format) diff --git a/src/multimedia/video/qvideosink.cpp b/src/multimedia/video/qvideosink.cpp index e84330535..8e2637a1f 100644 --- a/src/multimedia/video/qvideosink.cpp +++ b/src/multimedia/video/qvideosink.cpp @@ -166,7 +166,7 @@ QVideoFrame QVideoSink::videoFrame() const } /*! - Sets the current video frame. + Sets the current video \a frame. */ void QVideoSink::setVideoFrame(const QVideoFrame &frame) { @@ -182,7 +182,7 @@ QString QVideoSink::subtitleText() const } /*! - Sets the current subtitle text. + Sets the current \a subtitle text. */ void QVideoSink::setSubtitleText(const QString &subtitle) { diff --git a/src/multimedia/video/qvideowindow.cpp b/src/multimedia/video/qvideowindow.cpp index 56b2281c8..f0ae26b98 100644 --- a/src/multimedia/video/qvideowindow.cpp +++ b/src/multimedia/video/qvideowindow.cpp @@ -451,6 +451,7 @@ void QVideoWindowPrivate::render() /*! \class QVideoWindow + \internal */ QVideoWindow::QVideoWindow(QScreen *screen) : QWindow(screen) -- cgit v1.2.3