From d875270150b521ff84f9371248b0afaa88abe0e8 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 10 Jul 2009 17:33:17 +0000 Subject: new decoder api, disabled broken plugins git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1016 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/mad/decoder_mad.h | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) (limited to 'src/plugins/Input/mad/decoder_mad.h') diff --git a/src/plugins/Input/mad/decoder_mad.h b/src/plugins/Input/mad/decoder_mad.h index 6fb6f2a40..f25ad2b80 100644 --- a/src/plugins/Input/mad/decoder_mad.h +++ b/src/plugins/Input/mad/decoder_mad.h @@ -28,37 +28,29 @@ public: // standard decoder API bool initialize(); qint64 totalTime(); - void seek(qint64); - void stop(); + int bitrate(); private: - // thread run function - void run(); - - enum mad_flow madOutput(); - enum mad_flow madError(struct mad_stream *, struct mad_frame *); + qint64 readAudio(char *data, qint64 size); + void seekAudio(qint64); // helper functions - void flush(bool = FALSE); + qint64 madOutput(char *data, qint64 size); + bool fillBuffer(); void deinit(); bool findHeader(); bool findXingHeader(struct mad_bitptr, unsigned int); uint findID3v2(uchar *data, ulong size); - bool inited, user_stop, done, m_finish, derror, eof, useeq; - qint64 m_totalTime, seekTime; - int channels; - unsigned long bitrate; - long freq, len; - unsigned int bks; - mad_fixed_t eqbands[32]; + bool m_inited; + qint64 m_totalTime; + int m_channels, m_skip_frames; + uint m_bitrate; + long m_freq, m_len; + qint64 m_output_bytes, m_output_at; // file input buffer - char *input_buf; - unsigned long input_bytes; - - // output buffer - char *output_buf; - unsigned long output_bytes, output_at, output_size; + char *m_input_buf; + qint64 m_input_bytes; // MAD decoder struct -- cgit v1.2.3-13-gbd6f