The QAudioEncoderSettings class provides a set of audio encoder settings. 更多...
| 頭: | #include <QAudioEncoderSettings> |
| qmake: | QT += multimedia |
| QAudioEncoderSettings () | |
| QAudioEncoderSettings (const QAudioEncoderSettings & other ) | |
| ~QAudioEncoderSettings () | |
| int | bitRate () const |
| int | channelCount () const |
| QString | codec () const |
| QMultimedia::EncodingMode | encodingMode () const |
| QVariant | encodingOption (const QString & option ) const |
| QVariantMap | encodingOptions () const |
| bool | isNull () const |
| QMultimedia::EncodingQuality | quality () const |
| int | sampleRate () const |
| void | setBitRate (int rate ) |
| void | setChannelCount (int channels ) |
| void | setCodec (const QString & codec ) |
| void | setEncodingMode (QMultimedia::EncodingMode mode ) |
| void | setEncodingOption (const QString & option , const QVariant & value ) |
| void | setEncodingOptions (const QVariantMap & options ) |
| void | setQuality (QMultimedia::EncodingQuality quality ) |
| void | setSampleRate (int rate ) |
| bool | operator!= (const QAudioEncoderSettings & other ) const |
| QAudioEncoderSettings & | operator= (const QAudioEncoderSettings & other ) |
| bool | operator== (const QAudioEncoderSettings & other ) const |
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 QMediaRecorder::setEncodingSettings () 函數。
QAudioEncoderSettings audioSettings; audioSettings.setCodec("audio/mpeg"); audioSettings.setChannelCount(2); recorder->setAudioSettings(audioSettings);
另請參閱 QMediaRecorder and QAudioEncoderSettingsControl .
Construct a null audio encoder settings object.
Constructs a copy of the audio encoder settings object other .
Destroys an audio encoder settings object.
Returns the bit rate of the compressed audio stream in bits per second.
另請參閱 setBitRate ().
Returns the number of audio channels.
另請參閱 setChannelCount ().
Returns the audio codec.
另請參閱 setCodec ().
Returns the audio encoding mode.
另請參閱 setEncodingMode () 和 QMultimedia::EncodingMode .
返迴值為編碼 option .
另請參閱 setEncodingOption () 和 encodingOptions ().
返迴所有編碼選項按 QVariantMap .
另請參閱 encodingOption () 和 setEncodingOptions ().
Identifies if an audio settings object is initialized.
Returns true if the settings object is null, and false if it is not.
Returns the audio encoding quality.
另請參閱 setQuality ().
Returns the audio sample rate in Hz.
另請參閱 setSampleRate ().
Sets the audio bit rate 以位每秒為單位。
另請參閱 bitRate ().
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 ().
設置音頻 codec .
另請參閱 codec ().
Sets the audio encoding mode 設置。
若 QMultimedia::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 () 和 QMultimedia::EncodingMode .
設置編碼 option to value .
The supported set and meaning of encoding options are system and selected codec specific.
另請參閱 encodingOption () 和 setEncodingOptions ().
Replace all the encoding options with options .
The supported set and meaning of encoding options are system and selected codec specific.
另請參閱 encodingOptions (), encodingOption (),和 setEncodingOption ().
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 .
另請參閱 quality ().
Sets the audio sample rate (以 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 ().
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.
賦值值 other to an audio encoder settings object.
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.