Registry.cxx 2.8 KB
Newer Older
1
/*
Max Kellermann's avatar
Max Kellermann committed
2
 * Copyright 2003-2017 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 38
#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"
39
#include "plugins/sles/SlesOutputPlugin.hxx"
40 41
#include "plugins/SolarisOutputPlugin.hxx"
#include "plugins/WinmmOutputPlugin.hxx"
42

Max Kellermann's avatar
Max Kellermann committed
43 44
#include <string.h>

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

104 105
const AudioOutputPlugin *
AudioOutputPlugin_get(const char *name)
106
{
107
	audio_output_plugins_for_each(plugin)
108 109
		if (strcmp(plugin->name, name) == 0)
			return plugin;
110

111
	return nullptr;
112
}