diff options
Diffstat (limited to 'src/filter')
-rw-r--r-- | src/filter/FilterConfig.cxx | 9 | ||||
-rw-r--r-- | src/filter/FilterConfig.hxx | 4 | ||||
-rw-r--r-- | src/filter/FilterInternal.hxx | 10 | ||||
-rw-r--r-- | src/filter/FilterPlugin.cxx | 14 | ||||
-rw-r--r-- | src/filter/FilterPlugin.hxx | 14 | ||||
-rw-r--r-- | src/filter/FilterRegistry.cxx | 2 | ||||
-rw-r--r-- | src/filter/FilterRegistry.hxx | 2 | ||||
-rw-r--r-- | src/filter/plugins/AutoConvertFilterPlugin.cxx | 6 | ||||
-rw-r--r-- | src/filter/plugins/AutoConvertFilterPlugin.hxx | 2 | ||||
-rw-r--r-- | src/filter/plugins/ChainFilterPlugin.cxx | 4 | ||||
-rw-r--r-- | src/filter/plugins/ChainFilterPlugin.hxx | 4 | ||||
-rw-r--r-- | src/filter/plugins/ConvertFilterPlugin.cxx | 4 | ||||
-rw-r--r-- | src/filter/plugins/ConvertFilterPlugin.hxx | 2 | ||||
-rw-r--r-- | src/filter/plugins/NormalizeFilterPlugin.cxx | 4 | ||||
-rw-r--r-- | src/filter/plugins/NullFilterPlugin.cxx | 4 | ||||
-rw-r--r-- | src/filter/plugins/ReplayGainFilterPlugin.cxx | 4 | ||||
-rw-r--r-- | src/filter/plugins/ReplayGainFilterPlugin.hxx | 6 | ||||
-rw-r--r-- | src/filter/plugins/RouteFilterPlugin.cxx | 16 | ||||
-rw-r--r-- | src/filter/plugins/VolumeFilterPlugin.cxx | 4 | ||||
-rw-r--r-- | src/filter/plugins/VolumeFilterPlugin.hxx | 2 |
20 files changed, 57 insertions, 60 deletions
diff --git a/src/filter/FilterConfig.cxx b/src/filter/FilterConfig.cxx index d8c1fc6c2..c5f24362c 100644 --- a/src/filter/FilterConfig.cxx +++ b/src/filter/FilterConfig.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -21,10 +21,11 @@ #include "FilterConfig.hxx" #include "plugins/ChainFilterPlugin.hxx" #include "FilterPlugin.hxx" -#include "config/ConfigData.hxx" +#include "config/Param.hxx" #include "config/ConfigOption.hxx" #include "config/ConfigGlobal.hxx" #include "config/ConfigError.hxx" +#include "config/Block.hxx" #include "util/Error.hxx" #include <algorithm> @@ -34,8 +35,8 @@ static bool filter_chain_append_new(Filter &chain, const char *template_name, Error &error) { - const struct config_param *cfg = - config_find_block(CONF_AUDIO_FILTER, "name", template_name); + const auto *cfg = config_find_block(ConfigBlockOption::AUDIO_FILTER, + "name", template_name); if (cfg == nullptr) { error.Format(config_domain, "filter template not found: %s", diff --git a/src/filter/FilterConfig.hxx b/src/filter/FilterConfig.hxx index 1018eed51..1c6f14f73 100644 --- a/src/filter/FilterConfig.hxx +++ b/src/filter/FilterConfig.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -34,7 +34,7 @@ class Error; * configured filter sections. * @param chain the chain to append filters on * @param spec the filter chain specification - * @param error_r space to return an error description + * @param error space to return an error description * @return true on success */ bool diff --git a/src/filter/FilterInternal.hxx b/src/filter/FilterInternal.hxx index d2e619540..6969e8a18 100644 --- a/src/filter/FilterInternal.hxx +++ b/src/filter/FilterInternal.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -38,12 +38,10 @@ public: /** * Opens the filter, preparing it for FilterPCM(). * - * @param filter the filter object * @param af the audio format of incoming data; the * plugin may modify the object to enforce another input * format - * @param error location to store the error occurring, or nullptr - * to ignore errors. + * @param error location to store the error occurring * @return the format of outgoing data or * AudioFormat::Undefined() on error */ @@ -57,10 +55,8 @@ public: /** * Filters a block of PCM data. * - * @param filter the filter object * @param src the input buffer - * @param error location to store the error occurring, or nullptr - * to ignore errors. + * @param error location to store the error occurring * @return the destination buffer on success (will be * invalidated by Close() or FilterPCM()), nullptr on * error diff --git a/src/filter/FilterPlugin.cxx b/src/filter/FilterPlugin.cxx index 98314f771..93d1942a0 100644 --- a/src/filter/FilterPlugin.cxx +++ b/src/filter/FilterPlugin.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -20,7 +20,7 @@ #include "config.h" #include "FilterPlugin.hxx" #include "FilterRegistry.hxx" -#include "config/ConfigData.hxx" +#include "config/Block.hxx" #include "config/ConfigError.hxx" #include "util/Error.hxx" @@ -28,20 +28,20 @@ Filter * filter_new(const struct filter_plugin *plugin, - const config_param ¶m, Error &error) + const ConfigBlock &block, Error &error) { assert(plugin != nullptr); assert(!error.IsDefined()); - return plugin->init(param, error); + return plugin->init(block, error); } Filter * -filter_configured_new(const config_param ¶m, Error &error) +filter_configured_new(const ConfigBlock &block, Error &error) { assert(!error.IsDefined()); - const char *plugin_name = param.GetBlockValue("plugin"); + const char *plugin_name = block.GetBlockValue("plugin"); if (plugin_name == nullptr) { error.Set(config_domain, "No filter plugin specified"); return nullptr; @@ -54,5 +54,5 @@ filter_configured_new(const config_param ¶m, Error &error) return nullptr; } - return filter_new(plugin, param, error); + return filter_new(plugin, block, error); } diff --git a/src/filter/FilterPlugin.hxx b/src/filter/FilterPlugin.hxx index 443d29881..68ad74240 100644 --- a/src/filter/FilterPlugin.hxx +++ b/src/filter/FilterPlugin.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -26,7 +26,7 @@ #ifndef MPD_FILTER_PLUGIN_HXX #define MPD_FILTER_PLUGIN_HXX -struct config_param; +struct ConfigBlock; class Filter; class Error; @@ -36,32 +36,32 @@ struct filter_plugin { /** * Allocates and configures a filter. */ - Filter *(*init)(const config_param ¶m, Error &error); + Filter *(*init)(const ConfigBlock &block, Error &error); }; /** * Creates a new instance of the specified filter plugin. * * @param plugin the filter plugin - * @param param optional configuration section + * @param block configuration section * @param error location to store the error occurring, or nullptr to * ignore errors. * @return a new filter object, or nullptr on error */ Filter * filter_new(const struct filter_plugin *plugin, - const config_param ¶m, Error &error); + const ConfigBlock &block, Error &error); /** * Creates a new filter, loads configuration and the plugin name from * the specified configuration section. * - * @param param the configuration section + * @param block the configuration section * @param error location to store the error occurring, or nullptr to * ignore errors. * @return a new filter object, or nullptr on error */ Filter * -filter_configured_new(const config_param ¶m, Error &error); +filter_configured_new(const ConfigBlock &block, Error &error); #endif diff --git a/src/filter/FilterRegistry.cxx b/src/filter/FilterRegistry.cxx index 286fb8db3..8c679940f 100644 --- a/src/filter/FilterRegistry.cxx +++ b/src/filter/FilterRegistry.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify diff --git a/src/filter/FilterRegistry.hxx b/src/filter/FilterRegistry.hxx index 24618a87a..51fac615f 100644 --- a/src/filter/FilterRegistry.hxx +++ b/src/filter/FilterRegistry.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify diff --git a/src/filter/plugins/AutoConvertFilterPlugin.cxx b/src/filter/plugins/AutoConvertFilterPlugin.cxx index 8586cb86e..52918080e 100644 --- a/src/filter/plugins/AutoConvertFilterPlugin.cxx +++ b/src/filter/plugins/AutoConvertFilterPlugin.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -24,7 +24,7 @@ #include "filter/FilterInternal.hxx" #include "filter/FilterRegistry.hxx" #include "AudioFormat.hxx" -#include "config/ConfigData.hxx" +#include "config/Block.hxx" #include "util/ConstBuffer.hxx" #include <assert.h> @@ -70,7 +70,7 @@ AutoConvertFilter::Open(AudioFormat &in_audio_format, Error &error) if (in_audio_format != child_audio_format) { /* yes - create a convert_filter */ - const config_param empty; + const ConfigBlock empty; convert = filter_new(&convert_filter_plugin, empty, error); if (convert == nullptr) { filter->Close(); diff --git a/src/filter/plugins/AutoConvertFilterPlugin.hxx b/src/filter/plugins/AutoConvertFilterPlugin.hxx index c5dfdd2f6..1b9061331 100644 --- a/src/filter/plugins/AutoConvertFilterPlugin.hxx +++ b/src/filter/plugins/AutoConvertFilterPlugin.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify diff --git a/src/filter/plugins/ChainFilterPlugin.cxx b/src/filter/plugins/ChainFilterPlugin.cxx index 4aeee69af..b965295f7 100644 --- a/src/filter/plugins/ChainFilterPlugin.cxx +++ b/src/filter/plugins/ChainFilterPlugin.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -70,7 +70,7 @@ private: static constexpr Domain chain_filter_domain("chain_filter"); static Filter * -chain_filter_init(gcc_unused const config_param ¶m, +chain_filter_init(gcc_unused const ConfigBlock &block, gcc_unused Error &error) { return new ChainFilter(); diff --git a/src/filter/plugins/ChainFilterPlugin.hxx b/src/filter/plugins/ChainFilterPlugin.hxx index b36aa3322..8f346e178 100644 --- a/src/filter/plugins/ChainFilterPlugin.hxx +++ b/src/filter/plugins/ChainFilterPlugin.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -33,7 +33,7 @@ class Filter; * Creates a new filter chain. */ Filter * -filter_chain_new(void); +filter_chain_new(); /** * Appends a new filter at the end of the filter chain. You must call diff --git a/src/filter/plugins/ConvertFilterPlugin.cxx b/src/filter/plugins/ConvertFilterPlugin.cxx index 5c6a07ba1..18053abd0 100644 --- a/src/filter/plugins/ConvertFilterPlugin.cxx +++ b/src/filter/plugins/ConvertFilterPlugin.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -59,7 +59,7 @@ public: }; static Filter * -convert_filter_init(gcc_unused const config_param ¶m, +convert_filter_init(gcc_unused const ConfigBlock &block, gcc_unused Error &error) { return new ConvertFilter(); diff --git a/src/filter/plugins/ConvertFilterPlugin.hxx b/src/filter/plugins/ConvertFilterPlugin.hxx index bb4673651..8dd0bcd8e 100644 --- a/src/filter/plugins/ConvertFilterPlugin.hxx +++ b/src/filter/plugins/ConvertFilterPlugin.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify diff --git a/src/filter/plugins/NormalizeFilterPlugin.cxx b/src/filter/plugins/NormalizeFilterPlugin.cxx index 372ab53ac..77e8c1535 100644 --- a/src/filter/plugins/NormalizeFilterPlugin.cxx +++ b/src/filter/plugins/NormalizeFilterPlugin.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -42,7 +42,7 @@ public: }; static Filter * -normalize_filter_init(gcc_unused const config_param ¶m, +normalize_filter_init(gcc_unused const ConfigBlock &block, gcc_unused Error &error) { return new NormalizeFilter(); diff --git a/src/filter/plugins/NullFilterPlugin.cxx b/src/filter/plugins/NullFilterPlugin.cxx index ebd8e4ec5..0bd8170f0 100644 --- a/src/filter/plugins/NullFilterPlugin.cxx +++ b/src/filter/plugins/NullFilterPlugin.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -48,7 +48,7 @@ public: }; static Filter * -null_filter_init(gcc_unused const config_param ¶m, +null_filter_init(gcc_unused const ConfigBlock &block, gcc_unused Error &error) { return new NullFilter(); diff --git a/src/filter/plugins/ReplayGainFilterPlugin.cxx b/src/filter/plugins/ReplayGainFilterPlugin.cxx index f76e48e37..ca1119331 100644 --- a/src/filter/plugins/ReplayGainFilterPlugin.cxx +++ b/src/filter/plugins/ReplayGainFilterPlugin.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -150,7 +150,7 @@ ReplayGainFilter::Update() } static Filter * -replay_gain_filter_init(gcc_unused const config_param ¶m, +replay_gain_filter_init(gcc_unused const ConfigBlock &block, gcc_unused Error &error) { return new ReplayGainFilter(); diff --git a/src/filter/plugins/ReplayGainFilterPlugin.hxx b/src/filter/plugins/ReplayGainFilterPlugin.hxx index 346541b97..ec0cafc60 100644 --- a/src/filter/plugins/ReplayGainFilterPlugin.hxx +++ b/src/filter/plugins/ReplayGainFilterPlugin.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -38,9 +38,9 @@ replay_gain_filter_set_mixer(Filter *_filter, Mixer *mixer, unsigned base); /** - * Sets a new #replay_gain_info at the beginning of a new song. + * Sets a new #ReplayGainInfo at the beginning of a new song. * - * @param info the new #replay_gain_info value, or nullptr if no replay + * @param info the new #ReplayGainInfo value, or nullptr if no replay * gain data is available for the current song */ void diff --git a/src/filter/plugins/RouteFilterPlugin.cxx b/src/filter/plugins/RouteFilterPlugin.cxx index 4094119f2..11eb534c9 100644 --- a/src/filter/plugins/RouteFilterPlugin.cxx +++ b/src/filter/plugins/RouteFilterPlugin.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -41,7 +41,7 @@ #include "config.h" #include "config/ConfigError.hxx" -#include "config/ConfigData.hxx" +#include "config/Block.hxx" #include "AudioFormat.hxx" #include "filter/FilterPlugin.hxx" #include "filter/FilterInternal.hxx" @@ -114,11 +114,11 @@ public: * a>b, c>d, e>f, ... * where a... are non-unique, non-negative integers * and input channel a gets copied to output channel b, etc. - * @param param the configuration block to read + * @param block the configuration block to read * @param filter a route_filter whose min_channels and sources[] to set * @return true on success, false on error */ - bool Configure(const config_param ¶m, Error &error); + bool Configure(const ConfigBlock &block, Error &error); /* virtual methods from class Filter */ AudioFormat Open(AudioFormat &af, Error &error) override; @@ -128,7 +128,7 @@ public: }; bool -RouteFilter::Configure(const config_param ¶m, Error &error) { +RouteFilter::Configure(const ConfigBlock &block, Error &error) { /* TODO: * With a more clever way of marking "don't copy to output N", @@ -142,7 +142,7 @@ RouteFilter::Configure(const config_param ¶m, Error &error) { min_output_channels = 0; // A cowardly default, just passthrough stereo - const char *routes = param.GetBlockValue("routes", "0>0, 1>1"); + const char *routes = block.GetBlockValue("routes", "0>0, 1>1"); while (true) { routes = StripLeft(routes); @@ -205,10 +205,10 @@ RouteFilter::Configure(const config_param ¶m, Error &error) { } static Filter * -route_filter_init(const config_param ¶m, Error &error) +route_filter_init(const ConfigBlock &block, Error &error) { RouteFilter *filter = new RouteFilter(); - if (!filter->Configure(param, error)) { + if (!filter->Configure(block, error)) { delete filter; return nullptr; } diff --git a/src/filter/plugins/VolumeFilterPlugin.cxx b/src/filter/plugins/VolumeFilterPlugin.cxx index 39188da00..4a7abb953 100644 --- a/src/filter/plugins/VolumeFilterPlugin.cxx +++ b/src/filter/plugins/VolumeFilterPlugin.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -50,7 +50,7 @@ public: }; static Filter * -volume_filter_init(gcc_unused const config_param ¶m, +volume_filter_init(gcc_unused const ConfigBlock &block, gcc_unused Error &error) { return new VolumeFilter(); diff --git a/src/filter/plugins/VolumeFilterPlugin.hxx b/src/filter/plugins/VolumeFilterPlugin.hxx index b5317dc6f..93191b2d3 100644 --- a/src/filter/plugins/VolumeFilterPlugin.hxx +++ b/src/filter/plugins/VolumeFilterPlugin.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2014 The Music Player Daemon Project + * Copyright (C) 2003-2015 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify |