QAudioEncoderSettings

The QAudioEncoderSettings class provides a set of audio encoder settings. More

Inheritance diagram of PySide2.QtMultimedia.QAudioEncoderSettings

Synopsis

Functions

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 a QAudioEncoderSettings object, setting the desired properties and then passing it to a QMediaRecorder instance using the setEncodingSettings() function.

QAudioEncoderSettings audioSettings;
audioSettings.setCodec("audio/mpeg");
audioSettings.setChannelCount(2);

recorder->setAudioSettings(audioSettings);
class QAudioEncoderSettings

QAudioEncoderSettings(other)

param other

QAudioEncoderSettings

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

setBitRate()

PySide2.QtMultimedia.QAudioEncoderSettings.channelCount()
Return type

int

Returns the number of audio channels.

PySide2.QtMultimedia.QAudioEncoderSettings.codec()
Return type

unicode

Returns the audio codec.

See also

setCodec()

PySide2.QtMultimedia.QAudioEncoderSettings.encodingMode()
Return type

EncodingMode

Returns the audio encoding mode.

See also

setEncodingMode() EncodingMode

PySide2.QtMultimedia.QAudioEncoderSettings.encodingOption(option)
Parameters

option – unicode

Return type

object

Returns the value of encoding option .

PySide2.QtMultimedia.QAudioEncoderSettings.encodingOptions()
Return type

QVariantMap

Returns the all the encoding options as QVariantMap .

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

otherQAudioEncoderSettings

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

otherQAudioEncoderSettings

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

EncodingQuality

Returns the audio encoding quality.

See also

setQuality()

PySide2.QtMultimedia.QAudioEncoderSettings.sampleRate()
Return type

int

Returns the audio sample rate in Hz.

See also

setSampleRate()

PySide2.QtMultimedia.QAudioEncoderSettings.setBitRate(bitrate)
Parameters

bitrateint

Sets the audio bit rate in bits per second.

See also

bitRate()

PySide2.QtMultimedia.QAudioEncoderSettings.setChannelCount(channels)
Parameters

channelsint

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

channelCount()

PySide2.QtMultimedia.QAudioEncoderSettings.setCodec(codec)
Parameters

codec – unicode

Sets the audio codec .

See also

codec()

PySide2.QtMultimedia.QAudioEncoderSettings.setEncodingMode(arg__1)
Parameters

arg__1EncodingMode

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 – unicode

  • value – object

Set the encoding option to value .

The supported set and meaning of encoding options are system and selected codec specific.

PySide2.QtMultimedia.QAudioEncoderSettings.setEncodingOptions(options)
Parameters

optionsQVariantMap

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

qualityEncodingQuality

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 the constant quality encoding mode .

See also

quality()

PySide2.QtMultimedia.QAudioEncoderSettings.setSampleRate(rate)
Parameters

rateint

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

sampleRate()