diff options
Diffstat (limited to 'decoder.h')
-rw-r--r-- | decoder.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -11,15 +11,19 @@ class DecoderBase { public: typedef boost::shared_ptr<DecoderBase> p; virtual size_t decode(const uint8_t *input, size_t input_size, uint8_t *output, size_t output_size) = 0; + virtual ~DecoderBase() {} + }; //! Input filter to hold a decoder in a filter chain. class DecoderFilter : public boost::iostreams::multichar_input_filter { private: DecoderBase::p decoder; + public: typedef boost::shared_ptr<DecoderFilter> p; DecoderFilter(DecoderBase::p decoder_); + template<typename Source> std::streamsize read(Source& src, char *s, std::streamsize n) { char src_data[0x2000]; |