Registry.cxx 2.73 KB
Newer Older
1
/*
Max Kellermann's avatar
Max Kellermann committed
2
 * Copyright 2003-2019 The Music Player Daemon Project
3
 * http://www.musicpd.org
4 5 6 7 8 9 10 11 12 13
 *
 * 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.
14 15 16 17
 *
 * 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.
18 19
 */

20
#include "config.h"
21
#include "Registry.hxx"
22
#include "OutputPlugin.hxx"
23 24 25
#include "plugins/AlsaOutputPlugin.hxx"
#include "plugins/AoOutputPlugin.hxx"
#include "plugins/FifoOutputPlugin.hxx"
26
#include "plugins/SndioOutputPlugin.hxx"
27
#include "plugins/httpd/HttpdOutputPlugin.hxx"
28
#include "plugins/HaikuOutputPlugin.hxx"
29 30 31 32 33 34 35 36 37
#include "plugins/JackOutputPlugin.hxx"
#include "plugins/NullOutputPlugin.hxx"
#include "plugins/OpenALOutputPlugin.hxx"
#include "plugins/OssOutputPlugin.hxx"
#include "plugins/OSXOutputPlugin.hxx"
#include "plugins/PipeOutputPlugin.hxx"
#include "plugins/PulseOutputPlugin.hxx"
#include "plugins/RecorderOutputPlugin.hxx"
#include "plugins/ShoutOutputPlugin.hxx"
38
#include "plugins/sles/SlesOutputPlugin.hxx"
39 40
#include "plugins/SolarisOutputPlugin.hxx"
#include "plugins/WinmmOutputPlugin.hxx"
41
#include "util/StringAPI.hxx"
Max Kellermann's avatar
Max Kellermann committed
42

43
const AudioOutputPlugin *const audio_output_plugins[] = {
44
#ifdef HAVE_SHOUT
45
	&shout_output_plugin,
46
#endif
Max Kellermann's avatar
Max Kellermann committed
47
	&null_output_plugin,
48 49 50
#ifdef ANDROID
	&sles_output_plugin,
#endif
51
#ifdef HAVE_FIFO
Max Kellermann's avatar
Max Kellermann committed
52
	&fifo_output_plugin,
53
#endif
54
#ifdef ENABLE_SNDIO
55 56
	&sndio_output_plugin,
#endif
57
#ifdef ENABLE_HAIKU
58 59
	&haiku_output_plugin,
#endif
60 61 62
#ifdef ENABLE_PIPE_OUTPUT
	&pipe_output_plugin,
#endif
63
#ifdef ENABLE_ALSA
64
	&alsa_output_plugin,
65
#endif
66
#ifdef ENABLE_AO
Max Kellermann's avatar
Max Kellermann committed
67
	&ao_output_plugin,
68 69
#endif
#ifdef HAVE_OSS
Max Kellermann's avatar
Max Kellermann committed
70
	&oss_output_plugin,
71
#endif
Serge Ziryukin's avatar
Serge Ziryukin committed
72 73 74
#ifdef HAVE_OPENAL
	&openal_output_plugin,
#endif
75
#ifdef HAVE_OSX
76
	&osx_output_plugin,
77
#endif
78 79 80
#ifdef ENABLE_SOLARIS_OUTPUT
	&solaris_output_plugin,
#endif
81
#ifdef ENABLE_PULSE
82
	&pulse_output_plugin,
83
#endif
84
#ifdef ENABLE_JACK
85
	&jack_output_plugin,
86 87 88
#endif
#ifdef ENABLE_HTTPD_OUTPUT
	&httpd_output_plugin,
89 90 91
#endif
#ifdef ENABLE_RECORDER_OUTPUT
	&recorder_output_plugin,
92
#endif
93 94
#ifdef ENABLE_WINMM_OUTPUT
	&winmm_output_plugin,
95
#endif
96
	nullptr
97 98
};

99 100
const AudioOutputPlugin *
AudioOutputPlugin_get(const char *name)
101
{
102
	audio_output_plugins_for_each(plugin)
103
		if (StringIsEqual(plugin->name, name))
104
			return plugin;
105

106
	return nullptr;
107
}