From 93deb844996120b6326345d6d87e803142dd1968 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 23 Oct 2013 22:08:59 +0200 Subject: input_stream: rename struct to InputStream --- src/DecoderAPI.hxx | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'src/DecoderAPI.hxx') 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. -- cgit v1.2.3