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  · 

QAudioDecoderControl Class

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

 #include <QAudioDecoderControl>

This class is under development and is subject to change.

Inherits: QMediaControl.

Public Functions

~QAudioDecoderControl()
virtual QAudioFormat audioFormat() const = 0
virtual bool bufferAvailable() const = 0
virtual qint64 duration() const = 0
virtual qint64 position() const = 0
virtual QAudioBuffer read() = 0
virtual void setAudioFormat(const QAudioFormat & format) = 0
virtual void setSourceDevice(QIODevice * device) = 0
virtual void setSourceFilename(const QString & fileName) = 0
virtual QIODevice * sourceDevice() const = 0
virtual QString sourceFilename() const = 0
virtual void start() = 0
virtual QAudioDecoder::State state() const = 0
virtual void stop() = 0
  • 31 public functions inherited from QObject

Signals

void bufferAvailableChanged(bool available)
void bufferReady()
void durationChanged(qint64 duration)
void error(int error, const QString & errorString)
void finished()
void formatChanged(const QAudioFormat & format)
void positionChanged(qint64 position)
void sourceChanged()
void stateChanged(QAudioDecoder::State state)

Protected Functions

QAudioDecoderControl(QObject * parent = 0)
  • 9 protected functions inherited from QObject

Macros

QAudioDecoderControl_iid

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject

Detailed Description

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

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 QMediaService::requestControl() and QAudioDecoder.

Member Function Documentation

QAudioDecoderControl::QAudioDecoderControl(QObject * parent = 0) [protected]

Constructs a new audio decoder control with the given parent.

QAudioDecoderControl::~QAudioDecoderControl()

Destroys an audio decoder control.

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

Returns the current audio format of the decoded stream.

Any buffers returned should have this format.

See also setAudioFormat() and formatChanged().

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

Returns true if a buffer is available to be read, and false otherwise. If there is no buffer available, calling the read() function may block until a buffer is available or the end of the media is reached

void QAudioDecoderControl::bufferAvailableChanged(bool available) [signal]

Signals that the bufferAvailable property has changed to available.

void QAudioDecoderControl::bufferReady() [signal]

Signals that a new buffer is ready for reading.

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

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

void QAudioDecoderControl::durationChanged(qint64 duration) [signal]

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

See also positionChanged().

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

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

void QAudioDecoderControl::finished() [signal]

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

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

void QAudioDecoderControl::formatChanged(const QAudioFormat & format) [signal]

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

See also audioFormat() and setAudioFormat().

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

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) [signal]

Signals that the current position of the decoder has changed.

See also durationChanged().

QAudioBuffer QAudioDecoderControl::read() [pure virtual]

Read a buffer from the decoder. Returns invalid buffer on failure.

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

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

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

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

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

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

void QAudioDecoderControl::sourceChanged() [signal]

Signals that the current source of the decoder has changed.

See also sourceFilename() and sourceDevice().

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

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

See also setSourceDevice().

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

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

See also setSourceFilename().

void QAudioDecoderControl::start() [pure virtual]

Starts decoding the current media.

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

See also state() and read().

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

Returns the state of a player control.

void QAudioDecoderControl::stateChanged(QAudioDecoder::State state) [signal]

Signals that the state of a player control has changed.

See also state().

void QAudioDecoderControl::stop() [pure virtual]

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.

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