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
- channelCount() → int
Returns the number of audio channels.
See also
- codec() → str
Returns the audio codec.
See also
- encodingMode() → EncodingMode
Returns the audio encoding mode.
See also
- encodingOption(str) → Any
Returns the value of encoding option.
See also
- encodingOptions() → Dict[str, Any]
Returns the all the encoding options as QVariantMap.
See also
- __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
- sampleRate() → int
Returns the audio sample rate in Hz.
See also
- setBitRate(int)
Sets the audio bit rate in bits per second.
See also
- 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
- setCodec(str)
Sets the audio codec.
See also
- 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.
See also
- 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.
See also
- 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