aboutsummaryrefslogtreecommitdiffstats
path: root/test/dump_playlist.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-23 22:08:59 +0200
committerMax Kellermann <max@duempel.org>2013-10-23 23:12:02 +0200
commit93deb844996120b6326345d6d87e803142dd1968 (patch)
treed6c00669efffad1b15fc45e03158d6838a7e5827 /test/dump_playlist.cxx
parentc4d4011c63808a64ca20a4b03fd455a83c23cc33 (diff)
downloadmpd-93deb844996120b6326345d6d87e803142dd1968.tar.gz
mpd-93deb844996120b6326345d6d87e803142dd1968.tar.xz
mpd-93deb844996120b6326345d6d87e803142dd1968.zip
input_stream: rename struct to InputStream
Diffstat (limited to 'test/dump_playlist.cxx')
-rw-r--r--test/dump_playlist.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx
index 6233443c2..044b85d79 100644
--- a/test/dump_playlist.cxx
+++ b/test/dump_playlist.cxx
@@ -85,11 +85,10 @@ decoder_seek_error(gcc_unused Decoder &decoder)
size_t
decoder_read(gcc_unused Decoder *decoder,
- struct input_stream *is,
+ InputStream &is,
void *buffer, size_t length)
{
- Error error;
- return is->LockRead(buffer, length, error);
+ return is.LockRead(buffer, length, IgnoreError());
}
void
@@ -100,7 +99,7 @@ decoder_timestamp(gcc_unused Decoder &decoder,
DecoderCommand
decoder_data(gcc_unused Decoder &decoder,
- gcc_unused struct input_stream *is,
+ gcc_unused InputStream *is,
const void *data, size_t datalen,
gcc_unused uint16_t kbit_rate)
{
@@ -110,7 +109,7 @@ decoder_data(gcc_unused Decoder &decoder,
DecoderCommand
decoder_tag(gcc_unused Decoder &decoder,
- gcc_unused struct input_stream *is,
+ gcc_unused InputStream *is,
gcc_unused Tag &&tag)
{
return DecoderCommand::NONE;
@@ -143,7 +142,7 @@ decoder_mixramp(gcc_unused Decoder &decoder,
int main(int argc, char **argv)
{
const char *uri;
- struct input_stream *is = NULL;
+ InputStream *is = NULL;
Song *song;
if (argc != 3) {
@@ -192,12 +191,12 @@ int main(int argc, char **argv)
if (playlist == NULL) {
/* open the stream and wait until it becomes ready */
- is = input_stream::Open(uri, mutex, cond, error);
+ is = InputStream::Open(uri, mutex, cond, error);
if (is == NULL) {
if (error.IsDefined())
LogError(error);
else
- g_printerr("input_stream::Open() failed\n");
+ g_printerr("InputStream::Open() failed\n");
return 2;
}
@@ -205,7 +204,7 @@ int main(int argc, char **argv)
/* open the playlist */
- playlist = playlist_list_open_stream(is, uri);
+ playlist = playlist_list_open_stream(*is, uri);
if (playlist == NULL) {
is->Close();
g_printerr("Failed to open playlist\n");