QMediaRecorderControlclass provides access to the recording functionality of aQMediaService. 更多 …
Generally you will use the
QMediaRecorderclass in application code - this class is mostly used when implementing a newQMediaServiceor if there is access to specific low level functionality not otherwise present inQMediaRecorder.若
QMediaServicecan record media it will implementQMediaRecorderControl. This control provides a means to set theoutput location, and record, pause and stop recording via thesetState()method. It also provides feedback on thedurationof the recording.The interface name of
QMediaRecorderControlisorg.qt-project.qt.mediarecordercontrol/5.0作为定义在QMediaRecorderControl_iid.
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.
另请参阅
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()
信号。
另请参阅
PySide2.QtMultimedia.QMediaRecorderControl.
setState
(
state
)
¶
state
–
State
Set the media recorder
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).
另请参阅
PySide2.QtMultimedia.QMediaRecorderControl.
state
(
)
¶
State
Return the current recording state.
另请参阅
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.
另请参阅
PySide2.QtMultimedia.QMediaRecorderControl.
volumeChanged
(
volume
)
¶
volume
–
qreal