QAudioEncoderSettings¶
The
QAudioEncoderSettings
class provides a set of audio encoder settings. More…
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
bitRate
()def
channelCount
()def
codec
()def
encodingMode
()def
encodingOption
(option)def
encodingOptions
()def
isNull
()def
quality
()def
sampleRate
()def
setBitRate
(bitrate)def
setChannelCount
(channels)def
setCodec
(codec)def
setEncodingMode
(arg__1)def
setEncodingOption
(option, value)def
setEncodingOptions
(options)def
setQuality
(quality)def
setSampleRate
(rate)
Detailed Description¶
A audio encoder settings object is used to specify the audio encoder settings used by
QMediaRecorder
. Audio encoder settings are selected by constructing aQAudioEncoderSettings
object, setting the desired properties and then passing it to aQMediaRecorder
instance using thesetEncodingSettings()
function.QAudioEncoderSettings audioSettings; audioSettings.setCodec("audio/mpeg"); audioSettings.setChannelCount(2); recorder->setAudioSettings(audioSettings);
- class PySide2.QtMultimedia.QAudioEncoderSettings¶
PySide2.QtMultimedia.QAudioEncoderSettings(other)
- param other:
Construct a null audio encoder settings object.
Constructs a copy of the audio encoder settings object
other
.
- PySide2.QtMultimedia.QAudioEncoderSettings.bitRate()¶
- Return type:
int
Returns the bit rate of the compressed audio stream in bits per second.
See also
- PySide2.QtMultimedia.QAudioEncoderSettings.channelCount()¶
- Return type:
int
Returns the number of audio channels.
See also
- PySide2.QtMultimedia.QAudioEncoderSettings.codec()¶
- Return type:
str
Returns the audio codec.
See also
- PySide2.QtMultimedia.QAudioEncoderSettings.encodingMode()¶
- Return type:
Returns the audio encoding mode.
See also
setEncodingMode()
EncodingMode
- PySide2.QtMultimedia.QAudioEncoderSettings.encodingOption(option)¶
- Parameters:
option – str
- Return type:
object
Returns the value of encoding
option
.See also
- PySide2.QtMultimedia.QAudioEncoderSettings.encodingOptions()¶
- Return type:
Returns the all the encoding options as
QVariantMap
.See also
- PySide2.QtMultimedia.QAudioEncoderSettings.isNull()¶
- Return type:
bool
Identifies if an audio settings object is initialized.
Returns true if the settings object is null, and false if it is not.
- PySide2.QtMultimedia.QAudioEncoderSettings.__ne__(other)¶
- Parameters:
- Return type:
bool
Determines if
other
is of equal value to an audio encoder settings object.Returns true if the settings objects are not of equal value, and true if they are of equal value.
- PySide2.QtMultimedia.QAudioEncoderSettings.__eq__(other)¶
- Parameters:
- Return type:
bool
Determines if
other
is of equal value to an audio encoder settings object.Returns true if the settings objects are of equal value, and false if they are not of equal value.
- PySide2.QtMultimedia.QAudioEncoderSettings.quality()¶
- Return type:
Returns the audio encoding quality.
See also
- PySide2.QtMultimedia.QAudioEncoderSettings.sampleRate()¶
- Return type:
int
Returns the audio sample rate in Hz.
See also
- PySide2.QtMultimedia.QAudioEncoderSettings.setBitRate(bitrate)¶
- Parameters:
bitrate – int
Sets the audio bit
rate
in bits per second.See also
- PySide2.QtMultimedia.QAudioEncoderSettings.setChannelCount(channels)¶
- Parameters:
channels – int
Sets the number of audio
channels
.A value of -1 indicates the encoder should make an optimal choice based on what is available from the audio source and the limitations of the codec.
See also
- PySide2.QtMultimedia.QAudioEncoderSettings.setCodec(codec)¶
- Parameters:
codec – str
Sets the audio
codec
.See also
- PySide2.QtMultimedia.QAudioEncoderSettings.setEncodingMode(arg__1)¶
- Parameters:
arg__1 –
EncodingMode
Sets the audio encoding
mode
setting.If
ConstantQualityEncoding
is set, the quality encoding parameter is used and bit rate is ignored, otherwise the bitrate is used.The audio codec, channels count and sample rate settings are used in all the encoding modes.
See also
encodingMode()
EncodingMode
- PySide2.QtMultimedia.QAudioEncoderSettings.setEncodingOption(option, value)¶
- Parameters:
option – str
value – object
Set the encoding
option
tovalue
.The supported set and meaning of encoding options are system and selected codec specific.
See also
- PySide2.QtMultimedia.QAudioEncoderSettings.setEncodingOptions(options)¶
- Parameters:
options –
Replace all the encoding options with
options
.The supported set and meaning of encoding options are system and selected codec specific.
- PySide2.QtMultimedia.QAudioEncoderSettings.setQuality(quality)¶
- Parameters:
quality –
EncodingQuality
Set the audio encoding
quality
.Setting the audio quality parameter allows backend to choose the balanced set of encoding parameters to achieve the desired quality level.
The
quality
settings parameter is only used in theconstant quality
encoding mode
.See also
- PySide2.QtMultimedia.QAudioEncoderSettings.setSampleRate(rate)¶
- Parameters:
rate – int
Sets the audio sample
rate
in Hz.A value of -1 indicates the encoder should make an optimal choice based on what is avaialbe from the audio source and the limitations of the codec.
See also
© 2022 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.