MPD  0.20.15
Public Member Functions
PreparedEncoder Class Referenceabstract

#include <EncoderInterface.hxx>

Public Member Functions

virtual ~PreparedEncoder ()
 
virtual EncoderOpen (AudioFormat &audio_format)=0
 Opens the object. More...
 
virtual const char * GetMimeType () const
 Get mime type of encoded content. More...
 

Detailed Description

Definition at line 112 of file EncoderInterface.hxx.

Constructor & Destructor Documentation

◆ ~PreparedEncoder()

virtual PreparedEncoder::~PreparedEncoder ( )
inlinevirtual

Definition at line 114 of file EncoderInterface.hxx.

Member Function Documentation

◆ GetMimeType()

virtual const char* PreparedEncoder::GetMimeType ( ) const
inlinevirtual

Get mime type of encoded content.

Returns
an constant string, nullptr on failure

Definition at line 137 of file EncoderInterface.hxx.

◆ Open()

virtual Encoder* PreparedEncoder::Open ( AudioFormat audio_format)
pure virtual

Opens the object.

You must call this prior to using it. Before you free it, you must call Close(). You may open and close (reuse) one encoder any number of times.

After this function returns successfully and before the first encoder_write() call, you should invoke encoder_read() to obtain the file header.

Throws #std::runtime_error on error.

Parameters
audio_formatthe encoder's input audio format; the plugin may modify the struct to adapt it to its abilities

The documentation for this class was generated from the following file: