summaryrefslogtreecommitdiffstats
path: root/src/multimedia/recording/qmediarecorder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/recording/qmediarecorder.cpp')
-rw-r--r--src/multimedia/recording/qmediarecorder.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/multimedia/recording/qmediarecorder.cpp b/src/multimedia/recording/qmediarecorder.cpp
index 12279c4bd..d876addee 100644
--- a/src/multimedia/recording/qmediarecorder.cpp
+++ b/src/multimedia/recording/qmediarecorder.cpp
@@ -285,6 +285,9 @@ bool QMediaRecorder::setMediaObject(QMediaObject *object)
disconnect(d->control, SIGNAL(mutedChanged(bool)),
this, SIGNAL(mutedChanged(bool)));
+ disconnect(d->control, SIGNAL(volumeChanged(qreal)),
+ this, SIGNAL(volumeChanged(qreal)));
+
disconnect(d->control, SIGNAL(durationChanged(qint64)),
this, SIGNAL(durationChanged(qint64)));
@@ -388,6 +391,9 @@ bool QMediaRecorder::setMediaObject(QMediaObject *object)
connect(d->control, SIGNAL(mutedChanged(bool)),
this, SIGNAL(mutedChanged(bool)));
+ connect(d->control, SIGNAL(volumeChanged(qreal)),
+ this, SIGNAL(volumeChanged(qreal)));
+
connect(d->control, SIGNAL(durationChanged(qint64)),
this, SIGNAL(durationChanged(qint64)));
@@ -553,6 +559,26 @@ void QMediaRecorder::setMuted(bool muted)
}
/*!
+ \property QMediaRecorder::volume
+
+ \brief the linear audio gain of media recorder.
+*/
+
+qreal QMediaRecorder::volume() const
+{
+ return d_func()->control ? d_func()->control->volume() : 1.0;
+}
+
+
+void QMediaRecorder::setVolume(qreal volume)
+{
+ Q_D(QMediaRecorder);
+
+ if (d->control)
+ d->control->setVolume(volume);
+}
+
+/*!
Returns a list of supported container formats.
*/
QStringList QMediaRecorder::supportedContainers() const