QAudioDecoderControl¶
The
QAudioDecoderControl
class provides access to the audio decoding functionality of aQMediaService
. More…
Detailed Description¶
The functionality provided by this control is exposed to application code through the
QAudioDecoder
class.The interface name of
QAudioDecoderControl
isorg.qt-project.qt.audiodecodercontrol/5.0
as defined inQAudioDecoderControl_iid
.See also
-
class
QAudioDecoderControl
([parent=None])¶ - param parent
QObject
Constructs a new audio decoder control with the given
parent
.
-
PySide2.QtMultimedia.QAudioDecoderControl.
audioFormat
()¶ - Return type
Returns the current audio format of the decoded stream.
Any buffers returned should have this format.
See also
-
PySide2.QtMultimedia.QAudioDecoderControl.
bufferAvailable
()¶ - Return type
bool
Returns true if a buffer is available to be read, and false otherwise.
-
PySide2.QtMultimedia.QAudioDecoderControl.
bufferAvailableChanged
(available)¶ - Parameters
available –
bool
-
PySide2.QtMultimedia.QAudioDecoderControl.
bufferReady
()¶
-
PySide2.QtMultimedia.QAudioDecoderControl.
duration
()¶ - Return type
qint64
Returns total duration (in milliseconds) of the audio stream or -1 if not available.
-
PySide2.QtMultimedia.QAudioDecoderControl.
durationChanged
(duration)¶ - Parameters
duration –
qint64
-
PySide2.QtMultimedia.QAudioDecoderControl.
error
(error, errorString)¶ - Parameters
error –
int
errorString – unicode
-
PySide2.QtMultimedia.QAudioDecoderControl.
finished
()¶
-
PySide2.QtMultimedia.QAudioDecoderControl.
formatChanged
(format)¶ - Parameters
format –
QAudioFormat
-
PySide2.QtMultimedia.QAudioDecoderControl.
position
()¶ - Return type
qint64
Returns position (in milliseconds) of the last buffer read from the decoder or -1 if no buffers have been read.
-
PySide2.QtMultimedia.QAudioDecoderControl.
positionChanged
(position)¶ - Parameters
position –
qint64
-
PySide2.QtMultimedia.QAudioDecoderControl.
read
()¶ - Return type
Attempts to read a buffer from the decoder, without blocking. Returns invalid buffer if there are no decoded buffers available, or on error.
-
PySide2.QtMultimedia.QAudioDecoderControl.
setAudioFormat
(format)¶ - Parameters
format –
QAudioFormat
Set the desired audio format for decoded samples to
format
.If the decoder does not support this format,
error()
will be set toFormatError
.If you do not specify a format, the format of the decoded audio itself will be used. Otherwise, some format conversion will be applied.
If you wish to reset the decoded format to that of the original audio file, you can specify an invalid
format
.See also
-
PySide2.QtMultimedia.QAudioDecoderControl.
setSourceDevice
(device)¶ - Parameters
device –
QIODevice
Sets the current source to
device
. Changing the source will stop any current decoding and discard any buffers.Sources are exclusive, so only one can be set.
See also
-
PySide2.QtMultimedia.QAudioDecoderControl.
setSourceFilename
(fileName)¶ - Parameters
fileName – unicode
Sets the current source to
fileName
. Changing the source will stop any current decoding and discard any buffers.Sources are exclusive, so only one can be set.
See also
-
PySide2.QtMultimedia.QAudioDecoderControl.
sourceChanged
()¶
-
PySide2.QtMultimedia.QAudioDecoderControl.
sourceDevice
()¶ - Return type
QIODevice
Returns the current media source
QIODevice
, or 0 if none (or a file).See also
-
PySide2.QtMultimedia.QAudioDecoderControl.
sourceFilename
()¶ - Return type
unicode
Returns the current media source filename, or a null
QString
if none (or a device)See also
-
PySide2.QtMultimedia.QAudioDecoderControl.
start
()¶ Starts decoding the current media.
If successful the player control will immediately enter the
decoding
state.
-
PySide2.QtMultimedia.QAudioDecoderControl.
state
()¶ - Return type
State
Returns the state of a player control.
-
PySide2.QtMultimedia.QAudioDecoderControl.
stateChanged
(newState)¶ - Parameters
newState –
State
-
PySide2.QtMultimedia.QAudioDecoderControl.
stop
()¶ Stops playback of the current media and discards any buffers.
If successful the player control will immediately enter the
stopped
state.
© 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.