20 #ifndef MPD_DECODER_CLIENT_HXX
21 #define MPD_DECODER_CLIENT_HXX
132 const void *data,
size_t length,
133 uint16_t kbit_rate) = 0;
136 const void *data,
size_t length,
137 uint16_t kbit_rate) {
138 return SubmitData(&is, data, length, kbit_rate);
DecoderCommand SubmitTag(InputStream &is, Tag &&tag)
virtual gcc_pure uint64_t GetSeekFrame() noexcept=0
Call this when you have received the DecoderCommand::SEEK command.
An interface between the decoder plugin and the MPD core.
virtual void SubmitReplayGain(const ReplayGainInfo *replay_gain_info)=0
Set replay gain values for the following chunks.
The meta information about a song file.
A time stamp within a song.
virtual void SeekError()=0
Call this instead of CommandFinished() when seeking has failed.
virtual gcc_pure SongTime GetSeekTime() noexcept=0
Call this when you have received the DecoderCommand::SEEK command.
virtual DecoderCommand SubmitData(InputStream *is, const void *data, size_t length, uint16_t kbit_rate)=0
This function is called by the decoder plugin when it has successfully decoded block of input data...
virtual void SubmitTimestamp(double t)=0
Sets the time stamp for the next data chunk [seconds].
virtual void Ready(AudioFormat audio_format, bool seekable, SignedSongTime duration)=0
Notify the client that it has finished initialization and that it has read the song's meta data...
virtual InputStreamPtr OpenUri(const char *uri)=0
Open a new InputStream and wait until it's ready.
virtual size_t Read(InputStream &is, void *buffer, size_t length)=0
Blocking read from the input stream.
std::unique_ptr< InputStream > InputStreamPtr
virtual void SubmitMixRamp(MixRampInfo &&mix_ramp)=0
Store MixRamp tags.
virtual DecoderCommand SubmitTag(InputStream *is, Tag &&tag)=0
This function is called by the decoder plugin when it has successfully decoded a tag.
virtual gcc_pure DecoderCommand GetCommand() noexcept=0
Determines the pending decoder command.
A variant of SongTime that is based on a signed integer.
virtual void CommandFinished()=0
Called by the decoder when it has performed the requested command (dc->command).
DecoderCommand SubmitData(InputStream &is, const void *data, size_t length, uint16_t kbit_rate)
const Storage const char * uri