diff options
author | Max Kellermann <max@duempel.org> | 2014-12-27 18:56:08 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-27 18:56:08 +0100 |
commit | 0e28b5324266cfe10e953a36a43331f139879463 (patch) | |
tree | a4428c18c06ac91d87ebc508faf4b32c9fc7c674 /src | |
parent | 5fc0ce80fc06a0a59fc8bdf2a2168611440a1b60 (diff) | |
download | mpd-0e28b5324266cfe10e953a36a43331f139879463.tar.gz mpd-0e28b5324266cfe10e953a36a43331f139879463.tar.xz mpd-0e28b5324266cfe10e953a36a43331f139879463.zip |
output/pipe: merge Initialize() and Configure()
Diffstat (limited to '')
-rw-r--r-- | src/output/plugins/PipeOutputPlugin.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/output/plugins/PipeOutputPlugin.cxx b/src/output/plugins/PipeOutputPlugin.cxx index 8a674d7aa..1be5340e8 100644 --- a/src/output/plugins/PipeOutputPlugin.cxx +++ b/src/output/plugins/PipeOutputPlugin.cxx @@ -37,11 +37,8 @@ struct PipeOutput { PipeOutput() :base(pipe_output_plugin) {} - bool Initialize(const config_param ¶m, Error &error) { - return base.Configure(param, error); - } - bool Configure(const config_param ¶m, Error &error); + bool Open(AudioFormat &audio_format, Error &error); void Close() { @@ -57,6 +54,9 @@ static constexpr Domain pipe_output_domain("pipe_output"); inline bool PipeOutput::Configure(const config_param ¶m, Error &error) { + if (!base.Configure(param, error)) + return false; + cmd = param.GetBlockValue("command", ""); if (cmd.empty()) { error.Set(config_domain, @@ -72,11 +72,6 @@ pipe_output_init(const config_param ¶m, Error &error) { PipeOutput *pd = new PipeOutput(); - if (!pd->Initialize(param, error)) { - delete pd; - return nullptr; - } - if (!pd->Configure(param, error)) { delete pd; return nullptr; |