MPD
0.20.6
|
An interface between the decoder plugin and the MPD core. More...
#include <Client.hxx>
Public Member Functions | |
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. More... | |
virtual gcc_pure DecoderCommand | GetCommand ()=0 |
Determines the pending decoder command. More... | |
virtual void | CommandFinished ()=0 |
Called by the decoder when it has performed the requested command (dc->command). More... | |
virtual gcc_pure SongTime | GetSeekTime ()=0 |
Call this when you have received the DecoderCommand::SEEK command. More... | |
virtual gcc_pure uint64_t | GetSeekFrame ()=0 |
Call this when you have received the DecoderCommand::SEEK command. More... | |
virtual void | SeekError ()=0 |
Call this instead of CommandFinished() when seeking has failed. More... | |
virtual InputStreamPtr | OpenUri (const char *uri)=0 |
Open a new InputStream and wait until it's ready. More... | |
virtual size_t | Read (InputStream &is, void *buffer, size_t length)=0 |
Blocking read from the input stream. More... | |
virtual void | SubmitTimestamp (double t)=0 |
Sets the time stamp for the next data chunk [seconds]. More... | |
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. More... | |
DecoderCommand | SubmitData (InputStream &is, const void *data, size_t length, uint16_t kbit_rate) |
virtual DecoderCommand | SubmitTag (InputStream *is, Tag &&tag)=0 |
This function is called by the decoder plugin when it has successfully decoded a tag. More... | |
DecoderCommand | SubmitTag (InputStream &is, Tag &&tag) |
virtual void | SubmitReplayGain (const ReplayGainInfo *replay_gain_info)=0 |
Set replay gain values for the following chunks. More... | |
virtual void | SubmitMixRamp (MixRampInfo &&mix_ramp)=0 |
Store MixRamp tags. More... | |
An interface between the decoder plugin and the MPD core.
Definition at line 39 of file Client.hxx.
|
pure virtual |
Called by the decoder when it has performed the requested command (dc->command).
This function resets dc->command and wakes up the player thread.
Implemented in DecoderBridge.
|
pure virtual |
Determines the pending decoder command.
Implemented in DecoderBridge.
|
pure virtual |
Call this when you have received the DecoderCommand::SEEK command.
Implemented in DecoderBridge.
Call this when you have received the DecoderCommand::SEEK command.
Implemented in DecoderBridge.
|
pure virtual |
Open a new InputStream and wait until it's ready.
Throws StopDecoder if DecoderCommand::STOP was received.
Throws std::runtime_error on error.
Implemented in DecoderBridge.
|
pure virtual |
Blocking read from the input stream.
is | the input stream to read from |
buffer | the destination buffer |
length | the maximum number of bytes to read |
Implemented in DecoderBridge.
|
pure virtual |
Notify the client that it has finished initialization and that it has read the song's meta data.
audio_format | the audio format which is going to be sent to SubmitData() |
seekable | true if the song is seekable |
duration | the total duration of this song; negative if unknown |
Implemented in DecoderBridge.
|
pure virtual |
Call this instead of CommandFinished() when seeking has failed.
Implemented in DecoderBridge.
|
pure virtual |
This function is called by the decoder plugin when it has successfully decoded block of input data.
is | an input stream which is buffering while we are waiting for the player |
data | the source buffer |
length | the number of bytes in the buffer |
Implemented in DecoderBridge.
|
inline |
Definition at line 135 of file Client.hxx.
|
pure virtual |
Store MixRamp tags.
Implemented in DecoderBridge.
|
pure virtual |
Set replay gain values for the following chunks.
replay_gain_info | the replay_gain_info object; may be nullptr to invalidate the previous replay gain values |
Implemented in DecoderBridge.
|
pure virtual |
This function is called by the decoder plugin when it has successfully decoded a tag.
is | an input stream which is buffering while we are waiting for the player |
tag | the tag to send |
Implemented in DecoderBridge.
|
inline |
Definition at line 153 of file Client.hxx.
|
pure virtual |
Sets the time stamp for the next data chunk [seconds].
The MPD core automatically counts it up, and a decoder plugin only needs to use this function if it thinks that adding to the time stamp based on the buffer size won't work.
Implemented in DecoderBridge.