20 #ifndef MPD_ENCODER_INTERFACE_HXX 21 #define MPD_ENCODER_INTERFACE_HXX 33 const bool implements_tag;
37 :implements_tag(_implements_tag) {}
41 return implements_tag;
98 virtual void Write(
const void *data,
size_t length) = 0;
109 virtual size_t Read(
void *dest,
size_t length) = 0;
virtual void Flush()
Flushes an encoder object, make everything which might currently be buffered available by Read()...
Encoder(bool _implements_tag)
The meta information about a song file.
virtual ~PreparedEncoder()
bool ImplementsTag() const
virtual void End()
Ends the stream: flushes the encoder object, generate an end-of-stream marker (if applicable)...
virtual void PreTag()
Prepare for sending a tag to the encoder.
virtual void SendTag(gcc_unused const Tag &tag)
Sends a tag to the encoder.
virtual const char * GetMimeType() const
Get mime type of encoded content.
virtual void Write(const void *data, size_t length)=0
Writes raw PCM data to the encoder.
virtual Encoder * Open(AudioFormat &audio_format)=0
Opens the object.
virtual size_t Read(void *dest, size_t length)=0
Reads encoded data from the encoder.