summaryrefslogtreecommitdiff
path: root/src/filter
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-11-23 17:43:50 +0100
committerMax Kellermann <max@musicpd.org>2016-11-23 17:43:50 +0100
commit4dd1309c3f4f7bebb501b09fee3a6fdfdce3869f (patch)
tree170d3037f1697c6f3cea9665545f79309690b9e6 /src/filter
parent541da2740d39ede4fe62739c93238525c8f6cd1b (diff)
filter/Plugin: rename with CamelCase
Diffstat (limited to 'src/filter')
-rw-r--r--src/filter/FilterPlugin.cxx4
-rw-r--r--src/filter/FilterPlugin.hxx4
-rw-r--r--src/filter/FilterRegistry.cxx4
-rw-r--r--src/filter/FilterRegistry.hxx18
-rw-r--r--src/filter/plugins/ChainFilterPlugin.cxx2
-rw-r--r--src/filter/plugins/ConvertFilterPlugin.cxx2
-rw-r--r--src/filter/plugins/NormalizeFilterPlugin.cxx2
-rw-r--r--src/filter/plugins/NullFilterPlugin.cxx2
-rw-r--r--src/filter/plugins/ReplayGainFilterPlugin.cxx2
-rw-r--r--src/filter/plugins/RouteFilterPlugin.cxx2
-rw-r--r--src/filter/plugins/VolumeFilterPlugin.cxx2
11 files changed, 23 insertions, 21 deletions
diff --git a/src/filter/FilterPlugin.cxx b/src/filter/FilterPlugin.cxx
index 06db15379..29c3a36aa 100644
--- a/src/filter/FilterPlugin.cxx
+++ b/src/filter/FilterPlugin.cxx
@@ -27,7 +27,7 @@
#include <assert.h>
PreparedFilter *
-filter_new(const struct filter_plugin *plugin, const ConfigBlock &block)
+filter_new(const FilterPlugin *plugin, const ConfigBlock &block)
{
assert(plugin != nullptr);
@@ -41,7 +41,7 @@ filter_configured_new(const ConfigBlock &block)
if (plugin_name == nullptr)
throw std::runtime_error("No filter plugin specified");
- const filter_plugin *plugin = filter_plugin_by_name(plugin_name);
+ const auto *plugin = filter_plugin_by_name(plugin_name);
if (plugin == nullptr)
throw FormatRuntimeError("No such filter plugin: %s",
plugin_name);
diff --git a/src/filter/FilterPlugin.hxx b/src/filter/FilterPlugin.hxx
index 1e09c29c4..47b0a8b8f 100644
--- a/src/filter/FilterPlugin.hxx
+++ b/src/filter/FilterPlugin.hxx
@@ -29,7 +29,7 @@
struct ConfigBlock;
class PreparedFilter;
-struct filter_plugin {
+struct FilterPlugin {
const char *name;
/**
@@ -47,7 +47,7 @@ struct filter_plugin {
* @param block configuration section
*/
PreparedFilter *
-filter_new(const struct filter_plugin *plugin,
+filter_new(const FilterPlugin *plugin,
const ConfigBlock &block);
/**
diff --git a/src/filter/FilterRegistry.cxx b/src/filter/FilterRegistry.cxx
index c9d261dac..793c91bfb 100644
--- a/src/filter/FilterRegistry.cxx
+++ b/src/filter/FilterRegistry.cxx
@@ -23,7 +23,7 @@
#include <string.h>
-const struct filter_plugin *const filter_plugins[] = {
+const FilterPlugin *const filter_plugins[] = {
&null_filter_plugin,
&route_filter_plugin,
&normalize_filter_plugin,
@@ -32,7 +32,7 @@ const struct filter_plugin *const filter_plugins[] = {
nullptr,
};
-const struct filter_plugin *
+const FilterPlugin *
filter_plugin_by_name(const char *name)
{
for (unsigned i = 0; filter_plugins[i] != nullptr; ++i)
diff --git a/src/filter/FilterRegistry.hxx b/src/filter/FilterRegistry.hxx
index 33e676b0e..c18bcfc67 100644
--- a/src/filter/FilterRegistry.hxx
+++ b/src/filter/FilterRegistry.hxx
@@ -28,16 +28,18 @@
#include "Compiler.h"
-extern const struct filter_plugin null_filter_plugin;
-extern const struct filter_plugin chain_filter_plugin;
-extern const struct filter_plugin convert_filter_plugin;
-extern const struct filter_plugin route_filter_plugin;
-extern const struct filter_plugin normalize_filter_plugin;
-extern const struct filter_plugin volume_filter_plugin;
-extern const struct filter_plugin replay_gain_filter_plugin;
+struct FilterPlugin;
+
+extern const FilterPlugin null_filter_plugin;
+extern const FilterPlugin chain_filter_plugin;
+extern const FilterPlugin convert_filter_plugin;
+extern const FilterPlugin route_filter_plugin;
+extern const FilterPlugin normalize_filter_plugin;
+extern const FilterPlugin volume_filter_plugin;
+extern const FilterPlugin replay_gain_filter_plugin;
gcc_pure
-const struct filter_plugin *
+const FilterPlugin *
filter_plugin_by_name(const char *name);
#endif
diff --git a/src/filter/plugins/ChainFilterPlugin.cxx b/src/filter/plugins/ChainFilterPlugin.cxx
index f853320a5..5e5455789 100644
--- a/src/filter/plugins/ChainFilterPlugin.cxx
+++ b/src/filter/plugins/ChainFilterPlugin.cxx
@@ -143,7 +143,7 @@ ChainFilter::FilterPCM(ConstBuffer<void> src)
return src;
}
-const struct filter_plugin chain_filter_plugin = {
+const FilterPlugin chain_filter_plugin = {
"chain",
chain_filter_init,
};
diff --git a/src/filter/plugins/ConvertFilterPlugin.cxx b/src/filter/plugins/ConvertFilterPlugin.cxx
index 55224de78..75b8012f6 100644
--- a/src/filter/plugins/ConvertFilterPlugin.cxx
+++ b/src/filter/plugins/ConvertFilterPlugin.cxx
@@ -125,7 +125,7 @@ ConvertFilter::FilterPCM(ConstBuffer<void> src)
return state.Convert(src);
}
-const struct filter_plugin convert_filter_plugin = {
+const FilterPlugin convert_filter_plugin = {
"convert",
convert_filter_init,
};
diff --git a/src/filter/plugins/NormalizeFilterPlugin.cxx b/src/filter/plugins/NormalizeFilterPlugin.cxx
index 459be88cd..2af1d82b8 100644
--- a/src/filter/plugins/NormalizeFilterPlugin.cxx
+++ b/src/filter/plugins/NormalizeFilterPlugin.cxx
@@ -76,7 +76,7 @@ NormalizeFilter::FilterPCM(ConstBuffer<void> src)
return { (const void *)dest, src.size };
}
-const struct filter_plugin normalize_filter_plugin = {
+const FilterPlugin normalize_filter_plugin = {
"normalize",
normalize_filter_init,
};
diff --git a/src/filter/plugins/NullFilterPlugin.cxx b/src/filter/plugins/NullFilterPlugin.cxx
index b44180e9f..85bfdaac3 100644
--- a/src/filter/plugins/NullFilterPlugin.cxx
+++ b/src/filter/plugins/NullFilterPlugin.cxx
@@ -54,7 +54,7 @@ null_filter_init(gcc_unused const ConfigBlock &block)
return new PreparedNullFilter();
}
-const struct filter_plugin null_filter_plugin = {
+const FilterPlugin null_filter_plugin = {
"null",
null_filter_init,
};
diff --git a/src/filter/plugins/ReplayGainFilterPlugin.cxx b/src/filter/plugins/ReplayGainFilterPlugin.cxx
index 16dac795c..18b4c9932 100644
--- a/src/filter/plugins/ReplayGainFilterPlugin.cxx
+++ b/src/filter/plugins/ReplayGainFilterPlugin.cxx
@@ -186,7 +186,7 @@ ReplayGainFilter::FilterPCM(ConstBuffer<void> src)
: pv.Apply(src);
}
-const struct filter_plugin replay_gain_filter_plugin = {
+const FilterPlugin replay_gain_filter_plugin = {
"replay_gain",
replay_gain_filter_init,
};
diff --git a/src/filter/plugins/RouteFilterPlugin.cxx b/src/filter/plugins/RouteFilterPlugin.cxx
index 374ffc4e1..3d657e9f2 100644
--- a/src/filter/plugins/RouteFilterPlugin.cxx
+++ b/src/filter/plugins/RouteFilterPlugin.cxx
@@ -272,7 +272,7 @@ RouteFilter::FilterPCM(ConstBuffer<void> src)
return { result, result_size };
}
-const struct filter_plugin route_filter_plugin = {
+const FilterPlugin route_filter_plugin = {
"route",
route_filter_init,
};
diff --git a/src/filter/plugins/VolumeFilterPlugin.cxx b/src/filter/plugins/VolumeFilterPlugin.cxx
index 64959916f..02c05e8bb 100644
--- a/src/filter/plugins/VolumeFilterPlugin.cxx
+++ b/src/filter/plugins/VolumeFilterPlugin.cxx
@@ -75,7 +75,7 @@ VolumeFilter::FilterPCM(ConstBuffer<void> src)
return pv.Apply(src);
}
-const struct filter_plugin volume_filter_plugin = {
+const FilterPlugin volume_filter_plugin = {
"volume",
volume_filter_init,
};