filter/Plugin: move filter_configured_new() to LoadOne.cxx
This commit is contained in:
parent
b13ebe3ddb
commit
bbabb7a14c
|
@ -103,8 +103,9 @@ libmpd_a_SOURCES = \
|
|||
src/decoder/DecoderPlugin.hxx \
|
||||
src/decoder/Bridge.cxx src/decoder/Bridge.hxx \
|
||||
src/decoder/DecoderPrint.cxx src/decoder/DecoderPrint.hxx \
|
||||
src/filter/LoadOne.cxx src/filter/LoadOne.hxx \
|
||||
src/filter/FilterConfig.cxx src/filter/FilterConfig.hxx \
|
||||
src/filter/FilterPlugin.cxx src/filter/FilterPlugin.hxx \
|
||||
src/filter/FilterPlugin.hxx \
|
||||
src/filter/Filter.hxx \
|
||||
src/filter/Prepared.hxx \
|
||||
src/filter/FilterRegistry.cxx src/filter/FilterRegistry.hxx \
|
||||
|
@ -2055,7 +2056,7 @@ test_run_filter_LDADD = \
|
|||
libutil.a
|
||||
test_run_filter_SOURCES = test/run_filter.cxx \
|
||||
src/Log.cxx src/LogBackend.cxx \
|
||||
src/filter/FilterPlugin.cxx src/filter/FilterRegistry.cxx
|
||||
src/filter/LoadOne.cxx src/filter/FilterRegistry.cxx
|
||||
|
||||
if ENABLE_ENCODER
|
||||
noinst_PROGRAMS += test/run_encoder
|
||||
|
@ -2168,7 +2169,7 @@ test_read_mixer_LDADD = \
|
|||
test_read_mixer_SOURCES = test/read_mixer.cxx \
|
||||
src/Log.cxx src/LogBackend.cxx \
|
||||
src/mixer/MixerControl.cxx \
|
||||
src/filter/FilterPlugin.cxx \
|
||||
src/filter/LoadOne.cxx \
|
||||
src/filter/plugins/VolumeFilterPlugin.cxx
|
||||
|
||||
if ENABLE_BZIP2_TEST
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "FilterConfig.hxx"
|
||||
#include "FilterPlugin.hxx"
|
||||
#include "LoadOne.hxx"
|
||||
#include "Prepared.hxx"
|
||||
#include "plugins/ChainFilterPlugin.hxx"
|
||||
#include "config/Param.hxx"
|
||||
|
|
|
@ -40,15 +40,4 @@ struct FilterPlugin {
|
|||
std::unique_ptr<PreparedFilter> (*init)(const ConfigBlock &block);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a new filter, loads configuration and the plugin name from
|
||||
* the specified configuration section.
|
||||
*
|
||||
* Throws std::runtime_error on error.
|
||||
*
|
||||
* @param block the configuration section
|
||||
*/
|
||||
std::unique_ptr<PreparedFilter>
|
||||
filter_configured_new(const ConfigBlock &block);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -18,15 +18,13 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "LoadOne.hxx"
|
||||
#include "FilterPlugin.hxx"
|
||||
#include "FilterRegistry.hxx"
|
||||
#include "Prepared.hxx"
|
||||
#include "config/Block.hxx"
|
||||
#include "config/ConfigError.hxx"
|
||||
#include "util/RuntimeError.hxx"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
std::unique_ptr<PreparedFilter>
|
||||
filter_configured_new(const ConfigBlock &block)
|
||||
{
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright 2003-2017 The Music Player Daemon Project
|
||||
* http://www.musicpd.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef MPD_FILTER_LOAD_ONE_HXX
|
||||
#define MPD_FILTER_LOAD_ONE_HXX
|
||||
|
||||
#include <memory>
|
||||
|
||||
struct ConfigBlock;
|
||||
class PreparedFilter;
|
||||
|
||||
/**
|
||||
* Creates a new filter, loads configuration and the plugin name from
|
||||
* the specified configuration section.
|
||||
*
|
||||
* Throws std::runtime_error on error.
|
||||
*
|
||||
* @param block the configuration section
|
||||
*/
|
||||
std::unique_ptr<PreparedFilter>
|
||||
filter_configured_new(const ConfigBlock &block);
|
||||
|
||||
#endif
|
|
@ -23,7 +23,7 @@
|
|||
#include "fs/Path.hxx"
|
||||
#include "AudioParser.hxx"
|
||||
#include "AudioFormat.hxx"
|
||||
#include "filter/FilterPlugin.hxx"
|
||||
#include "filter/LoadOne.hxx"
|
||||
#include "filter/Filter.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "pcm/Volume.hxx"
|
||||
|
|
Loading…
Reference in New Issue