内容表

上一话题

QMediaRecorder

下一话题

QMediaResource

QMediaRecorderControl

QMediaRecorderControl class provides access to the recording functionality of a QMediaService . 更多

Inheritance diagram of PySide2.QtMultimedia.QMediaRecorderControl

详细描述

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 .

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 作为定义在 QMediaRecorderControl_iid .

class QMediaRecorderControl ( [ parent=None ] )
param parent

QObject

Constructs a media recorder control with the given parent .

PySide2.QtMultimedia.QMediaRecorderControl. actualLocationChanged ( location )
参数

location QUrl

PySide2.QtMultimedia.QMediaRecorderControl. applySettings ( )

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

PySide2.QtMultimedia.QMediaRecorderControl. duration ( )
返回类型

qint64

Return the current duration in milliseconds.

PySide2.QtMultimedia.QMediaRecorderControl. durationChanged ( position )
参数

position qint64

PySide2.QtMultimedia.QMediaRecorderControl. error ( error , errorString )
参数
  • error int

  • errorString – unicode

PySide2.QtMultimedia.QMediaRecorderControl. isMuted ( )
返回类型

bool

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

PySide2.QtMultimedia.QMediaRecorderControl. mutedChanged ( muted )
参数

muted bool

PySide2.QtMultimedia.QMediaRecorderControl. outputLocation ( )
返回类型

QUrl

Returns the current output location being used.

PySide2.QtMultimedia.QMediaRecorderControl. setMuted ( muted )
参数

muted bool

设置 muted state of a media recorder.

另请参阅

isMuted()

PySide2.QtMultimedia.QMediaRecorderControl. setOutputLocation ( location )
参数

location QUrl

返回类型

bool

Sets the output location and returns if this operation is successful. If file at the output location already exists, it should be overwritten.

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() 信号。

另请参阅

outputLocation()

PySide2.QtMultimedia.QMediaRecorderControl. setState ( state )
参数

state State

Set the media recorder state .

另请参阅

state()

PySide2.QtMultimedia.QMediaRecorderControl. setVolume ( volume )
参数

volume qreal

Sets the audio volume of a media recorder control.

The volume is scaled linearly, ranging from 0 (silence) to 100 (full volume).

另请参阅

volume()

PySide2.QtMultimedia.QMediaRecorderControl. state ( )
返回类型

State

Return the current recording state.

另请参阅

setState()

PySide2.QtMultimedia.QMediaRecorderControl. stateChanged ( state )
参数

state State

PySide2.QtMultimedia.QMediaRecorderControl. status ( )
返回类型

Status

Return the current recording status.

PySide2.QtMultimedia.QMediaRecorderControl. statusChanged ( status )
参数

status Status

PySide2.QtMultimedia.QMediaRecorderControl. volume ( )
返回类型

qreal

Returns the audio volume of a media recorder control.

另请参阅

setVolume()

PySide2.QtMultimedia.QMediaRecorderControl. volumeChanged ( volume )
参数

volume qreal