diff options
author | Max Kellermann <max@duempel.org> | 2013-09-05 00:06:31 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-05 00:23:14 +0200 |
commit | 7d0269d2cec68c7e55df5b6db3d2266741534b17 (patch) | |
tree | 613f5d7b03bc9624f15167c76f8f4309603944cc /src/SongUpdate.cxx | |
parent | 52ffdb0a55e43153fa9fc1189316884a630df700 (diff) | |
download | mpd-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/SongUpdate.cxx | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx index 7e374e759..f0dafc3a5 100644 --- a/src/SongUpdate.cxx +++ b/src/SongUpdate.cxx @@ -26,7 +26,7 @@ #include "fs/Path.hxx" #include "fs/FileSystem.hxx" #include "Tag.hxx" -#include "InputLegacy.hxx" +#include "InputStream.hxx" #include "DecoderPlugin.hxx" #include "DecoderList.hxx" #include "TagHandler.hxx" @@ -127,12 +127,10 @@ Song::UpdateFile() if (plugin->scan_stream != NULL) { /* open the input_stream (if not already open) */ - if (is == NULL) { - Error error; - is = input_stream_open(path_fs.c_str(), - mutex, cond, - error); - } + if (is == NULL) + is = input_stream::Open(path_fs.c_str(), + mutex, cond, + IgnoreError()); /* now try the stream_tag() method */ if (is != NULL) { @@ -145,8 +143,7 @@ Song::UpdateFile() delete tag; tag = nullptr; - Error error; - input_stream_lock_seek(is, 0, SEEK_SET, error); + is->LockSeek(0, SEEK_SET, IgnoreError()); } } @@ -154,7 +151,7 @@ Song::UpdateFile() } while (plugin != NULL); if (is != NULL) - input_stream_close(is); + is->Close(); if (tag != nullptr && tag->IsEmpty()) tag_scan_fallback(path_fs.c_str(), &full_tag_handler, tag); |