Doc: Updated the \example and \snippet paths

Also:
- Grouped the example docs under one group. i.e. multimedia-examples
- Moved the \group page here from the qtdoc repo
- Moved the snippets directory under doc from doc/src

Change-Id: I28fb81cf910e58101cd601fb4c440b59b0b0366d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This commit is contained in:
Venugopal Shivashankar
2012-12-12 16:35:15 +01:00
committed by The Qt Project
parent 5cd23af26c
commit 0241b0e39c
36 changed files with 133 additions and 117 deletions

View File

@@ -26,9 +26,9 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example audiodevices \example multimedia/audiodevices
\title Audio Devices Example \title Audio Devices Example
\ingroup audio_examples \ingroup multimedia_examples
\brief The Audio Devices example shows the application of the audio devices APIs \brief The Audio Devices example shows the application of the audio devices APIs

View File

@@ -26,9 +26,9 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example audioengine \example multimedia/audioengine
\title AudioEngine Example \title AudioEngine Example
\ingroup audioengine_examples \ingroup multimedia_examples
\brief The Audio Engine example demonstrates 3D sound control using \brief The Audio Engine example demonstrates 3D sound control using
the QtAudioEngine API. the QtAudioEngine API.

View File

@@ -26,9 +26,9 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example audioinput \example multimedia/audioinput
\title Audio Input Example \title Audio Input Example
\ingroup audio_examples \ingroup multimedia_examples
\brief The Audio Input Example shows the use of the QAudioInput class. \brief The Audio Input Example shows the use of the QAudioInput class.
The example demonstrates the basic use cases of the QAudioInput class. The example demonstrates the basic use cases of the QAudioInput class.

View File

@@ -26,9 +26,9 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example audiooutput \example multimedia/audiooutput
\title Audio Output Example \title Audio Output Example
\ingroup audio_examples \ingroup multimedia_examples
\brief The Audio Output Example show the use of the QAudioOutput API. \brief The Audio Output Example show the use of the QAudioOutput API.
The example demonstrates the basic use cases of the QAudioOutput class. The example demonstrates the basic use cases of the QAudioOutput class.

View File

@@ -26,9 +26,9 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example audiorecorder \example multimedia/audiorecorder
\title Audio Recorder Example \title Audio Recorder Example
\ingroup audio_examples \ingroup multimedia_examples
\brief The Audio Recorder Example shows how to create a simple audio recorder. \brief The Audio Recorder Example shows how to create a simple audio recorder.
It demonstrates the discovery of the supported devices and codecs and the use It demonstrates the discovery of the supported devices and codecs and the use
@@ -95,10 +95,6 @@
\code \code
ui->statusbar->showMessage(tr("Recorded %1 sec").arg(duration / 1000)); ui->statusbar->showMessage(tr("Recorded %1 sec").arg(duration / 1000));
\endcode \endcode
*/ */

View File

@@ -26,10 +26,13 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example declarative-radio \example multimedia/declarative-radio
\title Declarative Radio Example \title Declarative Radio Example
\brief Demonstrates the radio functionality
\ingroup multimedia_examples
This examples uses the Qt Multimedia Radio QML type to list the available
channels on the FM frequency.
*/ */

View File

@@ -26,12 +26,12 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example spectrum \example multimedia/spectrum
\title Spectrum Example \title Spectrum Example
\ingroup audio_examples \ingroup multimedia_examples
\brief The Spectrum Example uses a combination multimedia APIs to process microphone input. \brief The Spectrum Example uses a combination multimedia APIs to process microphone input.
The Spectrum Analyzer example shows how the \l{QtMultimedia Module} can be The Spectrum Analyzer example shows how the \l{Qt Multimedia} module can be
used to record and then play back an audio stream. used to record and then play back an audio stream.
\image spectrum-demo.png \image spectrum-demo.png

View File

