summaryrefslogtreecommitdiff
path: root/encoder.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-01-06 02:10:24 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-01-06 02:10:24 +0100
commit70f111b184928feab0c94f762954b5ec83a441c6 (patch)
tree1677f0f8a8e59e4648b9800048efa1fd18e63745 /encoder.h
parent102992da75edfcb671eb408bd801703a3f9137d0 (diff)
Decoder/encoder source cleanup.
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];