内容表

上一话题

QAudioDeviceInfo

下一话题

QAudioEncoderSettingsControl

QAudioEncoderSettings

QAudioEncoderSettings class provides a set of audio encoder settings. 更多

Inheritance diagram of PySide2.QtMultimedia.QAudioEncoderSettings

概要

函数

详细描述

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() 函数。

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 ( )
返回类型

int

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

另请参阅

setBitRate()

PySide2.QtMultimedia.QAudioEncoderSettings. channelCount ( )
返回类型

int

Returns the number of audio channels.

另请参阅

setChannelCount()

PySide2.QtMultimedia.QAudioEncoderSettings. codec ( )
返回类型

unicode

Returns the audio codec.

另请参阅

setCodec()

PySide2.QtMultimedia.QAudioEncoderSettings. encodingMode ( )
返回类型

EncodingMode

Returns the audio encoding mode.

另请参阅

setEncodingMode() EncodingMode

PySide2.QtMultimedia.QAudioEncoderSettings. encodingOption ( option )
参数

option – unicode

返回类型

object

Returns the value of encoding option .

PySide2.QtMultimedia.QAudioEncoderSettings. encodingOptions ( )
返回类型

Returns the all the encoding options as QVariantMap .

PySide2.QtMultimedia.QAudioEncoderSettings. isNull ( )
返回类型

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 )
参数

other QAudioEncoderSettings

返回类型

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 )
参数

other QAudioEncoderSettings

返回类型

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 ( )
返回类型

EncodingQuality

Returns the audio encoding quality.

另请参阅

setQuality()

PySide2.QtMultimedia.QAudioEncoderSettings. sampleRate ( )
返回类型

int

Returns the audio sample rate in Hz.

另请参阅

setSampleRate()

PySide2.QtMultimedia.QAudioEncoderSettings. setBitRate ( bitrate )
参数

bitrate int

Sets the audio bit rate in bits per second.

另请参阅

bitRate()

PySide2.QtMultimedia.QAudioEncoderSettings. setChannelCount ( channels )
参数

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.

另请参阅

channelCount()

PySide2.QtMultimedia.QAudioEncoderSettings. setCodec ( codec )
参数

codec – unicode

Sets the audio codec .

另请参阅

codec()

PySide2.QtMultimedia.QAudioEncoderSettings. setEncodingMode ( arg__1 )
参数

arg__1 EncodingMode

Sets the audio encoding mode setting.

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.

另请参阅

encodingMode() EncodingMode

PySide2.QtMultimedia.QAudioEncoderSettings. setEncodingOption ( option , value )
参数
  • 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 )
参数

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 )
参数

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.

quality settings parameter is only used in the constant quality encoding mode .

另请参阅

quality()

PySide2.QtMultimedia.QAudioEncoderSettings. setSampleRate ( rate )
参数

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.

另请参阅

sampleRate()