2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2008-09-08 11:43:13 +02:00
|
|
|
|
2009-11-12 09:12:38 +01:00
|
|
|
#include "config.h"
|
2014-01-28 11:42:54 +01:00
|
|
|
#include "Registry.hxx"
|
2016-03-01 22:08:13 +01:00
|
|
|
#include "OutputPlugin.hxx"
|
2020-05-05 14:45:18 +02:00
|
|
|
#include "output/Features.h"
|
2014-01-23 23:49:50 +01:00
|
|
|
#include "plugins/AlsaOutputPlugin.hxx"
|
|
|
|
#include "plugins/AoOutputPlugin.hxx"
|
|
|
|
#include "plugins/FifoOutputPlugin.hxx"
|
2016-06-21 19:28:41 +02:00
|
|
|
#include "plugins/SndioOutputPlugin.hxx"
|
2021-02-16 16:28:41 +01:00
|
|
|
#include "plugins/snapcast/SnapcastOutputPlugin.hxx"
|
2014-02-19 09:08:29 +01:00
|
|
|
#include "plugins/httpd/HttpdOutputPlugin.hxx"
|
2014-01-23 23:49:50 +01:00
|
|
|
#include "plugins/JackOutputPlugin.hxx"
|
|
|
|
#include "plugins/NullOutputPlugin.hxx"
|
|
|
|
#include "plugins/OpenALOutputPlugin.hxx"
|
|
|
|
#include "plugins/OssOutputPlugin.hxx"
|
|
|
|
#include "plugins/OSXOutputPlugin.hxx"
|
|
|
|
#include "plugins/PipeOutputPlugin.hxx"
|
2021-03-03 15:15:24 +01:00
|
|
|
#include "plugins/PipeWireOutputPlugin.hxx"
|
2014-01-23 23:49:50 +01:00
|
|
|
#include "plugins/PulseOutputPlugin.hxx"
|
|
|
|
#include "plugins/RecorderOutputPlugin.hxx"
|
|
|
|
#include "plugins/ShoutOutputPlugin.hxx"
|
2014-02-21 23:17:52 +01:00
|
|
|
#include "plugins/sles/SlesOutputPlugin.hxx"
|
2014-01-23 23:49:50 +01:00
|
|
|
#include "plugins/SolarisOutputPlugin.hxx"
|
2020-05-30 15:59:53 +02:00
|
|
|
#ifdef ENABLE_WINMM_OUTPUT
|
2014-01-23 23:49:50 +01:00
|
|
|
#include "plugins/WinmmOutputPlugin.hxx"
|
2020-05-30 15:59:53 +02:00
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_WASAPI_OUTPUT
|
2021-03-05 16:26:57 +01:00
|
|
|
#include "plugins/wasapi/WasapiOutputPlugin.hxx"
|
2020-05-30 15:59:53 +02:00
|
|
|
#endif
|
2019-09-26 14:44:48 +02:00
|
|
|
#include "util/StringAPI.hxx"
|
2013-07-30 20:11:57 +02:00
|
|
|
|
2023-03-07 11:59:39 +01:00
|
|
|
constinit const AudioOutputPlugin *const audio_output_plugins[] = {
|
2008-10-26 21:58:37 +01:00
|
|
|
#ifdef HAVE_SHOUT
|
2011-09-17 20:04:18 +02:00
|
|
|
&shout_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2009-01-22 16:06:43 +01:00
|
|
|
&null_output_plugin,
|
2014-02-21 23:17:52 +01:00
|
|
|
#ifdef ANDROID
|
|
|
|
&sles_output_plugin,
|
|
|
|
#endif
|
2008-10-26 21:58:37 +01:00
|
|
|
#ifdef HAVE_FIFO
|
2009-02-25 19:53:24 +01:00
|
|
|
&fifo_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2016-12-26 13:23:07 +01:00
|
|
|
#ifdef ENABLE_SNDIO
|
2016-06-21 19:28:41 +02:00
|
|
|
&sndio_output_plugin,
|
|
|
|
#endif
|
2009-02-28 16:11:59 +01:00
|
|
|
#ifdef ENABLE_PIPE_OUTPUT
|
|
|
|
&pipe_output_plugin,
|
|
|
|
#endif
|
2014-11-21 22:19:57 +01:00
|
|
|
#ifdef ENABLE_ALSA
|
2011-09-17 20:04:18 +02:00
|
|
|
&alsa_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2014-11-21 22:19:57 +01:00
|
|
|
#ifdef ENABLE_AO
|
2009-02-25 19:08:49 +01:00
|
|
|
&ao_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_OSS
|
2009-02-26 19:16:33 +01:00
|
|
|
&oss_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2009-08-31 09:26:22 +02:00
|
|
|
#ifdef HAVE_OPENAL
|
|
|
|
&openal_output_plugin,
|
|
|
|
#endif
|
2008-10-26 21:58:37 +01:00
|
|
|
#ifdef HAVE_OSX
|
2011-09-17 20:04:18 +02:00
|
|
|
&osx_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2009-03-16 09:55:10 +01:00
|
|
|
#ifdef ENABLE_SOLARIS_OUTPUT
|
|
|
|
&solaris_output_plugin,
|
|
|
|
#endif
|
2021-03-03 15:15:24 +01:00
|
|
|
#ifdef ENABLE_PIPEWIRE
|
|
|
|
&pipewire_output_plugin,
|
|
|
|
#endif
|
2014-11-21 22:19:57 +01:00
|
|
|
#ifdef ENABLE_PULSE
|
2009-10-20 21:05:11 +02:00
|
|
|
&pulse_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2014-11-21 22:19:57 +01:00
|
|
|
#ifdef ENABLE_JACK
|
2009-10-21 18:33:01 +02:00
|
|
|
&jack_output_plugin,
|
httpd: new output plugin to replace "shout"
Let's get rid of the "shout" plugin, and the awfully complicated
icecast daemon setup! MPD can do better if it's doing the HTTP server
stuff on its own. This new plugin has several advantages:
- easier to set up - only one daemon, no password settings, no mount
settings
- MPD controls the encoder and thus already knows the packet
boundaries - icecast has to parse them
- MPD doesn't bother to encode data while nobody is listening
This implementation is very experimental (no header parsing, ignores
request URI, no icy-metadata, ...). It should be able to suport
several encoders in parallel in the future (with different bit rates,
different codec, ...), to make MPD the perfect streaming server. Once
MPD gets multi-player support, we can even mount several different
radio stations on one server.
2009-03-15 03:32:34 +01:00
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_HTTPD_OUTPUT
|
|
|
|
&httpd_output_plugin,
|
2009-08-24 18:57:06 +02:00
|
|
|
#endif
|
2021-02-16 16:28:41 +01:00
|
|
|
#ifdef ENABLE_SNAPCAST_OUTPUT
|
|
|
|
&snapcast_output_plugin,
|
|
|
|
#endif
|
2009-08-24 18:57:06 +02:00
|
|
|
#ifdef ENABLE_RECORDER_OUTPUT
|
|
|
|
&recorder_output_plugin,
|
2010-05-18 22:56:42 +02:00
|
|
|
#endif
|
2010-10-08 19:55:14 +02:00
|
|
|
#ifdef ENABLE_WINMM_OUTPUT
|
|
|
|
&winmm_output_plugin,
|
2020-05-30 15:59:53 +02:00
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_WASAPI_OUTPUT
|
|
|
|
&wasapi_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2013-10-28 23:58:17 +01:00
|
|
|
nullptr
|
2008-09-08 11:43:13 +02:00
|
|
|
};
|
|
|
|
|
2014-01-28 11:22:27 +01:00
|
|
|
const AudioOutputPlugin *
|
2023-03-07 11:57:39 +01:00
|
|
|
GetAudioOutputPluginByName(const char *name) noexcept
|
2008-09-08 11:43:13 +02:00
|
|
|
{
|
2012-06-12 20:29:47 +02:00
|
|
|
audio_output_plugins_for_each(plugin)
|
2019-09-26 14:44:48 +02:00
|
|
|
if (StringIsEqual(plugin->name, name))
|
2012-02-15 20:35:06 +01:00
|
|
|
return plugin;
|
2008-09-08 11:43:13 +02:00
|
|
|
|
2013-10-28 23:58:17 +01:00
|
|
|
return nullptr;
|
2008-09-08 11:43:13 +02:00
|
|
|
}
|