From 87143a294566ca12331d15d8afb0423462be7047 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 17 Sep 2021 12:55:03 +0200 Subject: Add some basic docs for the media player and recorder examples Hook up those examples in the correct places, remove a stale link to the qmlvideofx example and fix the highlighted examples list to include four examples, showing playback and capture for both C++ and QML. Change-Id: I79177b7f398c418ab3ba723e9ff2cd5ef3de1cf6 Reviewed-by: Nicholas Bennett (cherry picked from commit d750ae98cd3b13d96eb9865a1eb0ec328278de14) Reviewed-by: Qt Cherry-pick Bot --- .../mediaplayer/doc/images/qmlmediaplayer.jpg | Bin 0 -> 152556 bytes .../video/mediaplayer/doc/src/mediaplayer.qdoc | 48 +++++++++++++++++++++ .../video/recorder/doc/images/qmlrecorder.jpg | Bin 0 -> 132255 bytes .../video/recorder/doc/src/recorder.qdoc | 46 ++++++++++++++++++++ .../multimediawidgets/camera/doc/src/camera.qdoc | 3 +- .../multimediawidgets/player/doc/src/player.qdoc | 3 +- src/multimedia/doc/qtmultimedia.qdocconf | 6 ++- src/multimedia/doc/src/multimedia-overview.qdoc | 20 +++------ src/multimedia/doc/src/videooverview.qdoc | 9 ++-- 9 files changed, 111 insertions(+), 24 deletions(-) create mode 100644 examples/multimedia/video/mediaplayer/doc/images/qmlmediaplayer.jpg create mode 100644 examples/multimedia/video/mediaplayer/doc/src/mediaplayer.qdoc create mode 100644 examples/multimedia/video/recorder/doc/images/qmlrecorder.jpg create mode 100644 examples/multimedia/video/recorder/doc/src/recorder.qdoc diff --git a/examples/multimedia/video/mediaplayer/doc/images/qmlmediaplayer.jpg b/examples/multimedia/video/mediaplayer/doc/images/qmlmediaplayer.jpg new file mode 100644 index 000000000..ee79c07b3 Binary files /dev/null and b/examples/multimedia/video/mediaplayer/doc/images/qmlmediaplayer.jpg differ diff --git a/examples/multimedia/video/mediaplayer/doc/src/mediaplayer.qdoc b/examples/multimedia/video/mediaplayer/doc/src/mediaplayer.qdoc new file mode 100644 index 000000000..6afae93f3 --- /dev/null +++ b/examples/multimedia/video/mediaplayer/doc/src/mediaplayer.qdoc @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** 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 Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example multimedia/video/mediaplayer + \title QML Media Player Example + \ingroup multimedia_examples + \ingroup video_examples_qml + \brief Playing audio and video using Qt Quick. + \meta {tag} {quick} + + \image qmlmediaplayer.jpg + + \e{QML Media Player} demonstrates a simple multimedia player that can play + audio and or video files using various codecs. + + \include examples-run.qdocinc + + The example uses the QML MediaPlayer object connected to a VideoOutput to + play back the video. + + The example shows usage of some advanced features such as selection of audio + or subtitle tracks. +*/ diff --git a/examples/multimedia/video/recorder/doc/images/qmlrecorder.jpg b/examples/multimedia/video/recorder/doc/images/qmlrecorder.jpg new file mode 100644 index 000000000..b690d1023 Binary files /dev/null and b/examples/multimedia/video/recorder/doc/images/qmlrecorder.jpg differ diff --git a/examples/multimedia/video/recorder/doc/src/recorder.qdoc b/examples/multimedia/video/recorder/doc/src/recorder.qdoc new file mode 100644 index 000000000..9ced09e74 --- /dev/null +++ b/examples/multimedia/video/recorder/doc/src/recorder.qdoc @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** 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 Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example multimedia/video/recorder + \title QML Recorder Example + \ingroup multimedia_examples + \ingroup video_examples_qml + \ingroup camera_examples_qml + \brief Recording audio and video using Qt Quick. + \meta {tag} {quick} + + \image qmlrecorder.jpg + + \e{QML Recorder} demonstrates a simple application that can record + audio and or video files using the camera and microphone. + + \include examples-run.qdocinc + + The example uses the QML Camera and AudioInput objects connected to a MediaCaptureSession. + A MediaRecorder object is then used to record the captured audio and video. +*/ diff --git a/examples/multimediawidgets/camera/doc/src/camera.qdoc b/examples/multimediawidgets/camera/doc/src/camera.qdoc index b8b9730d2..1378e1e87 100644 --- a/examples/multimediawidgets/camera/doc/src/camera.qdoc +++ b/examples/multimediawidgets/camera/doc/src/camera.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -29,6 +29,7 @@ \example multimediawidgets/camera \title Camera Example \ingroup multimedia_examples +\ingroup video_examples \ingroup camera_examples \meta {tag} {widgets} \brief Shows how to capture a still image or record video. diff --git a/examples/multimediawidgets/player/doc/src/player.qdoc b/examples/multimediawidgets/player/doc/src/player.qdoc index 9cdc84b07..dad969375 100644 --- a/examples/multimediawidgets/player/doc/src/player.qdoc +++ b/examples/multimediawidgets/player/doc/src/player.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -29,6 +29,7 @@ \example multimediawidgets/player \title Media Player Example \ingroup multimedia_examples + \ingroup video_examples \brief Playing audio and video. \meta {tag} {widgets} diff --git a/src/multimedia/doc/qtmultimedia.qdocconf b/src/multimedia/doc/qtmultimedia.qdocconf index 7e9a97b54..09af5077a 100644 --- a/src/multimedia/doc/qtmultimedia.qdocconf +++ b/src/multimedia/doc/qtmultimedia.qdocconf @@ -48,8 +48,10 @@ exampledirs += ../../../examples \ snippets \ ../../multimediawidgets/doc/snippets -manifestmeta.highlighted.names = "QtMultimedia/QML Video Shader Effects Example" \ - "QtMultimedia/Media Player Example" +manifestmeta.highlighted.names = "QtMultimedia/QML Media Player Example" \ + "QtMultimedia/Media Player Example" \ + "QtMultimedia/Camera Example" \ + "QtMultimedia/QML Recorder Example" \ headerdirs += ../.. diff --git a/src/multimedia/doc/src/multimedia-overview.qdoc b/src/multimedia/doc/src/multimedia-overview.qdoc index b7e6c92dc..07f5bbc7c 100644 --- a/src/multimedia/doc/src/multimedia-overview.qdoc +++ b/src/multimedia/doc/src/multimedia-overview.qdoc @@ -119,36 +119,26 @@ For some quick recipes, see this table: \row \li Video Playback \li \l{Media Player Example}{player}, + \l{QML Media Player Example}{mediaplayer} \l{QML Video Example}{qmlvideo}, - \l{QML Video Shader Effects Example}{qmlvideofx} \li \l MediaPlayer, \l VideoOutput, \l Video \li QMediaPlayer, QVideoWidget, QGraphicsVideoItem \row - \li Video Processing - \li \l {QML Video Example}{qmlvideofx} - \li \l {MediaPlayer}, \l VideoOutput - \li QMediaPlayer, QVideoFrame - \row - \li Accessing camera viewfinder + \li Capturing audio and video \li \l {Camera Example}{camera}, - \l {QML Camera Example}{declarative-camera} + \l {QML Recorder Example}{recorder} \li \l Camera, \l VideoOutput \li QCamera, QVideoWidget, QGraphicsVideoItem - \row - \li Viewfinder processing - \li - \li \l Camera, \l VideoOutput - \li QCamera, QVideoFrame \row \li Capturing photos \li \l {Camera Example}{camera}, - \l {QML Camera Example}{declarative-camera} + \l {QML Recorder Example}{recorder} \li \l Camera \li QCamera, QImageCapture \row \li Capturing movies \li \l {Camera Example}{camera}, - \l {QML Camera Example}{declarative-camera} + \l {QML Recorder Example}{recorder} \li \l Camera \li QCamera, QMediaRecorder \endtable diff --git a/src/multimedia/doc/src/videooverview.qdoc b/src/multimedia/doc/src/videooverview.qdoc index a842db6b6..1856fe2ac 100644 --- a/src/multimedia/doc/src/videooverview.qdoc +++ b/src/multimedia/doc/src/videooverview.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -56,10 +56,9 @@ And an example with QGraphicsVideoItem: You can use \l VideoOutput to render content that is provided by either a \l MediaPlayer or a \l Camera. The VideoOutput is a visual -component that can be transformed or acted upon by shaders (as the -\l {QML Video Shader Effects Example} shows), while all media decoding -and playback control is handled by the \l MediaPlayer or \l CaptureSession. -\l Video has also been provided for convenience. +component that can be embedded into a QQuickScene or \l Window, while +all media decoding and playback control is handled by the \l MediaPlayer +or \l CaptureSession. \l Video has also been provided for convenience. \section2 Working with Low Level Video Frames -- cgit v1.2.3