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:
committed by
The Qt Project
parent
5cd23af26c
commit
0241b0e39c
@@ -30,6 +30,7 @@ qhp.qtmultimedia.subprojects.qmltypes.selectors = class fake:headerfile
|
||||
qhp.qtmultimedia.subprojects.qmltypes.sortPages = true
|
||||
|
||||
exampledirs += ../../../examples \
|
||||
snippets
|
||||
|
||||
headerdirs += ../..
|
||||
|
||||
|
||||
@@ -50,16 +50,16 @@ may have installed.
|
||||
|
||||
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:
|
||||
\snippet doc/src/snippets/multimedia-snippets/media.cpp Audio playlist
|
||||
\snippet multimedia-snippets/media.cpp Audio playlist
|
||||
|
||||
\section2 Recording Audio to a File
|
||||
For recording audio to a file, the \l {QAudioRecorder} class allows you
|
||||
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
|
||||
|
||||
@@ -87,7 +87,7 @@ they may arrive at a slightly different time than the media pipeline
|
||||
processes them.
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
\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
|
||||
removed before the final 5.0 release.
|
||||
|
||||
@@ -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
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
@@ -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
|
||||
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
|
||||
|
||||
@@ -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
|
||||
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
|
||||
changes in the state of the recorder or error events. Recording itself
|
||||
|
||||
37
src/multimedia/doc/src/qtmultimedia-examples.qdoc
Normal file
37
src/multimedia/doc/src/qtmultimedia-examples.qdoc
Normal 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.
|
||||
*/
|
||||
@@ -128,23 +128,6 @@
|
||||
|
||||
\section2 Examples
|
||||
\list
|
||||
\li QML
|
||||
\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
|
||||
\li \l{Qt Multimedia Examples}
|
||||
\endlist
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
|
||||
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:
|
||||
\snippet doc/src/snippets/multimedia-snippets/video.cpp Video graphics item
|
||||
\snippet multimedia-snippets/video.cpp Video graphics item
|
||||
|
||||
\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
|
||||
\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
|
||||
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
|
||||
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
|
||||
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
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -68,14 +68,14 @@ QT_BEGIN_NAMESPACE
|
||||
the \l {QMediaService::requestControl()} member of QMediaService. If the
|
||||
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
|
||||
Q_MEDIA_DECLARE_CONTROL the template version of
|
||||
QMediaService::requestControl() can be used to request the service without
|
||||
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
|
||||
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
|
||||
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()
|
||||
*/
|
||||
|
||||
@@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE
|
||||
A pointer to media service's QMediaControl implementation can be obtained
|
||||
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
|
||||
implemented statically within an applications. Plug-in based services
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace
|
||||
You can get a QRadioData instance fromt the \l{QRadioTuner::radioData()}{radioData}
|
||||
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.
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace
|
||||
|
||||
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:
|
||||
bandChanged(), frequencyChanged(), stereoStatusChanged(), searchingChanged(),
|
||||
|
||||
@@ -66,11 +66,11 @@ QT_BEGIN_NAMESPACE
|
||||
The QAudioRecorder class is a high level media recording class and contains
|
||||
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.
|
||||
|
||||
\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
|
||||
in more detail.
|
||||
|
||||
@@ -111,7 +111,7 @@ private:
|
||||
and then passing it to a QMediaRecorder instance using the
|
||||
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
|
||||
*/
|
||||
@@ -425,7 +425,7 @@ private:
|
||||
and then passing it to a QMediaRecorder instance using the
|
||||
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
|
||||
*/
|
||||
@@ -751,7 +751,7 @@ private:
|
||||
properties and then passing it to a QCameraImageCapture instance using the
|
||||
QCameraImageCapture::setImageSettings() function.
|
||||
|
||||
\snippet doc/src/snippets/multimedia-snippets/media.cpp Image encoder settings
|
||||
\snippet multimedia-snippets/media.cpp Image encoder settings
|
||||
|
||||
\sa QImageEncoderControl
|
||||
*/
|
||||
|
||||
@@ -75,7 +75,7 @@ QT_BEGIN_NAMESPACE
|
||||
intended to be used alone but for accessing the media recording functions
|
||||
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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user