diff options
author | Max Kellermann <max@duempel.org> | 2014-09-22 08:18:58 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-09-22 08:18:58 +0200 |
commit | 3ae0d6f4210e370225cf0b9177f6c16d84d9255b (patch) | |
tree | 946d5a451428d070b9be905f8e900def60e1f0a3 /src/decoder/DecoderBuffer.cxx | |
parent | 13b66a77c73dbb5d00d439d42be82c004ac16ea1 (diff) | |
download | mpd-3ae0d6f4210e370225cf0b9177f6c16d84d9255b.tar.gz mpd-3ae0d6f4210e370225cf0b9177f6c16d84d9255b.tar.xz mpd-3ae0d6f4210e370225cf0b9177f6c16d84d9255b.zip |
DecoderBuffer: export the struct
Eliminates the functions _new() and _free().
Diffstat (limited to 'src/decoder/DecoderBuffer.cxx')
-rw-r--r-- | src/decoder/DecoderBuffer.cxx | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/decoder/DecoderBuffer.cxx b/src/decoder/DecoderBuffer.cxx index 895729da3..df536e2b5 100644 --- a/src/decoder/DecoderBuffer.cxx +++ b/src/decoder/DecoderBuffer.cxx @@ -21,38 +21,9 @@ #include "DecoderBuffer.hxx" #include "DecoderAPI.hxx" #include "util/ConstBuffer.hxx" -#include "util/DynamicFifoBuffer.hxx" #include <assert.h> -struct DecoderBuffer { - Decoder *const decoder; - InputStream &is; - - DynamicFifoBuffer<uint8_t> buffer; - - DecoderBuffer(Decoder *_decoder, InputStream &_is, - size_t _size) - :decoder(_decoder), is(_is), buffer(_size) {} -}; - -DecoderBuffer * -decoder_buffer_new(Decoder *decoder, InputStream &is, - size_t size) -{ - assert(size > 0); - - return new DecoderBuffer(decoder, is, size); -} - -void -decoder_buffer_free(DecoderBuffer *buffer) -{ - assert(buffer != nullptr); - - delete buffer; -} - const InputStream & decoder_buffer_get_stream(const DecoderBuffer *buffer) { |