QMediaRecorderControl

The QMediaRecorderControl class provides access to the recording functionality of a QMediaService . More

Inheritance diagram of PySide2.QtMultimedia.QMediaRecorderControl

Detailed Description

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 .

class PySide2.QtMultimedia.QMediaRecorderControl([parent=None])
param parent

PySide2.QtCore.QObject

Constructs a media recorder control with the given parent .

PySide2.QtMultimedia.QMediaRecorderControl.actualLocationChanged(location)
Parameters

locationPySide2.QtCore.QUrl

PySide2.QtMultimedia.QMediaRecorderControl.applySettings()

Commits the encoder settings and performs pre-initialization to reduce delays when recording is started.

PySide2.QtMultimedia.QMediaRecorderControl.duration()
Return type

int

Return the current duration in milliseconds.

PySide2.QtMultimedia.QMediaRecorderControl.durationChanged(position)
Parameters

position – int

PySide2.QtMultimedia.QMediaRecorderControl.error(error, errorString)
Parameters
  • error – int

  • errorString – str

PySide2.QtMultimedia.QMediaRecorderControl.isMuted()
Return type

bool

Returns true if the recorder is muted, and false if it is not.

PySide2.QtMultimedia.QMediaRecorderControl.mutedChanged(muted)
Parameters

muted – bool

PySide2.QtMultimedia.QMediaRecorderControl.outputLocation()
Return type

PySide2.QtCore.QUrl

Returns the current output location being used.

PySide2.QtMultimedia.QMediaRecorderControl.setMuted(muted)
Parameters

muted – bool

Sets the muted state of a media recorder.

See also

isMuted()

PySide2.QtMultimedia.QMediaRecorderControl.setOutputLocation(location)
Parameters

locationPySide2.QtCore.QUrl

Return type

bool

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()

PySide2.QtMultimedia.QMediaRecorderControl.setState(state)
Parameters

stateState

Set the media recorder state .

See also

state()

PySide2.QtMultimedia.QMediaRecorderControl.setVolume(volume)
Parameters

volume – float

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()

PySide2.QtMultimedia.QMediaRecorderControl.state()
Return type

State

Return the current recording state.

See also

setState()

PySide2.QtMultimedia.QMediaRecorderControl.stateChanged(state)
Parameters

stateState

PySide2.QtMultimedia.QMediaRecorderControl.status()
Return type

Status

Return the current recording status.

PySide2.QtMultimedia.QMediaRecorderControl.statusChanged(status)
Parameters

statusStatus

PySide2.QtMultimedia.QMediaRecorderControl.volume()
Return type

float

Returns the audio volume of a media recorder control.

See also

setVolume()

PySide2.QtMultimedia.QMediaRecorderControl.volumeChanged(volume)
Parameters

volume – float