summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Rabbe <jonas.rabbe@nokia.com>2012-02-09 08:25:37 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-09 01:30:37 +0100
commitc77e442b9947fb9e7101cd2d9c6df236b5840dd6 (patch)
treee0b06f61f99653c1362eb4a96654b85c44594fd6
parent50a80cd08330886e380f1ea5801acaca8c31fd00 (diff)
Updated documentation for the QAudioRecorder class
Change-Id: I93ab03e9a386578f0b43ba0e966b1570163ff056 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
-rw-r--r--doc/src/snippets/multimedia-snippets/media.cpp13
-rw-r--r--src/multimedia/recording/qaudiorecorder.cpp19
2 files changed, 29 insertions, 3 deletions
diff --git a/doc/src/snippets/multimedia-snippets/media.cpp b/doc/src/snippets/multimedia-snippets/media.cpp
index d59374bd..4fc38b4d 100644
--- a/doc/src/snippets/multimedia-snippets/media.cpp
+++ b/doc/src/snippets/multimedia-snippets/media.cpp
@@ -208,6 +208,19 @@ void MediaExample::MediaRecorder()
audioRecorder->setOutputLocation(QUrl::fromLocalFile("test.amr"));
audioRecorder->record();
//! [Audio recorder]
+
+ //! [Audio recorder endpoints]
+ QStringList inputs = audioRecorder->audioInputs();
+ QString selectedInput = audioRecorder->defaultAudioInput();
+
+ foreach (QString input, inputs) {
+ QString description = audioRecorder->audioInputDescription(input);
+ // show descriptions to user and allow selection
+ selectedInput = input;
+ }
+
+ audioRecorder->setAudioInput(selectedInput);
+ //! [Audio recorder endpoints]
#endif
}
diff --git a/src/multimedia/recording/qaudiorecorder.cpp b/src/multimedia/recording/qaudiorecorder.cpp
index c3087ee7..959a06c1 100644
--- a/src/multimedia/recording/qaudiorecorder.cpp
+++ b/src/multimedia/recording/qaudiorecorder.cpp
@@ -61,9 +61,22 @@ QT_BEGIN_NAMESPACE
\ingroup multimedia
\ingroup multimedia_recording
- \brief The QAudioRecorder class is used for the recording of media content.
+ \brief The QAudioRecorder class is used for the recording of audio.
- The QAudioRecorder class is a high level media recording class.
+ 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
+
+ In addition QAudioRecorder provides functionality for selecting the audio
+ input from available audio endpoints.
+
+ \snippet doc/src/snippets/multimedia-snippets/media.cpp Audio recorder endpoints
+
+ The \l {audiorecorder}{Audio Recorder} example shows how to use this class
+ in more detail.
+
+ \sa QMediaRecorder, QAudioEndpointSelector
*/
class QAudioRecorderObject : public QMediaObject
@@ -217,7 +230,7 @@ void QAudioRecorder::setAudioInput(const QString& name)
}
/*!
- \fn QAudioRecorder::activeAudioInputChanged(const QString& name)
+ \fn QAudioRecorder::audioInputChanged(const QString& name)
Signal emitted when active audio input changes to \a name.
*/