diff options
author | Max Kellermann <max@duempel.org> | 2013-10-23 22:08:59 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-23 23:12:02 +0200 |
commit | 93deb844996120b6326345d6d87e803142dd1968 (patch) | |
tree | d6c00669efffad1b15fc45e03158d6838a7e5827 /src/DecoderAPI.hxx | |
parent | c4d4011c63808a64ca20a4b03fd455a83c23cc33 (diff) | |
download | mpd-93deb844996120b6326345d6d87e803142dd1968.tar.gz mpd-93deb844996120b6326345d6d87e803142dd1968.tar.xz mpd-93deb844996120b6326345d6d87e803142dd1968.zip |
input_stream: rename struct to InputStream
Diffstat (limited to 'src/DecoderAPI.hxx')
-rw-r--r-- | src/DecoderAPI.hxx | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/DecoderAPI.hxx b/src/DecoderAPI.hxx index 4b3664297..3abb077ca 100644 --- a/src/DecoderAPI.hxx +++ b/src/DecoderAPI.hxx @@ -99,11 +99,11 @@ decoder_seek_error(Decoder &decoder); * occurs: end of file; error; command (like SEEK or STOP). */ size_t -decoder_read(Decoder *decoder, struct input_stream *is, +decoder_read(Decoder *decoder, InputStream &is, void *buffer, size_t length); static inline size_t -decoder_read(Decoder &decoder, input_stream *is, +decoder_read(Decoder &decoder, InputStream &is, void *buffer, size_t length) { return decoder_read(&decoder, is, buffer, length); @@ -131,10 +131,18 @@ decoder_timestamp(Decoder &decoder, double t); * command pending */ DecoderCommand -decoder_data(Decoder &decoder, struct input_stream *is, +decoder_data(Decoder &decoder, InputStream *is, const void *data, size_t length, uint16_t kbit_rate); +static inline DecoderCommand +decoder_data(Decoder &decoder, InputStream &is, + const void *data, size_t length, + uint16_t kbit_rate) +{ + return decoder_data(decoder, &is, data, length, kbit_rate); +} + /** * This function is called by the decoder plugin when it has * successfully decoded a tag. @@ -147,7 +155,13 @@ decoder_data(Decoder &decoder, struct input_stream *is, * command pending */ DecoderCommand -decoder_tag(Decoder &decoder, struct input_stream *is, Tag &&tag); +decoder_tag(Decoder &decoder, InputStream *is, Tag &&tag); + +static inline DecoderCommand +decoder_tag(Decoder &decoder, InputStream &is, Tag &&tag) +{ + return decoder_tag(decoder, &is, std::move(tag)); +} /** * Set replay gain values for the following chunks. |