IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QVideoEncoderSettings Class

The QVideoEncoderSettings class provides a set of video encoder settings.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QVideoEncoderSettings Class

  • Header: QVideoEncoderSettings

  • qmake: QT += multimedia

  • Group: QVideoEncoderSettings is part of multimedia, multimedia_recording

Detailed Description

A video encoder settings object is used to specify the video encoder settings used by QMediaRecorder. Video encoder settings are selected by constructing a QVideoEncoderSettings object, setting the desired properties and then passing it to a QMediaRecorder instance using the QMediaRecorder::setEncodingSettings() function.

 
Sélectionnez
QVideoEncoderSettings videoSettings;
videoSettings.setCodec("video/mpeg2");
videoSettings.setResolution(640, 480);

recorder->setVideoSettings(videoSettings);

See Also

Member Function Documentation

 

QVideoEncoderSettings::QVideoEncoderSettings()

Constructs a null video encoder settings object.

QVideoEncoderSettings::QVideoEncoderSettings(const QVideoEncoderSettings &other)

Constructs a copy of the video encoder settings object other.

QVideoEncoderSettings::~QVideoEncoderSettings()

Destroys a video encoder settings object.

int QVideoEncoderSettings::bitRate() const

Returns bit rate of the encoded video stream in bits per second.

See Also

See also setBitRate()

QString QVideoEncoderSettings::codec() const

Returns the video codec.

See Also

See also setCodec()

QMultimedia::EncodingMode QVideoEncoderSettings::encodingMode() const

Returns the video encoding mode.

See Also

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

Returns the value of encoding option.

See Also

QVariantMap QVideoEncoderSettings::encodingOptions() const

Returns the all the encoding options as QVariantMap.

See Also

qreal QVideoEncoderSettings::frameRate() const

Returns the video frame rate.

See Also

See also setFrameRate()

bool QVideoEncoderSettings::isNull() const

Identifies if a video encoder settings object is uninitalized.

Returns true if the settings are null, and false if they are not.

QMultimedia::EncodingQuality QVideoEncoderSettings::quality() const

Returns the video encoding quality.

See Also

See also setQuality()

QSize QVideoEncoderSettings::resolution() const

Returns the resolution of the encoded video.

See Also

See also setResolution()

void QVideoEncoderSettings::setBitRate(int value)

Sets the bit rate of the encoded video stream to value.

See Also

See also bitRate()

void QVideoEncoderSettings::setCodec(const QString &codec)

Sets the video codec.

See Also

See also codec()

void QVideoEncoderSettings::setEncodingMode(QMultimedia::EncodingMode mode)

Sets the video encoding mode.

If QMultimedia::ConstantQualityEncoding is set, the quality encoding parameter is used and bit rate is ignored, otherwise the bitrate is used.

The rest of encoding settings are respected regardless of encoding mode.

See Also

void QVideoEncoderSettings::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

void QVideoEncoderSettings::setEncodingOptions(const QVariantMap &options)

Replace all the encoding options with options.

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

See Also

void QVideoEncoderSettings::setFrameRate(qreal rate)

Sets the video frame rate.

A value of 0 indicates the encoder should make an optimal choice based on what is available from the video source and the limitations of the codec.

See Also

See also frameRate()

void QVideoEncoderSettings::setQuality(QMultimedia::EncodingQuality quality)

Sets the video encoding quality.

Setting the video 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. The quality settings parameter is only used in the constant quality encoding mode.

See Also

See also quality()

void QVideoEncoderSettings::setResolution(const QSize &resolution)

Sets the resolution of the encoded video.

An empty QSize indicates the encoder should make an optimal choice based on what is available from the video source and the limitations of the codec.

See Also

See also resolution()

void QVideoEncoderSettings::setResolution(int width, int height)

Sets the width and height of the resolution of the encoded video.

This is an overloaded function.

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

Determines if other is of equal value to a video encoder settings object.

Returns true if the settings objects are not of equal value, and false if they are of equal value.

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

Assigns the value of other to a video encoder settings object.

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

Determines if other is of equal value to a video encoder settings object.

Returns true if the settings objects are of equal value, and false if they are not of equal value.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+