@@ -26,9 +26,9 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example video/qmlvideo \example multimedia/video/qmlvideo
\title QML Video Example \title QML Video Example
\ingroup video_examples_qml \ingroup multimedia_examples
\brief The QML Video Example demonstrates the various manipulations (move; \brief The QML Video Example demonstrates the various manipulations (move;
resize; rotate; change aspect ratio) which can be applied to QML \l{VideoOutput} resize; rotate; change aspect ratio) which can be applied to QML \l{VideoOutput}
@@ -52,15 +52,15 @@ which moves across the \l{VideoOutput} item.
\section1 Application structure \section1 Application structure
The \l{video/qmlvideo/qml/qmlvideo/main.qml} file creates a UI which includes The \l{multimedia/video/qmlvideo/qml/qmlvideo/main.qml} file creates a UI which includes
the following items: the following items:
\list \list
\li Two \l{video/qmlvideo/qml/qmlvideo/Button.qml}{Button} instances, each \li Two \l{multimedia/video/qmlvideo/qml/qmlvideo/Button.qml}{Button} instances, each
of which displays a filename, and can be used to launch a of which displays a filename, and can be used to launch a
\l{video/qmlvideo/qml/qmlvideo/FileBrowser.qml}{FileBrowser} \l{multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml}{FileBrowser}
\li An exit \l{video/qmlvideo/qml/qmlvideo/Button.qml}{Button} \li An exit \l{multimedia/video/qmlvideo/qml/qmlvideo/Button.qml}{Button}
\li A \l{video/qmlvideo/qml/qmlvideo/SceneSelectionPanel.qml}{SceneSelectionPanel}, \li A \l{multimedia/video/qmlvideo/qml/qmlvideo/SceneSelectionPanel.qml}{SceneSelectionPanel},
which is a flickable list displaying the available scenes which is a flickable list displaying the available scenes
\li At the lower left, an item which displays the QML repainting rate - the \li At the lower left, an item which displays the QML repainting rate - the
upper number is the instantaneous frame rate and the lower number is the upper number is the instantaneous frame rate and the lower number is the
@@ -72,18 +72,18 @@ the following items:
Each scene in the flickable list is implemented in its own QML file - for Each scene in the flickable list is implemented in its own QML file - for
example the video-basic scene (which just displays a static \l{VideoOutput} example the video-basic scene (which just displays a static \l{VideoOutput}
in the center of the screen) is implemented in the in the center of the screen) is implemented in the
\l{video/qmlvideo/qml/qmlvideo/VideoBasic.qml}{VideoBasic.qml} file. As you \l{multimedia/ideo/qmlvideo/qml/qmlvideo/VideoBasic.qml}{VideoBasic.qml} file. As you
can see from the code, this makes use of a type of inheritance: a can see from the code, this makes use of a type of inheritance: a
\l{video/qmlvideo/qml/qmlvideo/VideoBasic.qml}{VideoBasic} item ... \l{multimedia/video/qmlvideo/qml/qmlvideo/VideoBasic.qml}{VideoBasic} item ...
\quotefromfile video/qmlvideo/qml/qmlvideo/VideoBasic.qml \quotefromfile multimedia/video/qmlvideo/qml/qmlvideo/VideoBasic.qml
\skipto import \skipto import
\printuntil /^\}/ \printuntil /^\}/
... is-a ... is-a
\l{video/qmlvideo/qml/qmlvideo/SceneBasic.qml}{SceneBasic} ... \l{multimedia/video/qmlvideo/qml/qmlvideo/SceneBasic.qml}{SceneBasic} ...
\quotefromfile video/qmlvideo/qml/qmlvideo/SceneBasic.qml \quotefromfile multimedia/video/qmlvideo/qml/qmlvideo/SceneBasic.qml
\skipto import \skipto import
\printuntil contentType \printuntil contentType
\dots \dots
@@ -94,9 +94,9 @@ can see from the code, this makes use of a type of inheritance: a
\printuntil /^\}/ \printuntil /^\}/
... which is-a ... which is-a
\l{video/qmlvideo/qml/qmlvideo/Scene.qml}{Scene}: \l{multimedia/video/qmlvideo/qml/qmlvideo/Scene.qml}{Scene}:
\quotefromfile video/qmlvideo/qml/qmlvideo/Scene.qml \quotefromfile multimedia/video/qmlvideo/qml/qmlvideo/Scene.qml
\skipto import \skipto import
\printuntil root \printuntil root
\dots \dots
@@ -106,35 +106,35 @@ can see from the code, this makes use of a type of inheritance: a
\skipto Button \skipto Button
\printuntil /^\}/ \printuntil /^\}/
\l{video/qmlvideo/qml/qmlvideo/SceneBasic.qml}{SceneBasic} describes the \l{multimedia/video/qmlvideo/qml/qmlvideo/SceneBasic.qml}{SceneBasic} describes the
structure and behaviour of the scene, but is agnostic of the type of content structure and behaviour of the scene, but is agnostic of the type of content
which will be displayed - this is abstracted by which will be displayed - this is abstracted by
\l{video/qmlvideo/qml/qmlvideo/Content.qml}{Content}. \l{multimedia/video/qmlvideo/qml/qmlvideo/Content.qml}{Content}.
This pattern allows us to define a particular use case (in this case, simply This pattern allows us to define a particular use case (in this case, simply
display a static piece of content), and then instantiate that use case for display a static piece of content), and then instantiate that use case for
both video content both video content
(\l{video/qmlvideo/qml/qmlvideo/VideoBasic.qml}{VideoBasic}) and cameracontent (\l{multimedia/video/qmlvideo/qml/qmlvideo/VideoBasic.qml}{VideoBasic}) and cameracontent
(\l{video/qmlvideo/qml/qmlvideo/CameraBasic.qml}{CameraBasic}). This approach (\l{multimedia/video/qmlvideo/qml/qmlvideo/CameraBasic.qml}{CameraBasic}). This approach
is used to implement many of the other scenes - for example, "repeatedly slide is used to implement many of the other scenes - for example, "repeatedly slide
the content from left to right and back again" is implemented by the content from left to right and back again" is implemented by
\l{video/qmlvideo/qml/qmlvideo/SceneMove.qml}{SceneMove}, on which \l{multimedia/video/qmlvideo/qml/qmlvideo/SceneMove.qml}{SceneMove}, on which
\l{video/qmlvideo/qml/qmlvideo/VideoMove.qml}{VideoMove} and \l{multimedia/video/qmlvideo/qml/qmlvideo/VideoMove.qml}{VideoMove} and
\l{video/qmlvideo/qml/qmlvideo/CameraMove.qml}{CameraMove} are based. \l{multimedia/video/qmlvideo/qml/qmlvideo/CameraMove.qml}{CameraMove} are based.
Depending on the value of the contentType property in the top-level scene Depending on the value of the contentType property in the top-level scene
instance, the embedded instance, the embedded
\l{video/qmlvideo/qml/qmlvideo/Content.qml}{Content} item creates either a \l{multimedia/video/qmlvideo/qml/qmlvideo/Content.qml}{Content} item creates either a
\l{MediaPlayer} or a \l{Camera} item. \l{MediaPlayer} or a \l{Camera} item.
\section1 Calculating and displaying QML painting rate \section1 Calculating and displaying QML painting rate
\input examples/video-qml-paint-rate.qdocinc \input video-qml-paint-rate.qdocinc
All that remains is to connect the afterRendering() signal of the QQuickView All that remains is to connect the afterRendering() signal of the QQuickView
object to a JavaScript function, which will eventually call frequencyItem.notify(): object to a JavaScript function, which will eventually call frequencyItem.notify():
\quotefromfile video/qmlvideo/main.cpp \quotefromfile multimedia/video/qmlvideo/main.cpp
\skipto QmlApplicationViewer \skipto QmlApplicationViewer
\printuntil ; \printuntil ;
\dots \dots

