diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-01-06 05:29:39 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-01-06 05:29:47 +0100 |
commit | 6f2fefdd9ff5f8561b3538efb5eb0765a9b4a141 (patch) | |
tree | de37cd2d500a777344b611321ac45bce66ad5c26 /decoders/mpg123_decoder.h | |
parent | ffd8b5976af7e80425c7cf043528212528877b16 (diff) |
Replaced iostream-based decoder-encoder chain with direct chain.
Diffstat (limited to 'decoders/mpg123_decoder.h')
-rw-r--r-- | decoders/mpg123_decoder.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/decoders/mpg123_decoder.h b/decoders/mpg123_decoder.h index 5a637af..f71dbe7 100644 --- a/decoders/mpg123_decoder.h +++ b/decoders/mpg123_decoder.h @@ -3,20 +3,21 @@ #include "decoder.h" +#include <fstream> #include <mpg123.h> -class DecoderMpg123 : public DecoderBase { +class DecoderMpg123 : public Decoder { private: mpg123_handle *handle; + std::ifstream ifile; size_t decode(const uint8_t *input, size_t input_size, uint8_t *output, size_t output_size); - protected: - virtual size_t decode(ReadFunc read, uint8_t *output, size_t output_size); - public: - DecoderMpg123(); + DecoderMpg123(const std::string& filename); ~DecoderMpg123(); + + virtual std::size_t read(char* buf, std::size_t buf_size); }; #endif |