00001 #ifndef VORBISDECODER_H_ 00002 #define VORBISDECODER_H_ 00003 00004 #include "decoder.h" 00005 00006 #include <vorbis/vorbisfile.h> 00007 00008 class Metadata; 00009 00010 class VorbisDecoder : public Decoder 00011 { 00012 public: 00013 VorbisDecoder(const QString &file, DecoderFactory *, QIODevice *, AudioOutput *); 00014 virtual ~VorbisDecoder(void); 00015 00016 bool initialize(); 00017 double lengthInSeconds(); 00018 void seek(double); 00019 void stop(); 00020 00021 MetaIO *doCreateTagger(void); 00022 00023 private: 00024 void run(); 00025 00026 void flush(bool = FALSE); 00027 void deinit(); 00028 00029 bool inited, user_stop; 00030 int stat; 00031 char *output_buf; 00032 ulong output_bytes, output_at; 00033 00034 OggVorbis_File oggfile; 00035 00036 unsigned int bks; 00037 bool done, finish; 00038 long len, freq, bitrate; 00039 int chan; 00040 unsigned long output_size; 00041 double totalTime, seekTime; 00042 }; 00043 00044 #endif 00045
1.5.5