View File

@@ -26,10 +26,9 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example video/qmlvideofx \example multimedia/video/qmlvideofx
\title QML Video Shader Effects Example \title QML Video Shader Effects Example
\ingroup video_examples_qml \ingroup multimedia_examples
\ingroup camera_examples_qml
\brief The QML Video Shader Effects Example shows how \l {ShaderEffect} \brief The QML Video Shader Effects Example shows how \l {ShaderEffect}
can be used to apply postprocessing effects, expressed in \c GLSL, to video can be used to apply postprocessing effects, expressed in \c GLSL, to video
@@ -135,10 +134,10 @@ types is a bit more complicated, for the following reasons:
\endlist \endlist
The abstraction of source item type is achieved by the The abstraction of source item type is achieved by the
\l{video/qmlvideofx/qml/qmlvideofx/Content.qml}{Content}, which uses a \l{multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml}{Content}, which uses a
\l{Loader} to create either a \l{MediaPlayer}, \l{Camera} or \l{Image}: \l{Loader} to create either a \l{MediaPlayer}, \l{Camera} or \l{Image}:
\quotefromfile video/qmlvideofx/qml/qmlvideofx/Content.qml \quotefromfile multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml
\skipto import \skipto import
\printuntil { \printuntil {
\dots \dots
@@ -165,10 +164,10 @@ The abstraction of source item type is achieved by the
\printuntil } \printuntil }
Each effect is implemented as a QML item which is based on the Each effect is implemented as a QML item which is based on the
\l{video/qmlvideofx/qml/qmlvideofx/Effect.qml}{Effect}, which in turn \l{multimedia/video/qmlvideofx/qml/qmlvideofx/Effect.qml}{Effect}, which in turn
is based on the \l{ShaderEffect}: is based on the \l{ShaderEffect}:
\quotefromfile video/qmlvideofx/qml/qmlvideofx/Effect.qml \quotefromfile multimedia/video/qmlvideofx/qml/qmlvideofx/Effect.qml
\skipto import \skipto import
\printuntil /^\}/ \printuntil /^\}/
@@ -180,20 +179,20 @@ implementation of the pixelation effect. As you can see, the pixelation effect
supports one parameter (which controls the pixelation granularity), and states supports one parameter (which controls the pixelation granularity), and states
that the divider should be displayed. that the divider should be displayed.
\quotefromfile video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml \quotefromfile multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml
\skipto import \skipto import
\printuntil /^\}/ \printuntil /^\}/
The main.qml file shows a The main.qml file shows a
\l{video/qmlvideofx/qml/qmlvideofx/FileOpen.qml}{FileOpen}, which allows \l{multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml}{FileOpen}, which allows
the user to select the input source and an the user to select the input source and an
\l{video/qmlvideofx/qml/qmlvideofx/EffectSelectionPanel.qml}{EffectSelectionPanel} \l{multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionPanel.qml}{EffectSelectionPanel}
item, which lists each of the available shader effects. As described above, a item, which lists each of the available shader effects. As described above, a
\l{video/qmlvideofx/qml/qmlvideofx/Content.qml}{Content} item is used to load the \l{multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml}{Content} item is used to load the
appropriate input and effect type. A appropriate input and effect type. A
\l{video/qmlvideofx/qml/qmlvideofx/Divider.qml}{Divider} item draws the \l{multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml}{Divider} item draws the
vertical dividing line, which can be dragged left / right by the user. Finally, vertical dividing line, which can be dragged left / right by the user. Finally,
a \l{video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml}{ParameterPanel} item a \l{multimedia/video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml}{ParameterPanel} item
renders the sliders corresponding to each effect parameter. renders the sliders corresponding to each effect parameter.
Here is the source selection menu: Here is the source selection menu:
@@ -204,12 +203,12 @@ And here is the effect selection menu:
\section1 Calculating and displaying QML painting rate \section1 Calculating and displaying QML painting rate
\input examples/video-qml-paint-rate.qdocinc \input video-qml-paint-rate.qdocinc
All that remains is to connect the afterRendering() signal of the QQuickView All that remains is to connect the afterRendering() signal of the QQuickView
object to a JavaScript function, which will eventually call frequencyItem.notify(): object to a JavaScript function, which will eventually call frequencyItem.notify():
\quotefromfile video/qmlvideofx/main.cpp \quotefromfile multimedia/video/qmlvideofx/main.cpp
\skipto QmlApplicationViewer \skipto QmlApplicationViewer
\printuntil ; \printuntil ;
\dots \dots

