diff options
Diffstat (limited to 'encoder.h')
-rw-r--r-- | encoder.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -11,6 +11,8 @@ class EncoderBase { public: typedef boost::shared_ptr<EncoderBase> p; + virtual ~EncoderBase() {} + virtual size_t encode(const uint8_t *input, size_t input_size, uint8_t *output, size_t output_size) = 0; virtual size_t flush(uint8_t *output, size_t output_size) = 0; }; @@ -19,9 +21,11 @@ class EncoderBase { class EncoderFilter : public boost::iostreams::multichar_input_filter { private: EncoderBase::p encoder; + public: typedef boost::shared_ptr<EncoderFilter> p; EncoderFilter(EncoderBase::p encoder_); + template<typename Source> std::streamsize read(Source& src, char *s, std::streamsize n) { char src_data[0x2000]; |