Registry.cxx 2.52 KB
Newer Older
1
/*
Max Kellermann's avatar
Max Kellermann committed
2
 * Copyright (C) 2003-2014 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 26 27 28 29 30 31 32 33 34 35 36 37 38
#include "plugins/AlsaOutputPlugin.hxx"
#include "plugins/AoOutputPlugin.hxx"
#include "plugins/FifoOutputPlugin.hxx"
#include "plugins/HttpdOutputPlugin.hxx"
#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"
#include "plugins/SolarisOutputPlugin.hxx"
#include "plugins/WinmmOutputPlugin.hxx"
39

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

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

92 93
const AudioOutputPlugin *
AudioOutputPlugin_get(const char *name)
94
{
95
	audio_output_plugins_for_each(plugin)
96 97
		if (strcmp(plugin->name, name) == 0)
			return plugin;
98

99
	return nullptr;
100
}