View File

@@ -29,14 +29,12 @@
/*! /*!
\example camera \example multimediawidgets/camera
\title Camera Example \title Camera Example
\ingroup camera_examples \ingroup multimedia_examples
\brief The Camera Example shows how to use the API to capture a still image \brief The Camera Example shows how to use the API to capture a still image
or video. or video.
The Camera Example demonstrates how you can use QtMultimedia to implement The Camera Example demonstrates how you can use QtMultimedia to implement
some basic Camera functionality to take still images and record video clips some basic Camera functionality to take still images and record video clips
with audio. with audio.

View File

@@ -26,10 +26,9 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example declarative-camera \example multimediawidgets/declarative-camera
\title QML Camera Example \title QML Camera Example
\ingroup camera_examples_qml \ingroup multimedia_examples
\brief The Camera Example shows how to use the API to capture a still image \brief The Camera Example shows how to use the API to capture a still image
or video. or video.

View File

@@ -26,10 +26,10 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example player \example multimediawidgets/player
\title Media Player Example \title Media Player Example
\ingroup video_examples \ingroup multimedia_examples
\brief Demonstrates the audio and video playback functionality
This example creates a simple multimedia player. We can play audio and This example creates a simple multimedia player. We can play audio and
or video files using various codecs. or video files using various codecs.

View File

@@ -26,9 +26,9 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example videographicsitem \example multimediawidgets/videographicsitem
\title Video Graphics Item Example \title Video Graphics Item Example
\ingroup video_examples \ingroup multimedia_examples
\brief This example demonstrates how to stream video on a graphics scene. \brief This example demonstrates how to stream video on a graphics scene.
The Video Graphics Item example shows how to implement a QGraphicsItem that displays video on a The Video Graphics Item example shows how to implement a QGraphicsItem that displays video on a

View File

@@ -26,9 +26,9 @@
****************************************************************************/ ****************************************************************************/
/*! /*!
\example videowidget \example multimediawidgets/videowidget
\title Video Widget Example \title Video Widget Example
\ingroup video_examples \ingroup multimedia_examples
\brief This example is a simple video player \brief This example is a simple video player
The Video Widget example denonstrates how to implement a video widget using The Video Widget example denonstrates how to implement a video widget using

View File

@@ -30,6 +30,7 @@ qhp.qtmultimedia.subprojects.qmltypes.selectors = class fake:headerfile
qhp.qtmultimedia.subprojects.qmltypes.sortPages = true qhp.qtmultimedia.subprojects.qmltypes.sortPages = true
exampledirs += ../../../examples \ exampledirs += ../../../examples \
snippets
headerdirs += ../.. headerdirs += ../..

View File

@@ -50,16 +50,16 @@ may have installed.
Here is how you play a local file using C++: Here is how you play a local file using C++:
\snippet doc/src/snippets/multimedia-snippets/media.cpp Local playback \snippet multimedia-snippets/media.cpp Local playback
You can also put files (even remote URLs) into a playlist: You can also put files (even remote URLs) into a playlist:
\snippet doc/src/snippets/multimedia-snippets/media.cpp Audio playlist \snippet multimedia-snippets/media.cpp Audio playlist
\section2 Recording Audio to a File \section2 Recording Audio to a File
For recording audio to a file, the \l {QAudioRecorder} class allows you For recording audio to a file, the \l {QAudioRecorder} class allows you
to compress audio data from an input device and record it. to compress audio data from an input device and record it.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Audio recorder \snippet multimedia-snippets/media.cpp Audio recorder
\section2 Low Latency Sound Effects \section2 Low Latency Sound Effects
@@ -87,7 +87,7 @@ they may arrive at a slightly different time than the media pipeline
processes them. processes them.
Here's an example of installing a probe during recording: Here's an example of installing a probe during recording:
\snippet doc/src/snippets/multimedia-snippets/media.cpp Audio probe \snippet multimedia-snippets/media.cpp Audio probe
\section2 Low Level Audio Playback and Recording \section2 Low Level Audio Playback and Recording
Qt Multimedia offers classes for raw access to audio input and output Qt Multimedia offers classes for raw access to audio input and output
@@ -123,7 +123,7 @@ or from a QIODevice instances.
Here's an example of decoding a local file: Here's an example of decoding a local file:
\snippet doc/src/snippets/multimedia-snippets/audio.cpp Local audio decoding \snippet multimedia-snippets/audio.cpp Local audio decoding
Note: This API is preliminary at this time - the API may change or be Note: This API is preliminary at this time - the API may change or be
removed before the final 5.0 release. removed before the final 5.0 release.

View File

@@ -118,14 +118,14 @@ In C++, your choice depends on whether you are using widgets, or QGraphicsView.
The \l QVideoWidget class is used in the widgets case, and \l QGraphicsVideoItem The \l QVideoWidget class is used in the widgets case, and \l QGraphicsVideoItem
is useful for QGraphicsView. is useful for QGraphicsView.
\snippet doc/src/snippets/multimedia-snippets/camera.cpp Camera overview viewfinder \snippet multimedia-snippets/camera.cpp Camera overview viewfinder
For advanced usage (like processing viewfinder frames as they come, to detect For advanced usage (like processing viewfinder frames as they come, to detect
objects or patterns), you can also derive from \l QAbstractVideoSurface and objects or patterns), you can also derive from \l QAbstractVideoSurface and
set that as the viewfinder for the QCamera object. In this case you will set that as the viewfinder for the QCamera object. In this case you will
need to render the viewfinder image yourself. need to render the viewfinder image yourself.
\snippet doc/src/snippets/multimedia-snippets/camera.cpp Camera overview surface \snippet multimedia-snippets/camera.cpp Camera overview surface
\section2 Still Images \section2 Still Images
@@ -136,7 +136,7 @@ that things are in focus and the settings are not different from the
viewfinder while the image capture occurs, capture the image, and viewfinder while the image capture occurs, capture the image, and
finally unlock the camera ready for the next photo. finally unlock the camera ready for the next photo.
\snippet doc/src/snippets/multimedia-snippets/camera.cpp Camera overview capture \snippet multimedia-snippets/camera.cpp Camera overview capture
\section2 Movies \section2 Movies
@@ -146,7 +146,7 @@ video requires the use of a \l QMediaRecorder object.
To record video we need to create a camera object as before but this time as To record video we need to create a camera object as before but this time as
well as creating a viewfinder, we will also initialize a media recorder object. well as creating a viewfinder, we will also initialize a media recorder object.
\snippet doc/src/snippets/multimedia-snippets/camera.cpp Camera overview movie \snippet multimedia-snippets/camera.cpp Camera overview movie
Signals from the \e mediaRecorder can be connected to slots to react to Signals from the \e mediaRecorder can be connected to slots to react to
changes in the state of the recorder or error events. Recording itself changes in the state of the recorder or error events. Recording itself

View File

@@ -0,0 +1,37 @@
/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\group multimedia_examples
\ingroup all-examples
\title Qt Multimedia Examples
\brief Demonstrates the multimedia functionality provided by Qt.
The \l{Qt Multimedia} module provides low-level audio support on Linux,
Windows and Mac OS X. It also provides audio plugin API to allow developers
implement their own audio support for custom devices and platforms.
*/

