avfDecoder Class Reference

#include <avfdecoder.h>

Inheritance diagram for avfDecoder:
Decoder MThread MythObservable

List of all members.

Public Member Functions

 avfDecoder (const QString &file, DecoderFactory *, QIODevice *, AudioOutput *)
virtual ~avfDecoder (void)
bool initialize ()
double lengthInSeconds ()
void seek (double)
void stop ()
MetaIOdoCreateTagger (void)
 Create a MetaIO object for the format.

Private Member Functions

void run ()
 Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
void writeBlock ()
void deinit ()

Private Attributes

bool inited
bool user_stop
int stat
char * output_buf
ulong output_at
unsigned int bks
unsigned int bksFrames
unsigned int decodeBytes
bool finish
long freq
long bitrate
AudioFormat m_sampleFmt
int m_channels
double seekTime
QString devicename
AVInputFormat * m_inputFormat
AVFormatContext * m_inputContext
AVCodec * m_codec
AVCodecContext * m_audioDec
bool m_inputIsFile
unsigned char * m_buffer
AVIOContext * m_byteIOContext
int errcode

Detailed Description

Definition at line 17 of file avfdecoder.h.


Constructor & Destructor Documentation

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

Definition at line 77 of file avfdecoder.cpp.

avfDecoder::~avfDecoder ( void   )  [virtual]

Definition at line 98 of file avfdecoder.cpp.


Member Function Documentation

bool avfDecoder::initialize (  )  [virtual]

Implements Decoder.

Definition at line 124 of file avfdecoder.cpp.

double avfDecoder::lengthInSeconds (  ) 
void avfDecoder::seek ( double  pos  )  [virtual]

Implements Decoder.

Definition at line 318 of file avfdecoder.cpp.

void avfDecoder::stop ( void   )  [virtual]

Implements Decoder.

Definition at line 104 of file avfdecoder.cpp.

MetaIO * avfDecoder::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 avf decoder (AvfDecoder) 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 501 of file avfdecoder.cpp.

void avfDecoder::run ( void   )  [private, virtual]

Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.

Note:
If you override this method you must call RunProlog before you do any work and RunEpilog before you exit the run method.

Reimplemented from MThread.

Definition at line 361 of file avfdecoder.cpp.

void avfDecoder::writeBlock (  )  [private]

Definition at line 109 of file avfdecoder.cpp.

Referenced by run().

void avfDecoder::deinit (  )  [private]

Definition at line 324 of file avfdecoder.cpp.

Referenced by initialize(), run(), and ~avfDecoder().


Member Data Documentation

Definition at line 36 of file avfdecoder.h.

Referenced by deinit(), initialize(), run(), and ~avfDecoder().

Definition at line 36 of file avfdecoder.h.

Referenced by deinit(), initialize(), run(), stop(), and writeBlock().

int avfDecoder::stat [private]

Definition at line 37 of file avfdecoder.h.

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

char* avfDecoder::output_buf [private]

Definition at line 38 of file avfdecoder.h.

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

Definition at line 39 of file avfdecoder.h.

Referenced by initialize(), run(), and writeBlock().

unsigned int avfDecoder::bks [private]

Definition at line 41 of file avfdecoder.h.

Referenced by initialize(), run(), and writeBlock().

unsigned int avfDecoder::bksFrames [private]

Definition at line 41 of file avfdecoder.h.

Referenced by initialize(), and writeBlock().

unsigned int avfDecoder::decodeBytes [private]

Definition at line 41 of file avfdecoder.h.

Referenced by initialize(), and run().

Definition at line 42 of file avfdecoder.h.

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

long avfDecoder::freq [private]

Definition at line 43 of file avfdecoder.h.

Referenced by deinit(), and initialize().

long avfDecoder::bitrate [private]

Definition at line 43 of file avfdecoder.h.

Referenced by deinit(), and initialize().

Definition at line 44 of file avfdecoder.h.

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

int avfDecoder::m_channels [private]

Definition at line 45 of file avfdecoder.h.

Referenced by deinit(), and initialize().

double avfDecoder::seekTime [private]

Definition at line 46 of file avfdecoder.h.

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

QString avfDecoder::devicename [private]

Definition at line 48 of file avfdecoder.h.

AVInputFormat* avfDecoder::m_inputFormat [private]

Definition at line 50 of file avfdecoder.h.

Referenced by deinit(), and initialize().

AVFormatContext* avfDecoder::m_inputContext [private]

Definition at line 51 of file avfdecoder.h.

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

AVCodec* avfDecoder::m_codec [private]

Definition at line 52 of file avfdecoder.h.

Referenced by deinit(), and initialize().

AVCodecContext* avfDecoder::m_audioDec [private]

Definition at line 53 of file avfdecoder.h.

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

Definition at line 55 of file avfdecoder.h.

Referenced by initialize(), and seek().

unsigned char* avfDecoder::m_buffer [private]

Definition at line 56 of file avfdecoder.h.

Referenced by deinit(), and initialize().

AVIOContext* avfDecoder::m_byteIOContext [private]

Definition at line 57 of file avfdecoder.h.

Referenced by deinit(), and initialize().

int avfDecoder::errcode [private]

Definition at line 59 of file avfdecoder.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:41:52 2012 for MythTV by  doxygen 1.6.3