00001 #ifndef AVFECODER_H_ 00002 #define AVFECODER_H_ 00003 /* 00004 aacdecoder.h 00005 00006 (c) 2003 Thor Sigvaldason and Isaac Richards 00007 Part of the mythTV project 00008 00009 Header for aac (m4a) decoder 00010 00011 */ 00012 00013 00014 #include "decoder.h" 00015 00016 #include <mp4ff.h> 00017 00018 00019 class Metadata; 00020 00021 class aacDecoder : public Decoder 00022 { 00023 public: 00024 aacDecoder(const QString &file, DecoderFactory *, QIODevice *, AudioOutput *); 00025 virtual ~aacDecoder(void); 00026 00027 bool initialize(); 00028 //double lengthInSeconds(); 00029 void seek(double); 00030 void stop(); 00031 00032 MetaIO *doCreateTagger(void); 00033 00034 bool initializeMP4(); 00035 int getAACTrack(mp4ff_t *infile); 00036 uint32_t aacRead(char *buffer, uint32_t length); 00037 uint32_t aacSeek(uint64_t position); 00038 00039 private: 00040 void run(); 00041 00042 void flush(bool = FALSE); 00043 void deinit(); 00044 00045 bool inited, user_stop; 00046 int stat; 00047 char *output_buf; 00048 ulong output_bytes, output_at; 00049 00050 unsigned int bks; 00051 bool done, finish; 00052 long len, bitrate; 00053 uchar channels; 00054 unsigned long sample_rate; 00055 unsigned long output_size; 00056 double totalTime, seekTime; 00057 00058 bool mp4_file_flag; 00059 mp4ff_callback_t *mp4_callback; 00060 faacDecHandle decoder_handle; 00061 mp4ff_t *mp4_input_file; 00062 int aac_track_number; 00063 unsigned long timescale; 00064 unsigned int framesize; 00065 }; 00066 00067 #endif
1.5.5