View File

@@ -128,23 +128,6 @@
\section2 Examples \section2 Examples
\list \list
\li QML \li \l{Qt Multimedia Examples}
\list
\li \l{video/qmlvideo}{qmlvideo}
\li \l{video/qmlvideofx}{qmlvideofx}
\li \l{declarative-camera}
\li \l{declarative-radio}
\endlist
\li C++
\list
\li \l{audiooutput}
\li \l{audioinput}
\li \l{audiorecorder}
\li \l{audiodevices}
\li \l{spectrum}
\li \l{AudioEngine Example}{Audio Engine}
\li \l{player}
\li \l{Camera Example}
\endlist
\endlist \endlist
*/ */

View File

@@ -47,10 +47,10 @@ You can use the \l QMediaPlayer class to decode a video file, and display
it using \l QVideoWidget, \l QGraphicsVideoItem, or a custom class. it using \l QVideoWidget, \l QGraphicsVideoItem, or a custom class.
Here's an example of using QVideoWidget: Here's an example of using QVideoWidget:
\snippet doc/src/snippets/multimedia-snippets/video.cpp Video widget \snippet multimedia-snippets/video.cpp Video widget
And an example with QGraphicsVideoItem: And an example with QGraphicsVideoItem:
\snippet doc/src/snippets/multimedia-snippets/video.cpp Video graphics item \snippet multimedia-snippets/video.cpp Video graphics item
\section2 Playing Video in QML \section2 Playing Video in QML
@@ -77,12 +77,12 @@ processing, while deriving a class from \l QAbstractVideoSurface
allows you to receive these frames from \l QMediaPlayer and allows you to receive these frames from \l QMediaPlayer and
\l QCamera. \l QCamera.
\snippet doc/src/snippets/multimedia-snippets/video.cpp Derived Surface \snippet multimedia-snippets/video.cpp Derived Surface
and with an instance of this surface, \c myVideoSurface, you can set and with an instance of this surface, \c myVideoSurface, you can set
the surface as the \l {QMediaPlayer::setVideoOutput()}{video output} for QMediaPlayer. the surface as the \l {QMediaPlayer::setVideoOutput()}{video output} for QMediaPlayer.
\snippet doc/src/snippets/multimedia-snippets/video.cpp Setting surface in player \snippet multimedia-snippets/video.cpp Setting surface in player
Several of the built-in Qt classes offer this functionality Several of the built-in Qt classes offer this functionality
as well, so if you decode video in your application, you can present as well, so if you decode video in your application, you can present
@@ -97,7 +97,7 @@ The following snippet shows a class that has a writable \c videoSurface property
and receives frames through a public slot \c onNewVideoContentReceived(). These and receives frames through a public slot \c onNewVideoContentReceived(). These
frames are then presented on the surface set in \c setVideoSurface(). frames are then presented on the surface set in \c setVideoSurface().
\snippet doc/src/snippets/multimedia-snippets/video.cpp Video producer \snippet multimedia-snippets/video.cpp Video producer
\section2 Recording Video \section2 Recording Video
You can use the \l QMediaRecorder class in conjunction with other You can use the \l QMediaRecorder class in conjunction with other
@@ -116,7 +116,7 @@ the video frames using this class, and they may arrive at a slightly
different time than they are being rendered. different time than they are being rendered.
Here's an example of installing a video probe while recording the camera: Here's an example of installing a video probe while recording the camera:
\snippet doc/src/snippets/multimedia-snippets/media.cpp Video probe \snippet multimedia-snippets/media.cpp Video probe
\section1 Examples \section1 Examples

