QAudioEncoderSettings

PyQt5.QtMultimedia.QAudioEncoderSettings

Description

The QAudioEncoderSettings class provides a set of audio encoder settings.

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);

See also

QMediaRecorder, QAudioEncoderSettingsControl.

Methods

__init__()

Construct a null audio encoder settings object.


__init__(QAudioEncoderSettings)

Constructs a copy of the audio encoder settings object other.


bitRate() → int

Returns the bit rate of the compressed audio stream in bits per second.

See also

setBitRate().


channelCount() → int

Returns the number of audio channels.

See also

setChannelCount().


codec() → str

Returns the audio codec.

See also

setCodec().


encodingMode() → EncodingMode

Returns the audio encoding mode.


encodingOption(str) → Any

Returns the value of encoding option.


encodingOptions() → Dict[str, Any]

Returns the all the encoding options as QVariantMap.


__eq__(QAudioEncoderSettings) → bool

TODO


isNull() → bool

Identifies if an audio settings object is initialized.

Returns true if the settings object is null, and false if it is not.


__ne__(QAudioEncoderSettings) → bool

TODO


quality() → EncodingQuality

Returns the audio encoding quality.

See also

setQuality().


sampleRate() → int

Returns the audio sample rate in Hz.

See also

setSampleRate().


setBitRate(int)

Sets the audio bit rate in bits per second.

See also

bitRate().


setChannelCount(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

channelCount().


setCodec(str)

Sets the audio codec.

See also

codec().


setEncodingMode(EncodingMode)

TODO


setEncodingOption(str, Any)

Set the encoding option to value.

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


setEncodingOptions(Dict[str, Any])

Replace all the encoding options with options.

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


setQuality(EncodingQuality)

TODO


setSampleRate(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

sampleRate().