2009-03-13 18:43:16 +01:00
|
|
|
/*
|
2011-01-29 10:13:54 +01:00
|
|
|
* Copyright (C) 2003-2011 The Music Player Daemon Project
|
2009-03-13 18:43:16 +01:00
|
|
|
* http://www.musicpd.org
|
2008-09-08 11:43:13 +02:00
|
|
|
*
|
|
|
|
* 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.
|
2009-03-13 18:43:16 +01:00
|
|
|
*
|
|
|
|
* 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.
|
2008-09-08 11:43:13 +02:00
|
|
|
*/
|
|
|
|
|
2009-11-12 09:12:38 +01:00
|
|
|
#include "config.h"
|
2008-09-08 11:43:13 +02:00
|
|
|
#include "output_list.h"
|
|
|
|
#include "output_api.h"
|
2011-09-17 08:54:28 +02:00
|
|
|
#include "output/alsa_output_plugin.h"
|
|
|
|
#include "output/ao_output_plugin.h"
|
|
|
|
#include "output/ffado_output_plugin.h"
|
|
|
|
#include "output/fifo_output_plugin.h"
|
|
|
|
#include "output/httpd_output_plugin.h"
|
|
|
|
#include "output/jack_output_plugin.h"
|
|
|
|
#include "output/mvp_output_plugin.h"
|
|
|
|
#include "output/null_output_plugin.h"
|
|
|
|
#include "output/openal_output_plugin.h"
|
|
|
|
#include "output/oss_output_plugin.h"
|
|
|
|
#include "output/osx_output_plugin.h"
|
|
|
|
#include "output/pipe_output_plugin.h"
|
|
|
|
#include "output/pulse_output_plugin.h"
|
|
|
|
#include "output/raop_output_plugin.h"
|
|
|
|
#include "output/recorder_output_plugin.h"
|
|
|
|
#include "output/roar_output_plugin.h"
|
|
|
|
#include "output/shout_output_plugin.h"
|
|
|
|
#include "output/solaris_output_plugin.h"
|
|
|
|
#include "output/winmm_output_plugin.h"
|
2008-09-08 11:43:13 +02:00
|
|
|
|
|
|
|
const struct audio_output_plugin *audio_output_plugins[] = {
|
2008-10-26 21:58:37 +01:00
|
|
|
#ifdef HAVE_SHOUT
|
2011-09-17 20:04:18 +02:00
|
|
|
&shout_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2009-01-22 16:06:43 +01:00
|
|
|
&null_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#ifdef HAVE_FIFO
|
2009-02-25 19:53:24 +01:00
|
|
|
&fifo_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2009-02-28 16:11:59 +01:00
|
|
|
#ifdef ENABLE_PIPE_OUTPUT
|
|
|
|
&pipe_output_plugin,
|
|
|
|
#endif
|
2008-10-26 21:58:37 +01:00
|
|
|
#ifdef HAVE_ALSA
|
2011-09-17 20:04:18 +02:00
|
|
|
&alsa_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2011-02-08 00:17:58 +01:00
|
|
|
#ifdef HAVE_ROAR
|
|
|
|
&roar_output_plugin,
|
|
|
|
#endif
|
2008-10-26 21:58:37 +01:00
|
|
|
#ifdef HAVE_AO
|
2009-02-25 19:08:49 +01:00
|
|
|
&ao_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_OSS
|
2009-02-26 19:16:33 +01:00
|
|
|
&oss_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2009-08-31 09:26:22 +02:00
|
|
|
#ifdef HAVE_OPENAL
|
|
|
|
&openal_output_plugin,
|
|
|
|
#endif
|
2008-10-26 21:58:37 +01:00
|
|
|
#ifdef HAVE_OSX
|
2011-09-17 20:04:18 +02:00
|
|
|
&osx_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2011-01-28 21:17:09 +01:00
|
|
|
#ifdef ENABLE_RAOP_OUTPUT
|
2011-09-17 20:04:18 +02:00
|
|
|
&raop_output_plugin,
|
2011-01-28 21:17:09 +01:00
|
|
|
#endif
|
2009-03-16 09:55:10 +01:00
|
|
|
#ifdef ENABLE_SOLARIS_OUTPUT
|
|
|
|
&solaris_output_plugin,
|
|
|
|
#endif
|
2008-10-26 21:58:37 +01:00
|
|
|
#ifdef HAVE_PULSE
|
2009-10-20 21:05:11 +02:00
|
|
|
&pulse_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_MVP
|
2009-02-25 21:49:59 +01:00
|
|
|
&mvp_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_JACK
|
2009-10-21 18:33:01 +02:00
|
|
|
&jack_output_plugin,
|
httpd: new output plugin to replace "shout"
Let's get rid of the "shout" plugin, and the awfully complicated
icecast daemon setup! MPD can do better if it's doing the HTTP server
stuff on its own. This new plugin has several advantages:
- easier to set up - only one daemon, no password settings, no mount
settings
- MPD controls the encoder and thus already knows the packet
boundaries - icecast has to parse them
- MPD doesn't bother to encode data while nobody is listening
This implementation is very experimental (no header parsing, ignores
request URI, no icy-metadata, ...). It should be able to suport
several encoders in parallel in the future (with different bit rates,
different codec, ...), to make MPD the perfect streaming server. Once
MPD gets multi-player support, we can even mount several different
radio stations on one server.
2009-03-15 03:32:34 +01:00
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_HTTPD_OUTPUT
|
|
|
|
&httpd_output_plugin,
|
2009-08-24 18:57:06 +02:00
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_RECORDER_OUTPUT
|
|
|
|
&recorder_output_plugin,
|
2010-05-18 22:56:42 +02:00
|
|
|
#endif
|
2010-10-08 19:55:14 +02:00
|
|
|
#ifdef ENABLE_WINMM_OUTPUT
|
|
|
|
&winmm_output_plugin,
|
2010-10-03 21:07:55 +02:00
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_FFADO_OUTPUT
|
|
|
|
&ffado_output_plugin,
|
2008-10-26 21:58:37 +01:00
|
|
|
#endif
|
2008-09-08 11:43:13 +02:00
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
const struct audio_output_plugin *
|
|
|
|
audio_output_plugin_get(const char *name)
|
|
|
|
{
|
|
|
|
unsigned int i;
|
|
|
|
const struct audio_output_plugin *plugin;
|
|
|
|
|
|
|
|
audio_output_plugins_for_each(plugin, i)
|
|
|
|
if (strcmp(audio_output_plugins[i]->name, name) == 0)
|
|
|
|
return audio_output_plugins[i];
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
2009-03-18 19:11:48 +01:00
|
|
|
|
|
|
|
void audio_output_plugin_print_all_types(FILE * fp)
|
|
|
|
{
|
|
|
|
unsigned i;
|
|
|
|
const struct audio_output_plugin *plugin;
|
|
|
|
|
|
|
|
audio_output_plugins_for_each(plugin, i)
|
|
|
|
fprintf(fp, "%s ", plugin->name);
|
|
|
|
|
|
|
|
fprintf(fp, "\n");
|
|
|
|
fflush(fp);
|
|
|
|
}
|