View File

@@ -68,14 +68,14 @@ QT_BEGIN_NAMESPACE
the \l {QMediaService::requestControl()} member of QMediaService. If the the \l {QMediaService::requestControl()} member of QMediaService. If the
service doesn't implement a control it will instead return a null pointer. service doesn't implement a control it will instead return a null pointer.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Request control \snippet multimedia-snippets/media.cpp Request control
Alternatively if the IId of the control has been declared using Alternatively if the IId of the control has been declared using
Q_MEDIA_DECLARE_CONTROL the template version of Q_MEDIA_DECLARE_CONTROL the template version of
QMediaService::requestControl() can be used to request the service without QMediaService::requestControl() can be used to request the service without
explicitly passing the IId or using qobject_cast(). explicitly passing the IId or using qobject_cast().
\snippet doc/src/snippets/multimedia-snippets/media.cpp Request control templated \snippet multimedia-snippets/media.cpp Request control templated
Most application code will not interface directly with a media service's Most application code will not interface directly with a media service's
controls, instead the QMediaObject which owns the service acts as an controls, instead the QMediaObject which owns the service acts as an
@@ -95,7 +95,7 @@ QT_BEGIN_NAMESPACE
be requested from QMediaService::requestControl() without explicitly be requested from QMediaService::requestControl() without explicitly
passing the IId. passing the IId.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Request control templated \snippet multimedia-snippets/media.cpp Request control templated
\sa QMediaService::requestControl() \sa QMediaService::requestControl()
*/ */

