CopperSpice API
1.9.2
|
The QVideoEncoderSettings class provides a set of video encoder settings. More...
Public Methods | |
QVideoEncoderSettings () | |
QVideoEncoderSettings (const QVideoEncoderSettings &other) | |
~QVideoEncoderSettings () | |
int | bitRate () const |
QString | codec () const |
QMultimedia::EncodingMode | encodingMode () const |
QVariant | encodingOption (const QString &option) const |
QVariantMap | encodingOptions () const |
qreal | frameRate () const |
bool | isNull () const |
bool | operator!= (const QVideoEncoderSettings &other) const |
QVideoEncoderSettings & | operator= (const QVideoEncoderSettings &other) |
bool | operator== (const QVideoEncoderSettings &other) const |
QMultimedia::EncodingQuality | quality () const |
QSize | resolution () const |
void | setBitRate (int bitrate) |
void | setCodec (const QString &codecName) |
void | setEncodingMode (QMultimedia::EncodingMode mode) |
void | setEncodingOption (const QString &option, const QVariant &value) |
void | setEncodingOptions (const QVariantMap &options) |
void | setFrameRate (qreal rate) |
void | setQuality (QMultimedia::EncodingQuality quality) |
void | setResolution (const QSize &resolution) |
void | setResolution (int width, int height) |
The QVideoEncoderSettings class provides a set of video encoder settings.
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() method.
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.
QString QVideoEncoderSettings::codec | ( | ) | const |
Returns the video codec.
QMultimedia::EncodingMode QVideoEncoderSettings::encodingMode | ( | ) | const |
Returns the video encoding mode.
Returns the value of encoding option.
QVariantMap QVideoEncoderSettings::encodingOptions | ( | ) | const |
Returns the all the encoding options as QVariantMap.
qreal QVideoEncoderSettings::frameRate | ( | ) | const |
Returns the video frame rate.
bool QVideoEncoderSettings::isNull | ( | ) | const |
Identifies if a video encoder settings object is uninitialized.
Returns true if the settings are null, and false if they are not.
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 | ) |
Copy assigns from other and returns a reference to this 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.
QMultimedia::EncodingQuality QVideoEncoderSettings::quality | ( | ) | const |
Returns the video encoding quality.
QSize QVideoEncoderSettings::resolution | ( | ) | const |
Returns the resolution of the encoded video.
void QVideoEncoderSettings::setBitRate | ( | int | bitrate | ) |
Sets the bit rate of the encoded video stream to bitrate.
void QVideoEncoderSettings::setCodec | ( | const QString & | codecName | ) |
Sets the video to the given codecName.
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.
Set the encoding option value. The supported set and meaning of encoding options are system and selected codec specific.
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.
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.
void QVideoEncoderSettings::setQuality | ( | QMultimedia::EncodingQuality | quality | ) |
Sets the video encoding quality, which is only used in the QMultimedia::ConstantQualityEncoding.
Setting the video quality parameter allows backend to choose the balanced set of encoding parameters to achieve the desired quality level.
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.
void QVideoEncoderSettings::setResolution | ( | int | width, |
int | height | ||
) |
Sets the width and height of the resolution of the encoded video.