.github
android
build
doc
python
src
android
apple
archive
client
command
config
db
decoder
plugins
Bridge.cxx
Bridge.hxx
Client.hxx
Command.hxx
Control.cxx
Control.hxx
DecoderAPI.cxx
DecoderAPI.hxx
DecoderBuffer.cxx
DecoderBuffer.hxx
DecoderList.cxx
DecoderList.hxx
DecoderPlugin.cxx
DecoderPlugin.hxx
DecoderPrint.cxx
DecoderPrint.hxx
Domain.cxx
Domain.hxx
Reader.cxx
Reader.hxx
Thread.cxx
meson.build
encoder
event
filter
fs
haiku
input
io
java
lib
mixer
neighbor
net
output
pcm
player
playlist
protocol
queue
song
sticker
storage
system
tag
thread
time
unix
util
win32
zeroconf
BulkEdit.hxx
Chrono.hxx
CommandLine.cxx
CommandLine.hxx
GitVersion.cxx
GitVersion.hxx
Idle.cxx
Idle.hxx
IdleFlags.cxx
IdleFlags.hxx
Instance.cxx
Instance.hxx
Listen.cxx
Listen.hxx
LocateUri.cxx
LocateUri.hxx
Log.cxx
Log.hxx
LogBackend.cxx
LogBackend.hxx
LogInit.cxx
LogInit.hxx
LogLevel.hxx
Main.cxx
Main.hxx
Mapper.cxx
Mapper.hxx
MusicBuffer.cxx
MusicBuffer.hxx
MusicChunk.cxx
MusicChunk.hxx
MusicChunkPtr.cxx
MusicChunkPtr.hxx
MusicPipe.cxx
MusicPipe.hxx
Partition.cxx
Partition.hxx
Permission.cxx
Permission.hxx
PlaylistDatabase.cxx
PlaylistDatabase.hxx
PlaylistError.cxx
PlaylistError.hxx
PlaylistFile.cxx
PlaylistFile.hxx
PlaylistPrint.cxx
PlaylistPrint.hxx
PlaylistSave.cxx
PlaylistSave.hxx
PluginUnavailable.hxx
RemoteTagCache.cxx
RemoteTagCache.hxx
RemoteTagCacheHandler.hxx
ReplayGainMode.cxx
ReplayGainMode.hxx
SingleMode.cxx
SingleMode.hxx
SongLoader.cxx
SongLoader.hxx
SongPrint.cxx
SongPrint.hxx
SongSave.cxx
SongSave.hxx
SongUpdate.cxx
StateFile.cxx
StateFile.hxx
StateFileConfig.cxx
StateFileConfig.hxx
Stats.cxx
Stats.hxx
TagAny.cxx
TagAny.hxx
TagArchive.cxx
TagArchive.hxx
TagFile.cxx
TagFile.hxx
TagPrint.cxx
TagPrint.hxx
TagSave.cxx
TagSave.hxx
TagStream.cxx
TagStream.hxx
TimePrint.cxx
TimePrint.hxx
ls.cxx
ls.hxx
open.h
subprojects
systemd
test
win32
.clang-format
.gitignore
.travis.yml
AUTHORS
COPYING
NEWS
README.md
meson.build
meson_options.txt
mpd.svg
valgrind.suppressions
53 lines
1.4 KiB
C++
53 lines
1.4 KiB
C++
/*
|
|
* Copyright 2003-2021 The Music Player Daemon Project
|
|
* http://www.musicpd.org
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*/
|
|
|
|
#ifndef MPD_DECODER_READER_HXX
|
|
#define MPD_DECODER_READER_HXX
|
|
|
|
#include "io/Reader.hxx"
|
|
|
|
class DecoderClient;
|
|
class InputStream;
|
|
|
|
/**
|
|
* A wrapper for decoder_read() which implements the #Reader
|
|
* interface.
|
|
*/
|
|
class DecoderReader final : public Reader {
|
|
DecoderClient &client;
|
|
InputStream &is;
|
|
|
|
public:
|
|
DecoderReader(DecoderClient &_client, InputStream &_is)
|
|
:client(_client), is(_is) {}
|
|
|
|
DecoderClient &GetClient() {
|
|
return client;
|
|
}
|
|
|
|
InputStream &GetInputStream() {
|
|
return is;
|
|
}
|
|
|
|
/* virtual methods from class Reader */
|
|
size_t Read(void *data, size_t size) override;
|
|
};
|
|
|
|
#endif
|