summaryrefslogtreecommitdiff
path: root/encoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'encoder.h')
-rw-r--r--encoder.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/encoder.h b/encoder.h
index 52c50ab..f68d51c 100644
--- a/encoder.h
+++ b/encoder.h
@@ -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];