FlacDecoder Class Reference

#include <flacdecoder.h>

Inheritance diagram for FlacDecoder:

Decoder MythObservable

List of all members.


Detailed Description

Definition at line 88 of file flacdecoder.h.


Public Member Functions

 FlacDecoder (const QString &file, DecoderFactory *, QIODevice *, AudioOutput *)
virtual ~FlacDecoder (void)
bool initialize ()
double lengthInSeconds ()
void seek (double)
void stop ()
void doWrite (const FLAC__Frame *frame, const FLAC__int32 *const buffer[])
void setFlacMetadata (const FLAC__StreamMetadata *metadata)
MetaIOdoCreateTagger (void)
 Create a MetaIO object for the format.

Private Member Functions

void run ()
void flush (bool=FALSE)
void deinit ()

Private Attributes

bool inited
bool user_stop
int stat
char * output_buf
ulong output_bytes
ulong output_at
StreamDecoder * decoder
unsigned int bks
bool done
bool finish
long len
long freq
long bitrate
int chan
int bitspersample
double totalTime
double seekTime
unsigned long totalsamples

Constructor & Destructor Documentation

FlacDecoder::FlacDecoder ( const QString &  file,
DecoderFactory d,
QIODevice *  i,
AudioOutput o 
)

Definition at line 170 of file flacdecoder.cpp.

FlacDecoder::~FlacDecoder ( void   )  [virtual]

Definition at line 194 of file flacdecoder.cpp.


Member Function Documentation

bool FlacDecoder::initialize (  )  [virtual]

Implements Decoder.

Definition at line 236 of file flacdecoder.cpp.

double FlacDecoder::lengthInSeconds (  ) 

void FlacDecoder::seek ( double  pos  )  [virtual]

Implements Decoder.

Definition at line 286 of file flacdecoder.cpp.

void FlacDecoder::stop ( void   )  [virtual]

Implements Decoder.

Definition at line 204 of file flacdecoder.cpp.

void FlacDecoder::doWrite ( const FLAC__Frame *  frame,
const FLAC__int32 *const   buffer[] 
)

Definition at line 90 of file flacdecoder.cpp.

Referenced by flacwrite().

void FlacDecoder::setFlacMetadata ( const FLAC__StreamMetadata *  metadata  ) 

Definition at line 144 of file flacdecoder.cpp.

Referenced by flacmetadata().

MetaIO * FlacDecoder::doCreateTagger ( void   )  [virtual]

Create a MetaIO object for the format.

This method should be overwritten by subclasses to return an instance of the appropriate MetaIO subtype. It is used by Decoder::getMetadata, Decoder::readMetadata and Decoder::commitMetadata.

The default implementation returns a NULL pointer, which essentially means, that if the decoder does not overrider this method or all of the users (see previous paragraph), files that the decoder supports cannot be indexed using metadata in the file.

e.g. the mp3 decoder (MadDecoder) implements this, whereas the audio CD decoder (CdDecoder) does not.

Returns:
an instance of MetaIO owned by the caller

Reimplemented from Decoder.

Definition at line 397 of file flacdecoder.cpp.

void FlacDecoder::run ( void   )  [private]

Definition at line 308 of file flacdecoder.cpp.

void FlacDecoder::flush ( bool  final = FALSE  )  [private]

Definition at line 209 of file flacdecoder.cpp.

Referenced by run().

void FlacDecoder::deinit (  )  [private]

Definition at line 291 of file flacdecoder.cpp.

Referenced by run(), and ~FlacDecoder().


Member Data Documentation

Definition at line 110 of file flacdecoder.h.

Referenced by deinit(), FlacDecoder(), flush(), initialize(), run(), and ~FlacDecoder().

Definition at line 110 of file flacdecoder.h.

Referenced by deinit(), FlacDecoder(), flush(), initialize(), run(), and stop().

int FlacDecoder::stat [private]

Definition at line 111 of file flacdecoder.h.

Referenced by deinit(), FlacDecoder(), initialize(), and run().

char* FlacDecoder::output_buf [private]

Definition at line 112 of file flacdecoder.h.

Referenced by doWrite(), FlacDecoder(), flush(), initialize(), and ~FlacDecoder().

Definition at line 113 of file flacdecoder.h.

Referenced by doWrite(), FlacDecoder(), flush(), and initialize().

Definition at line 113 of file flacdecoder.h.

Referenced by doWrite(), FlacDecoder(), flush(), and initialize().

StreamDecoder* FlacDecoder::decoder [private]

Definition at line 115 of file flacdecoder.h.

Referenced by deinit(), FlacDecoder(), initialize(), and run().

unsigned int FlacDecoder::bks [private]

Definition at line 117 of file flacdecoder.h.

Referenced by FlacDecoder(), flush(), and initialize().

Definition at line 118 of file flacdecoder.h.

Referenced by deinit(), FlacDecoder(), flush(), initialize(), and run().

Definition at line 118 of file flacdecoder.h.

Referenced by deinit(), FlacDecoder(), flush(), initialize(), and run().

long FlacDecoder::len [private]

Definition at line 119 of file flacdecoder.h.

Referenced by deinit(), FlacDecoder(), and initialize().

long FlacDecoder::freq [private]

Definition at line 119 of file flacdecoder.h.

Referenced by deinit(), FlacDecoder(), initialize(), and setFlacMetadata().

long FlacDecoder::bitrate [private]

Definition at line 119 of file flacdecoder.h.

Referenced by deinit(), FlacDecoder(), and initialize().

int FlacDecoder::chan [private]

Definition at line 120 of file flacdecoder.h.

Referenced by deinit(), doWrite(), FlacDecoder(), flush(), initialize(), and setFlacMetadata().

Definition at line 121 of file flacdecoder.h.

Referenced by doWrite(), flush(), and setFlacMetadata().

double FlacDecoder::totalTime [private]

Definition at line 122 of file flacdecoder.h.

Referenced by FlacDecoder(), and initialize().

double FlacDecoder::seekTime [private]

Definition at line 122 of file flacdecoder.h.

Referenced by FlacDecoder(), initialize(), run(), and seek().

unsigned long FlacDecoder::totalsamples [private]

Definition at line 123 of file flacdecoder.h.

Referenced by run(), and setFlacMetadata().


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

Generated on Sat Dec 18 05:16:03 2010 for MythTV by  doxygen 1.5.5