mpd/src/encoder/EncoderPlugin.hxx

33 lines
612 B
C++
Raw Normal View History

// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
2013-07-30 09:04:05 +02:00
#ifndef MPD_ENCODER_PLUGIN_HXX
#define MPD_ENCODER_PLUGIN_HXX
class PreparedEncoder;
struct ConfigBlock;
2013-07-30 09:04:05 +02:00
struct EncoderPlugin {
const char *name;
/**
* Throws #std::runtime_error on error.
*/
PreparedEncoder *(*init)(const ConfigBlock &block);
};
/**
* Creates a new encoder object.
*
* Throws #std::runtime_error on error.
*
* @param plugin the encoder plugin
*/
static inline PreparedEncoder *
encoder_init(const EncoderPlugin &plugin, const ConfigBlock &block)
{
return plugin.init(block);
}
#endif