2009-12-14 22:41:29 +01:00
|
|
|
/*
|
2014-01-13 22:30:36 +01:00
|
|
|
* Copyright (C) 2003-2014 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"
|
2013-01-10 10:15:09 +01:00
|
|
|
#include "InputRegistry.hxx"
|
2013-10-15 22:04:17 +02:00
|
|
|
#include "util/Macros.hxx"
|
2013-01-21 10:49:42 +01:00
|
|
|
#include "input/FileInputPlugin.hxx"
|
2009-12-14 22:41:29 +01:00
|
|
|
|
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
|
|
|
#ifdef HAVE_ALSA
|
|
|
|
#include "input/AlsaInputPlugin.hxx"
|
|
|
|
#endif
|
|
|
|
|
2009-12-14 22:41:29 +01:00
|
|
|
#ifdef ENABLE_ARCHIVE
|
2013-01-24 19:18:58 +01:00
|
|
|
#include "input/ArchiveInputPlugin.hxx"
|
2009-12-14 22:41:29 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ENABLE_CURL
|
2013-01-10 10:14:29 +01:00
|
|
|
#include "input/CurlInputPlugin.hxx"
|
2009-12-14 22:41:29 +01:00
|
|
|
#endif
|
|
|
|
|
2010-05-18 20:48:52 +02:00
|
|
|
#ifdef HAVE_FFMPEG
|
2013-01-21 17:38:40 +01:00
|
|
|
#include "input/FfmpegInputPlugin.hxx"
|
2010-05-18 20:48:52 +02:00
|
|
|
#endif
|
|
|
|
|
2013-12-29 00:36:57 +01:00
|
|
|
#ifdef ENABLE_SMBCLIENT
|
|
|
|
#include "input/SmbclientInputPlugin.hxx"
|
|
|
|
#endif
|
|
|
|
|
2009-12-14 22:41:29 +01:00
|
|
|
#ifdef ENABLE_MMS
|
2013-01-21 10:49:42 +01:00
|
|
|
#include "input/MmsInputPlugin.hxx"
|
2009-12-14 22:41:29 +01:00
|
|
|
#endif
|
|
|
|
|
2010-12-21 22:23:01 +01:00
|
|
|
#ifdef ENABLE_CDIO_PARANOIA
|
2013-01-21 17:58:30 +01:00
|
|
|
#include "input/CdioParanoiaInputPlugin.hxx"
|
2010-12-21 22:23:01 +01:00
|
|
|
#endif
|
|
|
|
|
2011-03-27 08:41:05 +02:00
|
|
|
#ifdef ENABLE_DESPOTIFY
|
2013-01-21 18:24:26 +01:00
|
|
|
#include "input/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,
|
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
|
|
|
#ifdef HAVE_ALSA
|
|
|
|
&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
|
2010-05-18 20:48:52 +02:00
|
|
|
#ifdef HAVE_FFMPEG
|
|
|
|
&input_plugin_ffmpeg,
|
|
|
|
#endif
|
2013-12-29 00:36:57 +01:00
|
|
|
#ifdef ENABLE_SMBCLIENT
|
|
|
|
&input_plugin_smbclient,
|
|
|
|
#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];
|