#include <maddecoder.h>

Definition at line 12 of file maddecoder.h.
Public Member Functions | |
| MadDecoder (const QString &file, DecoderFactory *, QIODevice *, AudioOutput *) | |
| virtual | ~MadDecoder (void) |
| bool | initialize () |
| void | seek (double) |
| void | stop () |
| MetaIO * | doCreateTagger (void) |
Create a MetaIO object for the format. | |
Static Public Attributes | |
| static const int | maxDecodeRetries |
| static const int | maxFrameSize |
| static const int | maxFrameCheck |
| static const int | initialFrameSize |
Private Types | |
| enum | { XING_FRAMES = 0x0001, XING_BYTES = 0x0002, XING_TOC = 0x0004, XING_SCALE = 0x0008 } |
Private Member Functions | |
| void | run () |
| enum mad_flow | madOutput () |
| enum mad_flow | madError (struct mad_stream *, struct mad_frame *) |
| void | flush (bool=FALSE) |
| void | deinit () |
| bool | findHeader () |
| bool | findXingHeader (struct mad_bitptr, unsigned int) |
| void | calcLength (struct mad_header *) |
Private Attributes | |
| bool | inited |
| bool | user_stop |
| bool | done |
| bool | finish |
| bool | derror |
| bool | eof |
| bool | useeq |
| double | totalTime |
| double | seekTime |
| int | stat |
| int | channels |
| long | bitrate |
| long | freq |
| long | len |
| unsigned int | bks |
| mad_fixed_t | eqbands [32] |
| char * | input_buf |
| unsigned long | input_bytes |
| char * | output_buf |
| unsigned long | output_bytes |
| unsigned long | output_at |
| unsigned long | output_size |
| struct { | |
| int flags | |
| unsigned long frames | |
| unsigned long bytes | |
| unsigned char toc [100] | |
| long scale | |
| } | |
| struct mad_stream | stream |
| struct mad_frame | frame |
| struct mad_synth | synth |
anonymous enum [private] |
| MadDecoder::MadDecoder | ( | const QString & | file, | |
| DecoderFactory * | d, | |||
| QIODevice * | i, | |||
| AudioOutput * | o | |||
| ) |
Definition at line 23 of file maddecoder.cpp.
| MadDecoder::~MadDecoder | ( | void | ) | [virtual] |
Definition at line 49 of file maddecoder.cpp.
| bool MadDecoder::initialize | ( | ) | [virtual] |
| void MadDecoder::seek | ( | double | pos | ) | [virtual] |
| void MadDecoder::stop | ( | void | ) | [virtual] |
| MetaIO * MadDecoder::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.
MetaIO owned by the caller Reimplemented from Decoder.
Definition at line 539 of file maddecoder.cpp.
| void MadDecoder::run | ( | void | ) | [private] |
Definition at line 317 of file maddecoder.cpp.
| enum mad_flow MadDecoder::madOutput | ( | ) | [private] |
| enum mad_flow MadDecoder::madError | ( | struct mad_stream * | stream, | |
| struct mad_frame * | ||||
| ) | [private] |
Definition at line 530 of file maddecoder.cpp.
| void MadDecoder::flush | ( | bool | final = FALSE |
) | [private] |
| void MadDecoder::deinit | ( | ) | [private] |
| bool MadDecoder::findHeader | ( | ) | [private] |
| bool MadDecoder::findXingHeader | ( | struct mad_bitptr | ptr, | |
| unsigned int | bitlen | |||
| ) | [private] |
| void MadDecoder::calcLength | ( | struct mad_header * | header | ) | [private] |
const int MadDecoder::maxDecodeRetries [static] |
Definition at line 22 of file maddecoder.h.
const int MadDecoder::maxFrameSize [static] |
Definition at line 23 of file maddecoder.h.
const int MadDecoder::maxFrameCheck [static] |
Definition at line 24 of file maddecoder.h.
const int MadDecoder::initialFrameSize [static] |
Definition at line 25 of file maddecoder.h.
bool MadDecoder::inited [private] |
Definition at line 41 of file maddecoder.h.
Referenced by deinit(), flush(), initialize(), MadDecoder(), run(), and ~MadDecoder().
bool MadDecoder::user_stop [private] |
Definition at line 41 of file maddecoder.h.
Referenced by deinit(), flush(), initialize(), MadDecoder(), run(), and stop().
bool MadDecoder::done [private] |
Definition at line 41 of file maddecoder.h.
Referenced by deinit(), findHeader(), flush(), initialize(), MadDecoder(), madOutput(), and run().
bool MadDecoder::finish [private] |
Definition at line 41 of file maddecoder.h.
Referenced by deinit(), flush(), initialize(), MadDecoder(), madOutput(), and run().
bool MadDecoder::derror [private] |
Definition at line 41 of file maddecoder.h.
Referenced by deinit(), initialize(), MadDecoder(), and run().
bool MadDecoder::eof [private] |
Definition at line 41 of file maddecoder.h.
Referenced by deinit(), initialize(), MadDecoder(), and run().
bool MadDecoder::useeq [private] |
Definition at line 41 of file maddecoder.h.
double MadDecoder::totalTime [private] |
Definition at line 42 of file maddecoder.h.
Referenced by calcLength(), deinit(), initialize(), MadDecoder(), and run().
double MadDecoder::seekTime [private] |
Definition at line 42 of file maddecoder.h.
Referenced by deinit(), initialize(), MadDecoder(), run(), and seek().
int MadDecoder::stat [private] |
Definition at line 43 of file maddecoder.h.
Referenced by deinit(), initialize(), MadDecoder(), and run().
int MadDecoder::channels [private] |
Definition at line 43 of file maddecoder.h.
Referenced by deinit(), findHeader(), flush(), initialize(), MadDecoder(), and madOutput().
long MadDecoder::bitrate [private] |
Definition at line 44 of file maddecoder.h.
Referenced by deinit(), findHeader(), initialize(), MadDecoder(), and madOutput().
long MadDecoder::freq [private] |
Definition at line 44 of file maddecoder.h.
Referenced by deinit(), findHeader(), initialize(), MadDecoder(), and madOutput().
long MadDecoder::len [private] |
Definition at line 44 of file maddecoder.h.
Referenced by deinit(), initialize(), MadDecoder(), and run().
unsigned int MadDecoder::bks [private] |
Definition at line 45 of file maddecoder.h.
Referenced by deinit(), flush(), initialize(), and MadDecoder().
mad_fixed_t MadDecoder::eqbands[32] [private] |
Definition at line 46 of file maddecoder.h.
char* MadDecoder::input_buf [private] |
Definition at line 48 of file maddecoder.h.
Referenced by findHeader(), initialize(), MadDecoder(), run(), and ~MadDecoder().
unsigned long MadDecoder::input_bytes [private] |
Definition at line 49 of file maddecoder.h.
Referenced by deinit(), findHeader(), initialize(), MadDecoder(), and run().
char* MadDecoder::output_buf [private] |
Definition at line 51 of file maddecoder.h.
Referenced by flush(), initialize(), MadDecoder(), madOutput(), and ~MadDecoder().
unsigned long MadDecoder::output_bytes [private] |
Definition at line 52 of file maddecoder.h.
Referenced by deinit(), flush(), initialize(), MadDecoder(), madOutput(), and run().
unsigned long MadDecoder::output_at [private] |
Definition at line 52 of file maddecoder.h.
Referenced by deinit(), flush(), initialize(), MadDecoder(), madOutput(), and run().
unsigned long MadDecoder::output_size [private] |
Definition at line 52 of file maddecoder.h.
Definition at line 55 of file maddecoder.h.
| unsigned long MadDecoder::frames |
Definition at line 56 of file maddecoder.h.
| unsigned long MadDecoder::bytes |
| unsigned char MadDecoder::toc[100] |
Definition at line 58 of file maddecoder.h.
| long MadDecoder::scale |
Definition at line 59 of file maddecoder.h.
struct { ... } MadDecoder::xing [private] |
Referenced by calcLength(), and findXingHeader().
struct mad_stream MadDecoder::stream [read, private] |
Definition at line 69 of file maddecoder.h.
Referenced by deinit(), findHeader(), initialize(), and run().
struct mad_frame MadDecoder::frame [read, private] |
Definition at line 70 of file maddecoder.h.
Referenced by deinit(), findHeader(), initialize(), madOutput(), and run().
struct mad_synth MadDecoder::synth [read, private] |
Definition at line 71 of file maddecoder.h.
Referenced by deinit(), initialize(), madOutput(), and run().
1.5.5