Registry.cxx 2.71 KB
Newer Older
1
/*
2
 * Copyright 2003-2016 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/httpd/HttpdOutputPlugin.hxx"
27
#include "plugins/HaikuOutputPlugin.hxx"
28 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/RoarOutputPlugin.hxx"
#include "plugins/ShoutOutputPlugin.hxx"
38
#include "plugins/sles/SlesOutputPlugin.hxx"
39 40
#include "plugins/SolarisOutputPlugin.hxx"
#include "plugins/WinmmOutputPlugin.hxx"
41

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

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

100 101
const AudioOutputPlugin *
AudioOutputPlugin_get(const char *name)
102
{
103
	audio_output_plugins_for_each(plugin)
104 105
		if (strcmp(plugin->name, name) == 0)
			return plugin;
106

107
	return nullptr;
108
}