View File

@@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE
A pointer to media service's QMediaControl implementation can be obtained A pointer to media service's QMediaControl implementation can be obtained
by passing the control's interface name to the requestControl() function. by passing the control's interface name to the requestControl() function.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Request control \snippet multimedia-snippets/media.cpp Request control
Media objects can use services loaded dynamically from plug-ins or Media objects can use services loaded dynamically from plug-ins or
implemented statically within an applications. Plug-in based services implemented statically within an applications. Plug-in based services

View File

@@ -78,7 +78,7 @@ namespace
You can get a QRadioData instance fromt the \l{QRadioTuner::radioData()}{radioData} You can get a QRadioData instance fromt the \l{QRadioTuner::radioData()}{radioData}
property from a QRadioTuner instance. property from a QRadioTuner instance.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Radio data setup \snippet multimedia-snippets/media.cpp Radio data setup
Alternatively, you can pass an instance of QRadioTuner to the constructor to QRadioData. Alternatively, you can pass an instance of QRadioTuner to the constructor to QRadioData.

View File

@@ -79,7 +79,7 @@ namespace
You can control the systems analog radio device using this interface, for example: You can control the systems analog radio device using this interface, for example:
\snippet doc/src/snippets/multimedia-snippets/media.cpp Radio tuner \snippet multimedia-snippets/media.cpp Radio tuner
The radio object will emit signals for any changes in state such as: The radio object will emit signals for any changes in state such as:
bandChanged(), frequencyChanged(), stereoStatusChanged(), searchingChanged(), bandChanged(), frequencyChanged(), stereoStatusChanged(), searchingChanged(),

