aboutsummaryrefslogtreecommitdiffstats
path: root/src/DecoderAPI.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/DecoderAPI.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 'src/DecoderAPI.cxx')
-rw-r--r--src/DecoderAPI.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/DecoderAPI.cxx b/src/DecoderAPI.cxx
index d364a3aaa..9af2ef49d 100644
--- a/src/DecoderAPI.cxx
+++ b/src/DecoderAPI.cxx
@@ -268,29 +268,29 @@ size_t decoder_read(struct decoder *decoder,
if (length == 0)
return 0;
- input_stream_lock(is);
+ is->Lock();
while (true) {
if (decoder_check_cancel_read(decoder)) {
- input_stream_unlock(is);
+ is->Unlock();
return 0;
}
- if (input_stream_available(is))
+ if (is->IsAvailable())
break;
is->cond.wait(is->mutex);
}
Error error;
- size_t nbytes = input_stream_read(is, buffer, length, error);
+ size_t nbytes = is->Read(buffer, length, error);
assert(nbytes == 0 || !error.IsDefined());
- assert(nbytes > 0 || error.IsDefined() || input_stream_eof(is));
+ assert(nbytes > 0 || error.IsDefined() || is->IsEOF());
if (gcc_unlikely(nbytes == 0 && error.IsDefined()))
g_warning("%s", error.GetMessage());
- input_stream_unlock(is);
+ is->Unlock();
return nbytes;
}
@@ -338,7 +338,7 @@ update_stream_tag(struct decoder *decoder, struct input_stream *is)
Tag *tag;
tag = is != NULL
- ? input_stream_lock_tag(is)
+ ? is->LockReadTag()
: NULL;
if (tag == NULL) {
tag = decoder->song_tag;