aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/FaadDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-05 00:06:31 +0200
committerMax Kellermann <max@duempel.org>2013-09-05 00:23:14 +0200
commit7d0269d2cec68c7e55df5b6db3d2266741534b17 (patch)
tree613f5d7b03bc9624f15167c76f8f4309603944cc /src/decoder/FaadDecoderPlugin.cxx
parent52ffdb0a55e43153fa9fc1189316884a630df700 (diff)
downloadmpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.tar.gz
mpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.tar.xz
mpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.zip
InputLegacy: move functions to the input_stream class
Diffstat (limited to '')
-rw-r--r--src/decoder/FaadDecoderPlugin.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/decoder/FaadDecoderPlugin.cxx b/src/decoder/FaadDecoderPlugin.cxx
index 1387dc45c..7540413f5 100644
--- a/src/decoder/FaadDecoderPlugin.cxx
+++ b/src/decoder/FaadDecoderPlugin.cxx
@@ -21,6 +21,7 @@
#include "FaadDecoderPlugin.hxx"
#include "DecoderAPI.hxx"
#include "DecoderBuffer.hxx"
+#include "InputStream.hxx"
#include "CheckAudioFormat.hxx"
#include "TagHandler.hxx"
#include "util/Error.hxx"
@@ -173,7 +174,7 @@ faad_song_duration(DecoderBuffer *buffer, struct input_stream *is)
size_t length;
bool success;
- const goffset size = input_stream_get_size(is);
+ const goffset size = is->GetSize();
fileread = size >= 0 ? size : 0;
decoder_buffer_fill(buffer);
@@ -201,12 +202,12 @@ faad_song_duration(DecoderBuffer *buffer, struct input_stream *is)
return -1;
}
- if (input_stream_is_seekable(is) && length >= 2 &&
+ if (is->IsSeekable() && length >= 2 &&
data[0] == 0xFF && ((data[1] & 0xF6) == 0xF0)) {
/* obtain the duration from the ADTS header */
float song_length = adts_song_duration(buffer);
- input_stream_lock_seek(is, tagsize, SEEK_SET, IgnoreError());
+ is->LockSeek(tagsize, SEEK_SET, IgnoreError());
data = (const uint8_t *)decoder_buffer_read(buffer, &length);
if (data != nullptr)
@@ -384,8 +385,7 @@ faad_stream_decode(struct decoder *mpd_decoder, struct input_stream *is)
config->dontUpSampleImplicitSBR = 0;
NeAACDecSetConfiguration(decoder, config);
- while (!decoder_buffer_is_full(buffer) &&
- !input_stream_lock_eof(is) &&
+ while (!decoder_buffer_is_full(buffer) && !is->LockIsEOF() &&
decoder_get_command(mpd_decoder) == DECODE_COMMAND_NONE) {
adts_find_frame(buffer);
decoder_buffer_fill(buffer);