|qmake:||QT += multimedia|
|virtual void||applySettings() = 0|
|virtual qint64||duration() const = 0|
|virtual bool||isMuted() const = 0|
|virtual QUrl||outputLocation() const = 0|
|virtual bool||setOutputLocation(const QUrl &location) = 0|
|virtual QMediaRecorder::State||state() const = 0|
|virtual QMediaRecorder::Status||status() const = 0|
|virtual qreal||volume() const = 0|
- 34 public functions inherited from QObject
|virtual void||setMuted(bool muted) = 0|
|virtual void||setState(QMediaRecorder::State state) = 0|
|virtual void||setVolume(qreal volume) = 0|
- 1 public slot inherited from QObject
|void||actualLocationChanged(const QUrl &location)|
|void||error(int error, const QString &errorString)|
- 2 signals inherited from QObject
|QMediaRecorderControl(QObject *parent = nullptr)|
- 9 protected functions inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected variables inherited from QObject
Generally you will use the QMediaRecorder class in application code - this class is mostly used when implementing a new QMediaService or if there is access to specific low level functionality not otherwise present in QMediaRecorder.
If a QMediaService can record media it will implement QMediaRecorderControl. This control provides a means to set the output location, and record, pause and stop recording via the setState() method. It also provides feedback on the duration of the recording.
Member Function Documentation
[protected] QMediaRecorderControl::QMediaRecorderControl(QObject *parent = nullptr)
Constructs a media recorder control with the given parent.
Destroys a media recorder control.
[signal] void QMediaRecorderControl::actualLocationChanged(const QUrl &location)
Signals that the actual media location has changed. This signal should be emitted at start of recording.
Commits the encoder settings and performs pre-initialization to reduce delays when recording is started.
[pure virtual] qint64 QMediaRecorderControl::duration() const
Return the current duration in milliseconds.
[signal] void QMediaRecorderControl::durationChanged(qint64 duration)
Signals that the duration of the recorded media has changed.
This only emitted when there is a discontinuous change in the duration such as being reset to 0.
[signal] void QMediaRecorderControl::error(int error, const QString &errorString)
Signals that an error has occurred. The errorString describes the error.
Returns true if the recorder is muted, and false if it is not.
Signals that the muted state of a media recorder has changed.
[pure virtual] QUrl QMediaRecorderControl::outputLocation() const
Returns the current output location being used.
See also setOutputLocation().
Sets the muted state of a media recorder.
See also isMuted().
[pure virtual] bool QMediaRecorderControl::setOutputLocation(const QUrl &location)
Sets the output location and returns if this operation is successful. If file at the output location already exists, it should be overwritten.
The location can be relative or empty; in this case the service should use the system specific place and file naming scheme.
After recording has started, the backend should report the actual file location with actualLocationChanged() signal.
See also outputLocation().
[pure virtual slot] void QMediaRecorderControl::setState(QMediaRecorder::State state)
Set the media recorder state.
See also state().
[pure virtual slot] void QMediaRecorderControl::setVolume(qreal volume)
Sets the audio volume of a media recorder control.
The volume is scaled linearly, ranging from
0 (silence) to
100 (full volume).
See also volume().
[pure virtual] QMediaRecorder::State QMediaRecorderControl::state() const
Return the current recording state.
See also setState().
[signal] void QMediaRecorderControl::stateChanged(QMediaRecorder::State state)
Signals that the state of a media recorder has changed.
[pure virtual] QMediaRecorder::Status QMediaRecorderControl::status() const
Return the current recording status.
[signal] void QMediaRecorderControl::statusChanged(QMediaRecorder::Status status)
Signals that the status of a media recorder has changed.
[pure virtual] qreal QMediaRecorderControl::volume() const
Returns the audio volume of a media recorder control.
See also setVolume().
[signal] void QMediaRecorderControl::volumeChanged(qreal gain)
Signals that the audio gain value has changed.
Defines the interface name of the QMediaRecorderControl class.
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.