MadDecoder Class Reference

#include <maddecoder.h>

Inheritance diagram for MadDecoder:

Decoder MythObservable

List of all members.


Detailed Description

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 ()
MetaIOdoCreateTagger (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
xing
struct mad_stream stream
struct mad_frame frame
struct mad_synth synth

Member Enumeration Documentation

anonymous enum [private]

Enumerator:
XING_FRAMES 
XING_BYTES 
XING_TOC 
XING_SCALE 

Definition at line 62 of file maddecoder.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

bool MadDecoder::initialize (  )  [virtual]

Implements Decoder.

Definition at line 63 of file maddecoder.cpp.

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

Implements Decoder.

Definition at line 279 of file maddecoder.cpp.

void MadDecoder::stop ( void   )  [virtual]

Implements Decoder.

Definition at line 284 of file maddecoder.cpp.

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.

Returns:
an instance of 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]

Definition at line 463 of file maddecoder.cpp.

Referenced by run().

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]

Definition at line 289 of file maddecoder.cpp.

Referenced by madOutput(), and run().

void MadDecoder::deinit (  )  [private]

Definition at line 122 of file maddecoder.cpp.

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

bool MadDecoder::findHeader (  )  [private]

Definition at line 204 of file maddecoder.cpp.

Referenced by initialize().

bool MadDecoder::findXingHeader ( struct mad_bitptr  ptr,
unsigned int  bitlen 
) [private]

Definition at line 150 of file maddecoder.cpp.

Referenced by findHeader().

void MadDecoder::calcLength ( struct mad_header *  header  )  [private]

Definition at line 261 of file maddecoder.cpp.

Referenced by findHeader().


Member Data Documentation

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.

Definition at line 41 of file maddecoder.h.

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

Definition at line 41 of file maddecoder.h.

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

Definition at line 41 of file maddecoder.h.

Referenced by deinit(), findHeader(), flush(), initialize(), MadDecoder(), madOutput(), and run().

Definition at line 41 of file maddecoder.h.

Referenced by deinit(), flush(), initialize(), MadDecoder(), madOutput(), and run().

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

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

Definition at line 57 of file maddecoder.h.

Referenced by findHeader().

unsigned char MadDecoder::toc[100]

Definition at line 58 of file maddecoder.h.

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


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

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