Registry.cxx 2.63 KB
Newer Older
1
/*
Max Kellermann's avatar
Max Kellermann committed
2
 * Copyright (C) 2003-2015 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 "OutputAPI.hxx"
23 24 25
#include "plugins/AlsaOutputPlugin.hxx"
#include "plugins/AoOutputPlugin.hxx"
#include "plugins/FifoOutputPlugin.hxx"
26
#include "plugins/httpd/HttpdOutputPlugin.hxx"
27 28 29 30 31 32 33 34 35 36
#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/RoarOutputPlugin.hxx"
#include "plugins/ShoutOutputPlugin.hxx"
37
#include "plugins/sles/SlesOutputPlugin.hxx"
38 39
#include "plugins/SolarisOutputPlugin.hxx"
#include "plugins/WinmmOutputPlugin.hxx"
40

Max Kellermann's avatar
Max Kellermann committed
41 42
#include <string.h>

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 55 56
#ifdef ENABLE_PIPE_OUTPUT
	&pipe_output_plugin,
#endif
57
#ifdef ENABLE_ALSA
58
	&alsa_output_plugin,
59
#endif
60
#ifdef ENABLE_ROAR
61 62
	&roar_output_plugin,
#endif
63
#ifdef ENABLE_AO
Max Kellermann's avatar
Max Kellermann committed
64
	&ao_output_plugin,
65 66
#endif
#ifdef HAVE_OSS
Max Kellermann's avatar
Max Kellermann committed
67
	&oss_output_plugin,
68
#endif
Serge Ziryukin's avatar
Serge Ziryukin committed
69 70 71
#ifdef HAVE_OPENAL
	&openal_output_plugin,
#endif
72
#ifdef HAVE_OSX
73
	&osx_output_plugin,
74
#endif
75 76 77
#ifdef ENABLE_SOLARIS_OUTPUT
	&solaris_output_plugin,
#endif
78
#ifdef ENABLE_PULSE
79
	&pulse_output_plugin,
80
#endif
81
#ifdef ENABLE_JACK
82
	&jack_output_plugin,
83 84 85
#endif
#ifdef ENABLE_HTTPD_OUTPUT
	&httpd_output_plugin,
86 87 88
#endif
#ifdef ENABLE_RECORDER_OUTPUT
	&recorder_output_plugin,
89
#endif
90 91
#ifdef ENABLE_WINMM_OUTPUT
	&winmm_output_plugin,
92
#endif
93
	nullptr
94 95
};

96 97
const AudioOutputPlugin *
AudioOutputPlugin_get(const char *name)
98
{
99
	audio_output_plugins_for_each(plugin)
100 101
		if (strcmp(plugin->name, name) == 0)
			return plugin;
102

103
	return nullptr;
104
}