QMediaRecorderControl Class
The QMediaRecorderControl class provides access to the recording functionality of a QMediaService. More...
#include <QMediaRecorderControl>
Inherits: QMediaControl.
Public Functions
virtual | ~QMediaRecorderControl() |
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 |
Public Slots
virtual void | setMuted(bool muted) = 0 |
virtual void | setState(QMediaRecorder::State state) = 0 |
virtual void | setVolume(qreal gain) = 0 |
Signals
void | actualLocationChanged(const QUrl & location) |
void | durationChanged(qint64 duration) |
void | error(int error, const QString & errorString) |
void | mutedChanged(bool muted) |
void | stateChanged(QMediaRecorder::State state) |
void | statusChanged(QMediaRecorder::Status status) |
void | volumeChanged(qreal gain) |
Protected Functions
QMediaRecorderControl(QObject * parent = 0) |
Macros
QMediaRecorderControl_iid |
Detailed Description
The QMediaRecorderControl class provides access to the recording functionality of a QMediaService.
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.
The interface name of QMediaRecorderControl is org.qt-project.qt.mediarecordercontrol/5.0 as defined in QMediaRecorderControl_iid.
See also QMediaService::requestControl() and QMediaRecorder.
Member Function Documentation
QMediaRecorderControl::QMediaRecorderControl(QObject * parent = 0) [protected]
Constructs a media recorder control with the given parent.
QMediaRecorderControl::~QMediaRecorderControl() [virtual]
Destroys a media recorder control.
void QMediaRecorderControl::actualLocationChanged(const QUrl & location) [signal]
Signals that the actual media location has changed. This signal should be emitted at start of recording.
void QMediaRecorderControl::applySettings() [pure virtual]
Commits the encoder settings and performs pre-initialization to reduce delays when recording is started.
qint64 QMediaRecorderControl::duration() const [pure virtual]
Return the current duration in milliseconds.
void QMediaRecorderControl::durationChanged(qint64 duration) [signal]
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.
void QMediaRecorderControl::error(int error, const QString & errorString) [signal]
Signals that an error has occurred. The errorString describes the error.
bool QMediaRecorderControl::isMuted() const [pure virtual]
Returns true if the recorder is muted, and false if it is not.
void QMediaRecorderControl::mutedChanged(bool muted) [signal]
Signals that the muted state of a media recorder has changed.
QUrl QMediaRecorderControl::outputLocation() const [pure virtual]
Returns the current output location being used.
See also setOutputLocation().
void QMediaRecorderControl::setMuted(bool muted) [pure virtual slot]
Sets the muted state of a media recorder.
See also isMuted().
bool QMediaRecorderControl::setOutputLocation(const QUrl & location) [pure virtual]
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().
void QMediaRecorderControl::setState(QMediaRecorder::State state) [pure virtual slot]
Set the media recorder state.
See also state().
void QMediaRecorderControl::setVolume(qreal gain) [pure virtual slot]
Sets the linear audio gain of a media recorder.
See also volume().
QMediaRecorder::State QMediaRecorderControl::state() const [pure virtual]
Return the current recording state.
See also setState().
void QMediaRecorderControl::stateChanged(QMediaRecorder::State state) [signal]
Signals that the state of a media recorder has changed.
QMediaRecorder::Status QMediaRecorderControl::status() const [pure virtual]
Return the current recording status.
void QMediaRecorderControl::statusChanged(QMediaRecorder::Status status) [signal]
Signals that the status of a media recorder has changed.
qreal QMediaRecorderControl::volume() const [pure virtual]
Returns the linear audio gain of media recorder.
See also setVolume().
void QMediaRecorderControl::volumeChanged(qreal gain) [signal]
Signals that the audio gain value has changed.
Macro Documentation
QMediaRecorderControl_iid
org.qt-project.qt.mediarecordercontrol/5.0
Defines the interface name of the QMediaRecorderControl class.