defuze.me  Client
Public Types | Signals | Public Member Functions | Static Public Member Functions | Friends
Audio::AudioDecoder Class Reference

This is the class which decode the Audio. More...

#include <audiodecoder.hpp>

List of all members.

Public Types

enum  DecoderState {
  BadFormat = -2, NoFile = -1, Iddle, Decoding,
  Stopped
}

Signals

void decodingFinished ()
 Emited when the decoder finished decoding the track.

Public Member Functions

void openFile (QString path)
 Open the file.
void closeFile ()
void start ()
 Start the audio decoder.
void stop ()
 Stop the audio decoder.
void setPlayingPosition (quint64 position)
 seek the position (in bytes)
qint64 getPlayingPosition () const
 Return playingPosition.
QAudioFormat & getFormat ()
int bytesToSeconds (int bytes) const
int duration () const
 Return the current audiotrack duration (sec, ffmpeg value)
DecoderState state () const
 Return the Audio state of the decoder (see AudioState Enum)
bool isInit () const
 Return if the decoder is initializated.
void run ()
qint64 bytesAvailable () const
void setPlayer (const Player::AudioPlayer *player)
bool isPlayerPlaying () const
qint64 readDecodedFrame (char *data, qint64 maxlen)

Static Public Member Functions

static FileFormat getFileFormat (const QString &path)
 Static Method to get the format of an audiotrack using ffmpeg.

Friends

AudioDecoderAudioCore::newAudioDecoder (QString playerName)

Detailed Description

This is the class which decode the Audio.

It use FFMPEG to decode any audio Format. This class must be instantiated by AudioCore::newAudioDecoder(...)

Definition at line 52 of file audiodecoder.hpp.


The documentation for this class was generated from the following files: