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

QAudioDecoderControl Class

The QAudioDecoderControl class provides access to the audio decoding functionality of a QMediaService.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QAudioDecoderControl Class

  • Header: QAudioDecoderControl

  • qmake: QT += multimedia

  • Inherits: QMediaControl

  • Inherited By:

  • Group: QAudioDecoderControl is part of multimedia_control

This class is under development and is subject to change.

Detailed Description

The functionality provided by this control is exposed to application code through the QAudioDecoder class.

The interface name of QAudioDecoderControl is org.qt-project.qt.audiodecodercontrol/5.0 as defined in QAudioDecoderControl_iid.

See Also

Member Function Documentation

 

[explicit protected] QAudioDecoderControl::QAudioDecoderControl(QObject *parent = nullptr)

Constructs a new audio decoder control with the given parent.

[virtual] QAudioDecoderControl::~QAudioDecoderControl()

Destroys an audio decoder control.

[pure virtual] QAudioFormat QAudioDecoderControl::audioFormat() const

Returns the current audio format of the decoded stream.

Any buffers returned should have this format.

See Also

[pure virtual] bool QAudioDecoderControl::bufferAvailable() const

Returns true if a buffer is available to be read, and false otherwise.

void QAudioDecoderControl::bufferAvailableChanged(bool available)

Signals that the bufferAvailable property has changed to available.

void QAudioDecoderControl::bufferReady()

Signals that a new buffer is ready for reading.

[pure virtual] qint64 QAudioDecoderControl::duration() const

Returns total duration (in milliseconds) of the audio stream or -1 if not available.

void QAudioDecoderControl::durationChanged(qint64 duration)

Signals that the estimated duration of the decoded data has changed.

See Also

See also positionChanged()

void QAudioDecoderControl::error(int error, const QString &errorString)

Signals that an error has occurred. The errorString provides a more detailed explanation.

void QAudioDecoderControl::finished()

Signals that the decoding has finished successfully. If decoding fails, error signal is emitted instead.

See Also

See also start(), stop(), error()

void QAudioDecoderControl::formatChanged(const QAudioFormat &format)

Signals that the current audio format of the decoder has changed to format.

See Also

See also audioFormat(), setAudioFormat()

[pure virtual] qint64 QAudioDecoderControl::position() const

Returns position (in milliseconds) of the last buffer read from the decoder or -1 if no buffers have been read.

void QAudioDecoderControl::positionChanged(qint64 position)

Signals that the current position of the decoder has changed.

See Also

See also durationChanged()

[pure virtual] QAudioBuffer QAudioDecoderControl::read()

Attempts to read a buffer from the decoder, without blocking. Returns invalid buffer if there are no decoded buffers available, or on error.

[pure virtual] void QAudioDecoderControl::setAudioFormat(const QAudioFormat &format)

Set the desired audio format for decoded samples to format.

If the decoder does not support this format, error() will be set to FormatError.

If you do not specify a format, the format of the decoded audio itself will be used. Otherwise, some format conversion will be applied.

If you wish to reset the decoded format to that of the original audio file, you can specify an invalid format.

See Also

See also audioFormat()

[pure virtual] void QAudioDecoderControl::setSourceDevice(QIODevice *device)

Sets the current source to device. Changing the source will stop any current decoding and discard any buffers.

Sources are exclusive, so only one can be set.

See Also

See also sourceDevice()

[pure virtual] void QAudioDecoderControl::setSourceFilename(const QString &fileName)

Sets the current source to fileName. Changing the source will stop any current decoding and discard any buffers.

Sources are exclusive, so only one can be set.

See Also

See also sourceFilename()

void QAudioDecoderControl::sourceChanged()

Signals that the current source of the decoder has changed.

See Also

[pure virtual] QIODevice *QAudioDecoderControl::sourceDevice() const

Returns the current media source QIODevice, or 0 if none (or a file).

See Also

See also setSourceDevice()

[pure virtual] QString QAudioDecoderControl::sourceFilename() const

Returns the current media source filename, or a null QString if none (or a device)

See Also

See also setSourceFilename()

[pure virtual] void QAudioDecoderControl::start()

Starts decoding the current media.

If successful the player control will immediately enter the decoding state.

See Also

See also state(), read()

[pure virtual] QAudioDecoder::State QAudioDecoderControl::state() const

Returns the state of a player control.

void QAudioDecoderControl::stateChanged(QAudioDecoder::State newState)

Signals that the state of a player control has changed to newState.

See Also

See also state()

[pure virtual] void QAudioDecoderControl::stop()

Stops playback of the current media and discards any buffers.

If successful the player control will immediately enter the stopped state.

Macro Documentation

 

QAudioDecoderControl_iid

org.qt-project.qt.audiodecodercontrol/5.0

Defines the interface name of the QAudioDecoderControl class.

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