You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
612 B
C++

// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#ifndef MPD_ENCODER_PLUGIN_HXX
#define MPD_ENCODER_PLUGIN_HXX
class PreparedEncoder;
struct ConfigBlock;
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