2009-12-14 22:41:29 +01:00
|
|
|
/*
|
2015-01-01 19:48:13 +01:00
|
|
|
* Copyright (C) 2003-2015 The Music Player Daemon Project
|
2009-12-14 22:41:29 +01:00
|
|
|
* http://www.musicpd.org
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
2014-01-24 16:18:21 +01:00
|
|
|
#include "Registry.hxx"
|
2013-10-15 22:04:17 +02:00
|
|
|
#include "util/Macros.hxx"
|
2014-01-24 16:18:21 +01:00
|
|
|
#include "plugins/FileInputPlugin.hxx"
|
2009-12-14 22:41:29 +01:00
|
|
|
|
2014-11-21 22:19:57 +01:00
|
|
|
#ifdef ENABLE_ALSA
|
2014-01-24 16:18:21 +01:00
|
|
|
#include "plugins/AlsaInputPlugin.hxx"
|
add draft ALSA input plugin
I've created an elementary input plugin that plays sound from the
soundcard, so you can use MPD to listen to anything connected to the
line-in jack, or to Video4Linux FM radio cards that send audio through
the soundcard. There has been a small number of posts here in the
past requesting line-in input, so here is a first, simplistic stab at
it.
The patch adds a new sheme, alsa://, which causes mpd to play data
read directly from a souncdard. It defaults to hw:0,0, but you can
pass any ALSA device name in the URI. So, using mpc for example:
mpc add alsa://
mpc play
will play from device hw:0,0.
To use a diffferent device:
mpc add alsa://hw:1,0
2013-12-15 17:52:21 +01:00
|
|
|
#endif
|
|
|
|
|
2009-12-14 22:41:29 +01:00
|
|
|
#ifdef ENABLE_ARCHIVE
|
2014-01-24 16:18:21 +01:00
|
|
|
#include "plugins/ArchiveInputPlugin.hxx"
|
2009-12-14 22:41:29 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ENABLE_CURL
|
2014-01-24 16:18:21 +01:00
|
|
|
#include "plugins/CurlInputPlugin.hxx"
|
2009-12-14 22:41:29 +01:00
|
|
|
#endif
|
|
|
|
|
2014-11-21 22:19:57 +01:00
|
|
|
#ifdef ENABLE_FFMPEG
|
2014-01-24 16:18:21 +01:00
|
|
|
#include "plugins/FfmpegInputPlugin.hxx"
|
2010-05-18 20:48:52 +02:00
|
|
|
#endif
|
|
|
|
|
2013-12-29 00:36:57 +01:00
|
|
|
#ifdef ENABLE_SMBCLIENT
|
2014-01-24 16:18:21 +01:00
|
|
|
#include "plugins/SmbclientInputPlugin.hxx"
|
2013-12-29 00:36:57 +01:00
|
|
|
#endif
|
|
|
|
|
2014-02-06 07:29:26 +01:00
|
|
|
#ifdef ENABLE_NFS
|
|
|
|
#include "plugins/NfsInputPlugin.hxx"
|
|
|
|
#endif
|
|
|
|
|
2009-12-14 22:41:29 +01:00
|
|
|
#ifdef ENABLE_MMS
|
2014-01-24 16:18:21 +01:00
|
|
|
#include "plugins/MmsInputPlugin.hxx"
|
2009-12-14 22:41:29 +01:00
|
|
|
#endif
|
|
|
|
|
2010-12-21 22:23:01 +01:00
|
|
|
#ifdef ENABLE_CDIO_PARANOIA
|
2014-01-24 16:18:21 +01:00
|
|
|
#include "plugins/CdioParanoiaInputPlugin.hxx"
|
2010-12-21 22:23:01 +01:00
|
|
|
#endif
|
|
|
|
|
2011-03-27 08:41:05 +02:00
|
|
|
#ifdef ENABLE_DESPOTIFY
|
2014-01-24 16:18:21 +01:00
|
|
|
#include "plugins/DespotifyInputPlugin.hxx"
|
2011-03-27 08:41:05 +02:00
|
|
|
#endif
|
|
|
|
|
2013-10-17 10:20:57 +02:00
|
|
|
const InputPlugin *const input_plugins[] = {
|
2009-12-14 22:41:29 +01:00
|
|
|
&input_plugin_file,
|
2014-11-21 22:19:57 +01:00
|
|
|
#ifdef ENABLE_ALSA
|
add draft ALSA input plugin
I've created an elementary input plugin that plays sound from the
soundcard, so you can use MPD to listen to anything connected to the
line-in jack, or to Video4Linux FM radio cards that send audio through
the soundcard. There has been a small number of posts here in the
past requesting line-in input, so here is a first, simplistic stab at
it.
The patch adds a new sheme, alsa://, which causes mpd to play data
read directly from a souncdard. It defaults to hw:0,0, but you can
pass any ALSA device name in the URI. So, using mpc for example:
mpc add alsa://
mpc play
will play from device hw:0,0.
To use a diffferent device:
mpc add alsa://hw:1,0
2013-12-15 17:52:21 +01:00
|
|
|
&input_plugin_alsa,
|
|
|
|
#endif
|
2009-12-14 22:41:29 +01:00
|
|
|
#ifdef ENABLE_ARCHIVE
|
|
|
|
&input_plugin_archive,
|
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_CURL
|
|
|
|
&input_plugin_curl,
|
|
|
|
#endif
|
2014-11-21 22:19:57 +01:00
|
|
|
#ifdef ENABLE_FFMPEG
|
2010-05-18 20:48:52 +02:00
|
|
|
&input_plugin_ffmpeg,
|
|
|
|
#endif
|
2013-12-29 00:36:57 +01:00
|
|
|
#ifdef ENABLE_SMBCLIENT
|
|
|
|
&input_plugin_smbclient,
|
|
|
|
#endif
|
2014-02-06 07:29:26 +01:00
|
|
|
#ifdef ENABLE_NFS
|
|
|
|
&input_plugin_nfs,
|
|
|
|
#endif
|
2009-12-14 22:41:29 +01:00
|
|
|
#ifdef ENABLE_MMS
|
|
|
|
&input_plugin_mms,
|
2010-12-21 22:23:01 +01:00
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_CDIO_PARANOIA
|
|
|
|
&input_plugin_cdio_paranoia,
|
2011-03-27 08:41:05 +02:00
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_DESPOTIFY
|
|
|
|
&input_plugin_despotify,
|
2009-12-14 22:41:29 +01:00
|
|
|
#endif
|
2013-10-15 22:04:17 +02:00
|
|
|
nullptr
|
2009-12-14 22:41:29 +01:00
|
|
|
};
|
|
|
|
|
2013-10-15 22:04:17 +02:00
|
|
|
bool input_plugins_enabled[ARRAY_SIZE(input_plugins) - 1];
|