Commit 3c9bcdd3 authored by Max Kellermann's avatar Max Kellermann

output: per-plugin header

Move the "extern" declarations from output_list.c, for more type safety.
parent 3934d2d3
......@@ -144,9 +144,6 @@ mpd_headers = \
src/open.h \
src/output/httpd_client.h \
src/output/httpd_internal.h \
src/output/pulse_output_plugin.h \
src/output/roar_output_plugin.h \
src/output/winmm_output_plugin.h \
src/page.h \
src/pcm_buffer.h \
src/pcm_utils.h \
......@@ -735,12 +732,14 @@ MIXER_SRC = \
src/mixer/software_mixer_plugin.c
if HAVE_ALSA
OUTPUT_SRC += src/output/alsa_output_plugin.c
OUTPUT_SRC += \
src/output/alsa_output_plugin.c src/output/alsa_output_plugin.h
MIXER_SRC += src/mixer/alsa_mixer_plugin.c
endif
if HAVE_ROAR
OUTPUT_SRC += src/output/roar_output_plugin.c
OUTPUT_SRC += \
src/output/roar_output_plugin.c src/output/roar_output_plugin.h
MIXER_SRC += src/mixer/roar_mixer_plugin.c
endif
......@@ -791,7 +790,8 @@ OUTPUT_LIBS += $(OPENSSL_LIBS)
endif
if HAVE_PULSE
OUTPUT_SRC += src/output/pulse_output_plugin.c
OUTPUT_SRC += \
src/output/pulse_output_plugin.c src/output/pulse_output_plugin.h
MIXER_SRC += src/mixer/pulse_mixer_plugin.c
endif
......@@ -815,7 +815,8 @@ OUTPUT_SRC += src/output/solaris_output_plugin.c
endif
if ENABLE_WINMM_OUTPUT
OUTPUT_SRC += src/output/winmm_output_plugin.c
OUTPUT_SRC += \
src/output/winmm_output_plugin.c src/output/winmm_output_plugin.h
MIXER_SRC += src/mixer/winmm_mixer_plugin.c
endif
......
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "alsa_output_plugin.h"
#include "output_api.h"
#include "mixer_list.h"
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_ALSA_OUTPUT_PLUGIN_H
#define MPD_ALSA_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin alsaPlugin;
#endif
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "ao_output_plugin.h"
#include "output_api.h"
#include <ao/ao.h>
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_AO_OUTPUT_PLUGIN_H
#define MPD_AO_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin ao_output_plugin;
#endif
......@@ -30,6 +30,7 @@
*/
#include "config.h"
#include "ffado_output_plugin.h"
#include "output_api.h"
#include "timer.h"
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_FFADO_OUTPUT_PLUGIN_H
#define MPD_FFADO_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin ffado_output_plugin;
#endif
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "fifo_output_plugin.h"
#include "output_api.h"
#include "utils.h"
#include "timer.h"
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_FIFO_OUTPUT_PLUGIN_H
#define MPD_FIFO_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin fifo_output_plugin;
#endif
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "httpd_output_plugin.h"
#include "httpd_internal.h"
#include "httpd_client.h"
#include "output_api.h"
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_HTTPD_OUTPUT_PLUGIN_H
#define MPD_HTTPD_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin httpd_output_plugin;
#endif
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "jack_output_plugin.h"
#include "output_api.h"
#include <assert.h>
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_JACK_OUTPUT_PLUGIN_H
#define MPD_JACK_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin jack_output_plugin;
#endif
......@@ -23,6 +23,7 @@
*/
#include "config.h"
#include "mvp_output_plugin.h"
#include "output_api.h"
#include "fd_util.h"
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_MVP_OUTPUT_PLUGIN_H
#define MPD_MVP_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin mvp_output_plugin;
#endif
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "null_output_plugin.h"
#include "output_api.h"
#include "timer.h"
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_NULL_OUTPUT_PLUGIN_H
#define MPD_NULL_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin null_output_plugin;
#endif
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "openal_output_plugin.h"
#include "output_api.h"
#include "timer.h"
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_OPENAL_OUTPUT_PLUGIN_H
#define MPD_OPENAL_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin openal_output_plugin;
#endif
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "oss_output_plugin.h"
#include "output_api.h"
#include "mixer_list.h"
#include "fd_util.h"
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_OSS_OUTPUT_PLUGIN_H
#define MPD_OSS_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin oss_output_plugin;
#endif
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "osx_output_plugin.h"
#include "output_api.h"
#include <glib.h>
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_OSX_OUTPUT_PLUGIN_H
#define MPD_OSX_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin osx_output_plugin;
#endif
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "pipe_output_plugin.h"
#include "output_api.h"
#include <stdio.h>
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_PIPE_OUTPUT_PLUGIN_H
#define MPD_PIPE_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin pipe_output_plugin;
#endif
......@@ -28,6 +28,8 @@ struct pulse_output;
struct pulse_mixer;
struct pa_cvolume;
extern const struct audio_output_plugin pulse_output_plugin;
void
pulse_output_lock(struct pulse_output *po);
......
......@@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "raop_output_plugin.h"
#include "output_api.h"
#include "mixer_list.h"
......
......@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_OUTPUT_RAOP_PLUGIN_H
#define MPD_OUTPUT_RAOP_PLUGIN_H
#ifndef MPD_RAOP_OUTPUT_PLUGIN_H
#define MPD_RAOP_OUTPUT_PLUGIN_H
#include <glib.h>
......@@ -26,6 +26,8 @@
struct raop_data;
extern const struct audio_output_plugin raopPlugin;
bool
raop_set_volume(struct raop_data *rd, unsigned volume, GError **error_r);
......
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "recorder_output_plugin.h"
#include "output_api.h"
#include "encoder_plugin.h"
#include "encoder_list.h"
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_RECORDER_OUTPUT_PLUGIN_H
#define MPD_RECORDER_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin recorder_output_plugin;
#endif
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "roar_output_plugin.h"
#include "output_api.h"
#include "mixer_list.h"
#include "roar_output_plugin.h"
......
/*
* Copyright (C) 2003-2010 The Music Player Daemon Project
* Copyright (C) 2010-2011 Philipp 'ph3-der-loewe' Schafft
* Copyright (C) 2010-2011 Hans-Kristian 'maister' Arntzen
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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
......@@ -18,14 +17,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __ROAR_OUTPUT_H
#define __ROAR_OUTPUT_H
#ifndef MPD_ROAR_OUTPUT_PLUGIN_H
#define MPD_ROAR_OUTPUT_PLUGIN_H
#include <stdbool.h>
struct roar;
extern const struct audio_output_plugin roar_output_plugin;
int
roar_output_get_volume(struct roar *roar);
......
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "shout_output_plugin.h"
#include "output_api.h"
#include "encoder_plugin.h"
#include "encoder_list.h"
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_SHOUT_OUTPUT_PLUGIN_H
#define MPD_SHOUT_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin shoutPlugin;
#endif
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "solaris_output_plugin.h"
#include "output_api.h"
#include "fd_util.h"
......
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* 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.
*/
#ifndef MPD_SOLARIS_OUTPUT_PLUGIN_H
#define MPD_SOLARIS_OUTPUT_PLUGIN_H
extern const struct audio_output_plugin solaris_output_plugin;
#endif
......@@ -18,6 +18,7 @@
*/
#include "config.h"
#include "winmm_output_plugin.h"
#include "output_api.h"
#include "pcm_buffer.h"
#include "mixer_list.h"
......
......@@ -20,10 +20,18 @@
#ifndef MPD_WINMM_OUTPUT_PLUGIN_H
#define MPD_WINMM_OUTPUT_PLUGIN_H
#include "check.h"
#ifdef ENABLE_WINMM_OUTPUT
#include <windows.h>
struct winmm_output;
extern const struct audio_output_plugin winmm_output_plugin;
HWAVEOUT winmm_output_get_handle(struct winmm_output*);
#endif
#endif
......@@ -20,26 +20,25 @@
#include "config.h"
#include "output_list.h"
#include "output_api.h"
extern const struct audio_output_plugin shoutPlugin;
extern const struct audio_output_plugin null_output_plugin;
extern const struct audio_output_plugin fifo_output_plugin;
extern const struct audio_output_plugin pipe_output_plugin;
extern const struct audio_output_plugin alsaPlugin;
extern const struct audio_output_plugin roar_output_plugin;
extern const struct audio_output_plugin ao_output_plugin;
extern const struct audio_output_plugin oss_output_plugin;
extern const struct audio_output_plugin openal_output_plugin;
extern const struct audio_output_plugin osxPlugin;
extern const struct audio_output_plugin raopPlugin;
extern const struct audio_output_plugin solaris_output_plugin;
extern const struct audio_output_plugin pulse_output_plugin;
extern const struct audio_output_plugin mvp_output_plugin;
extern const struct audio_output_plugin jack_output_plugin;
extern const struct audio_output_plugin httpd_output_plugin;
extern const struct audio_output_plugin recorder_output_plugin;
extern const struct audio_output_plugin winmm_output_plugin;
extern const struct audio_output_plugin ffado_output_plugin;
#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"
const struct audio_output_plugin *audio_output_plugins[] = {
#ifdef HAVE_SHOUT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment