Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QAudioEncoderSettings Class

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

 #include <QAudioEncoderSettings>

Public Functions

QAudioEncoderSettings()
QAudioEncoderSettings(const QAudioEncoderSettings & other)
~QAudioEncoderSettings()
int bitRate() const
int channelCount() const
QString codec() const
QtMultimedia::EncodingMode encodingMode() const
QVariant encodingOption(const QString & option) const
QVariantMap encodingOptions() const
bool isNull() const
QtMultimedia::EncodingQuality quality() const
int sampleRate() const
void setBitRate(int rate)
void setChannelCount(int channels)
void setCodec(const QString & codec)
void setEncodingMode(QtMultimedia::EncodingMode mode)
void setEncodingOption(const QString & option, const QVariant & value)
void setEncodingOptions(const QVariantMap & options)
void setQuality(QtMultimedia::EncodingQuality quality)
void setSampleRate(int rate)
bool operator!=(const QAudioEncoderSettings & other) const
QAudioEncoderSettings & operator=(const QAudioEncoderSettings & other)
bool operator==(const QAudioEncoderSettings & other) const

Detailed 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 QMediaRecorder::setEncodingSettings() function.

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

 recorder->setAudioSettings(audioSettings);

See also QMediaRecorder and QAudioEncoderControl.

Member Function Documentation

QAudioEncoderSettings::QAudioEncoderSettings()

Construct a null audio encoder settings object.

QAudioEncoderSettings::QAudioEncoderSettings(const QAudioEncoderSettings & other)

Constructs a copy of the audio encoder settings object other.

QAudioEncoderSettings::~QAudioEncoderSettings()

Destroys an audio encoder settings object.

int QAudioEncoderSettings::bitRate() const

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

See also setBitRate().

int QAudioEncoderSettings::channelCount() const

Returns the number of audio channels.

See also setChannelCount().

QString QAudioEncoderSettings::codec() const

Returns the audio codec.

See also setCodec().

QtMultimedia::EncodingMode QAudioEncoderSettings::encodingMode() const

Returns the audio encoding mode.

See also setEncodingMode() and QtMultimedia::EncodingMode.

QVariant QAudioEncoderSettings::encodingOption(const QString & option) const

Returns the value of encoding option.

See also setEncodingOption() and encodingOptions().

QVariantMap QAudioEncoderSettings::encodingOptions() const

Returns the all the encoding options as QVariantMap.

See also encodingOption() and setEncodingOptions().

bool QAudioEncoderSettings::isNull() const

Identifies if an audio settings object is initialized.

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

QtMultimedia::EncodingQuality QAudioEncoderSettings::quality() const

Returns the audio encoding quality.

See also setQuality().

int QAudioEncoderSettings::sampleRate() const

Returns the audio sample rate in Hz.

See also setSampleRate().

void QAudioEncoderSettings::setBitRate(int rate)

Sets the audio bit rate in bits per second.

See also bitRate().

void QAudioEncoderSettings::setChannelCount(int channels)

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().

void QAudioEncoderSettings::setCodec(const QString & codec)

Sets the audio codec.

See also codec().

void QAudioEncoderSettings::setEncodingMode(QtMultimedia::EncodingMode mode)

Sets the audio encoding mode setting.

If QtMultimedia::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() and QtMultimedia::EncodingMode.

void QAudioEncoderSettings::setEncodingOption(const QString & option, const QVariant & value)

Set the encoding option value.

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

See also encodingOption() and setEncodingOptions().

void QAudioEncoderSettings::setEncodingOptions(const QVariantMap & options)

Replace all the encoding options.

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

See also encodingOptions(), encodingOption(), and setEncodingOptions().

void QAudioEncoderSettings::setQuality(QtMultimedia::EncodingQuality quality)

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().

void QAudioEncoderSettings::setSampleRate(int rate)

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().

bool QAudioEncoderSettings::operator!=(const QAudioEncoderSettings & other) const

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.

QAudioEncoderSettings & QAudioEncoderSettings::operator=(const QAudioEncoderSettings & other)

Assigns the value of other to an audio encoder settings object.

bool QAudioEncoderSettings::operator==(const QAudioEncoderSettings & other) const

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.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web