View File

@@ -66,11 +66,11 @@ QT_BEGIN_NAMESPACE
The QAudioRecorder class is a high level media recording class and contains The QAudioRecorder class is a high level media recording class and contains
the same functionality as \l QMediaRecorder. the same functionality as \l QMediaRecorder.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Audio recorder \snippet multimedia-snippets/media.cpp Audio recorder
In addition QAudioRecorder provides functionality for selecting the audio input. In addition QAudioRecorder provides functionality for selecting the audio input.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Audio recorder inputs \snippet multimedia-snippets/media.cpp Audio recorder inputs
The \l {audiorecorder}{Audio Recorder} example shows how to use this class The \l {audiorecorder}{Audio Recorder} example shows how to use this class
in more detail. in more detail.

View File

@@ -111,7 +111,7 @@ private:
and then passing it to a QMediaRecorder instance using the and then passing it to a QMediaRecorder instance using the
QMediaRecorder::setEncodingSettings() function. QMediaRecorder::setEncodingSettings() function.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Audio encoder settings \snippet multimedia-snippets/media.cpp Audio encoder settings
\sa QMediaRecorder, QAudioEncoderSettingsControl \sa QMediaRecorder, QAudioEncoderSettingsControl
*/ */
@@ -425,7 +425,7 @@ private:
and then passing it to a QMediaRecorder instance using the and then passing it to a QMediaRecorder instance using the
QMediaRecorder::setEncodingSettings() function. QMediaRecorder::setEncodingSettings() function.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Video encoder settings \snippet multimedia-snippets/media.cpp Video encoder settings
\sa QMediaRecorder, QVideoEncoderSettingsControl \sa QMediaRecorder, QVideoEncoderSettingsControl
*/ */
@@ -751,7 +751,7 @@ private:
properties and then passing it to a QCameraImageCapture instance using the properties and then passing it to a QCameraImageCapture instance using the
QCameraImageCapture::setImageSettings() function. QCameraImageCapture::setImageSettings() function.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Image encoder settings \snippet multimedia-snippets/media.cpp Image encoder settings
\sa QImageEncoderControl \sa QImageEncoderControl
*/ */

View File

@@ -75,7 +75,7 @@ QT_BEGIN_NAMESPACE
intended to be used alone but for accessing the media recording functions intended to be used alone but for accessing the media recording functions
of other media objects, like QRadioTuner, or QCamera. of other media objects, like QRadioTuner, or QCamera.
\snippet doc/src/snippets/multimedia-snippets/media.cpp Media recorder \snippet multimedia-snippets/media.cpp Media recorder
\sa QAudioRecorder \sa QAudioRecorder
*/ */