output: convert to C++

This commit is contained in:
Max Kellermann 2013-04-17 01:12:05 +02:00
parent 4aeec4bb60
commit 3a2254c91f
17 changed files with 28 additions and 87 deletions

View File

@ -54,7 +54,6 @@ mpd_headers = \
src/ape.h \ src/ape.h \
src/audio_format.h \ src/audio_format.h \
src/audio_check.h \ src/audio_check.h \
src/output_internal.h \
src/output_api.h \ src/output_api.h \
src/filter_internal.h \ src/filter_internal.h \
src/command.h \ src/command.h \
@ -768,6 +767,7 @@ OUTPUT_LIBS = \
$(SHOUT_LIBS) $(SHOUT_LIBS)
OUTPUT_API_SRC = \ OUTPUT_API_SRC = \
src/OutputInternal.hxx \
src/OutputList.cxx src/OutputList.hxx \ src/OutputList.cxx src/OutputList.hxx \
src/OutputAll.cxx src/OutputAll.hxx \ src/OutputAll.cxx src/OutputAll.hxx \
src/OutputThread.cxx src/OutputThread.hxx \ src/OutputThread.cxx src/OutputThread.hxx \
@ -776,7 +776,7 @@ OUTPUT_API_SRC = \
src/OutputState.cxx src/OutputState.hxx \ src/OutputState.cxx src/OutputState.hxx \
src/OutputPrint.cxx src/OutputPrint.hxx \ src/OutputPrint.cxx src/OutputPrint.hxx \
src/OutputCommand.cxx src/OutputCommand.hxx \ src/OutputCommand.cxx src/OutputCommand.hxx \
src/OutputPlugin.cxx src/output_plugin.h \ src/OutputPlugin.cxx src/OutputPlugin.hxx \
src/OutputFinish.cxx \ src/OutputFinish.cxx \
src/OutputInit.cxx src/OutputInit.cxx

View File

@ -25,7 +25,7 @@
#include "DecoderList.hxx" #include "DecoderList.hxx"
#include "decoder_plugin.h" #include "decoder_plugin.h"
#include "OutputList.hxx" #include "OutputList.hxx"
#include "output_plugin.h" #include "OutputPlugin.hxx"
#include "InputRegistry.hxx" #include "InputRegistry.hxx"
#include "InputPlugin.hxx" #include "InputPlugin.hxx"
#include "PlaylistRegistry.hxx" #include "PlaylistRegistry.hxx"

View File

@ -24,10 +24,7 @@
#include "MixerList.hxx" #include "MixerList.hxx"
#include "OutputAll.hxx" #include "OutputAll.hxx"
#include "pcm/PcmVolume.hxx" #include "pcm/PcmVolume.hxx"
#include "OutputInternal.hxx"
extern "C" {
#include "output_internal.h"
}
#include <glib.h> #include <glib.h>

View File

@ -19,12 +19,8 @@
#include "config.h" #include "config.h"
#include "OutputAll.hxx" #include "OutputAll.hxx"
extern "C" {
#include "output_internal.h"
}
#include "PlayerControl.hxx" #include "PlayerControl.hxx"
#include "OutputInternal.hxx"
#include "OutputControl.hxx" #include "OutputControl.hxx"
#include "OutputError.hxx" #include "OutputError.hxx"
#include "MusicBuffer.hxx" #include "MusicBuffer.hxx"

View File

@ -27,15 +27,12 @@
#include "config.h" #include "config.h"
#include "OutputCommand.hxx" #include "OutputCommand.hxx"
#include "OutputAll.hxx" #include "OutputAll.hxx"
#include "OutputInternal.hxx"
#include "OutputPlugin.hxx"
#include "PlayerControl.hxx" #include "PlayerControl.hxx"
#include "MixerControl.hxx" #include "MixerControl.hxx"
#include "Idle.hxx" #include "Idle.hxx"
extern "C" {
#include "output_internal.h"
#include "output_plugin.h"
}
extern unsigned audio_output_state_version; extern unsigned audio_output_state_version;
bool bool

View File

@ -20,12 +20,8 @@
#include "config.h" #include "config.h"
#include "OutputControl.hxx" #include "OutputControl.hxx"
#include "OutputThread.hxx" #include "OutputThread.hxx"
#include "output_api.h" #include "OutputInternal.hxx"
#include "OutputPlugin.hxx"
extern "C" {
#include "output_internal.h"
}
#include "MixerPlugin.hxx" #include "MixerPlugin.hxx"
#include "MixerControl.hxx" #include "MixerControl.hxx"
#include "notify.hxx" #include "notify.hxx"

View File

@ -18,12 +18,8 @@
*/ */
#include "config.h" #include "config.h"
#include "OutputInternal.hxx"
extern "C" { #include "OutputPlugin.hxx"
#include "output_internal.h"
#include "output_plugin.h"
}
#include "MixerControl.hxx" #include "MixerControl.hxx"
#include "FilterInternal.hxx" #include "FilterInternal.hxx"

View File

@ -18,17 +18,13 @@
*/ */
#include "config.h" #include "config.h"
#include "OutputInternal.hxx"
#include "OutputControl.hxx" #include "OutputControl.hxx"
#include "OutputList.hxx" #include "OutputList.hxx"
#include "OutputError.hxx" #include "OutputError.hxx"
#include "FilterConfig.hxx" #include "FilterConfig.hxx"
#include "output_api.h" #include "output_api.h"
#include "AudioParser.hxx" #include "AudioParser.hxx"
extern "C" {
#include "output_internal.h"
}
#include "MixerList.hxx" #include "MixerList.hxx"
#include "MixerType.hxx" #include "MixerType.hxx"
#include "MixerControl.hxx" #include "MixerControl.hxx"

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2003-2011 The Music Player Daemon Project * Copyright (C) 2003-2013 The Music Player Daemon Project
* http://www.musicpd.org * http://www.musicpd.org
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef MPD_OUTPUT_INTERNAL_H #ifndef MPD_OUTPUT_INTERNAL_HXX
#define MPD_OUTPUT_INTERNAL_H #define MPD_OUTPUT_INTERNAL_HXX
#include "audio_format.h" #include "audio_format.h"
#include "pcm/pcm_buffer.h" #include "pcm/pcm_buffer.h"
@ -27,12 +27,7 @@
#include <time.h> #include <time.h>
#ifdef __cplusplus
class Filter; class Filter;
#else
typedef void *Filter;
#endif
struct config_param; struct config_param;
enum audio_output_command { enum audio_output_command {
@ -76,11 +71,7 @@ struct audio_output {
* May be NULL if none is available, or if software volume is * May be NULL if none is available, or if software volume is
* configured. * configured.
*/ */
#ifdef __cplusplus
class Mixer *mixer; class Mixer *mixer;
#else
struct mixer *mixer;
#endif
/** /**
* Will this output receive tags from the decoder? The * Will this output receive tags from the decoder? The
@ -267,10 +258,6 @@ audio_output_command_is_finished(const struct audio_output *ao)
return ao->command == AO_COMMAND_NONE; return ao->command == AO_COMMAND_NONE;
} }
#ifdef __cplusplus
extern "C" {
#endif
struct audio_output * struct audio_output *
audio_output_new(const struct config_param *param, audio_output_new(const struct config_param *param,
struct player_control *pc, struct player_control *pc,
@ -287,8 +274,4 @@ ao_base_finish(struct audio_output *ao);
void void
audio_output_free(struct audio_output *ao); audio_output_free(struct audio_output *ao);
#ifdef __cplusplus
}
#endif
#endif #endif

View File

@ -18,12 +18,8 @@
*/ */
#include "config.h" #include "config.h"
#include "OutputPlugin.hxx"
extern "C" { #include "OutputInternal.hxx"
#include "output_plugin.h"
}
#include "output_internal.h"
struct audio_output * struct audio_output *
ao_plugin_init(const struct audio_output_plugin *plugin, ao_plugin_init(const struct audio_output_plugin *plugin,

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2003-2011 The Music Player Daemon Project * Copyright (C) 2003-2013 The Music Player Daemon Project
* http://www.musicpd.org * http://www.musicpd.org
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef MPD_OUTPUT_PLUGIN_H #ifndef MPD_OUTPUT_PLUGIN_HXX
#define MPD_OUTPUT_PLUGIN_H #define MPD_OUTPUT_PLUGIN_HXX
#include "gcc.h" #include "gcc.h"
#include "gerror.h" #include "gerror.h"
@ -166,10 +166,6 @@ ao_plugin_test_default_device(const struct audio_output_plugin *plugin)
: false; : false;
} }
#ifdef __cplusplus
extern "C" {
#endif
gcc_malloc gcc_malloc
struct audio_output * struct audio_output *
ao_plugin_init(const struct audio_output_plugin *plugin, ao_plugin_init(const struct audio_output_plugin *plugin,
@ -212,8 +208,4 @@ ao_plugin_cancel(struct audio_output *ao);
bool bool
ao_plugin_pause(struct audio_output *ao); ao_plugin_pause(struct audio_output *ao);
#ifdef __cplusplus
}
#endif
#endif #endif

View File

@ -25,7 +25,7 @@
#include "config.h" #include "config.h"
#include "OutputPrint.hxx" #include "OutputPrint.hxx"
#include "OutputAll.hxx" #include "OutputAll.hxx"
#include "output_internal.h" #include "OutputInternal.hxx"
#include "Client.hxx" #include "Client.hxx"
void void

View File

@ -25,7 +25,7 @@
#include "config.h" #include "config.h"
#include "OutputState.hxx" #include "OutputState.hxx"
#include "OutputAll.hxx" #include "OutputAll.hxx"
#include "output_internal.h" #include "OutputInternal.hxx"
#include <glib.h> #include <glib.h>

View File

@ -19,13 +19,9 @@
#include "config.h" #include "config.h"
#include "OutputThread.hxx" #include "OutputThread.hxx"
#include "OutputInternal.hxx"
#include "output_api.h" #include "output_api.h"
#include "pcm/PcmMix.hxx" #include "pcm/PcmMix.hxx"
extern "C" {
#include "output_internal.h"
}
#include "notify.hxx" #include "notify.hxx"
#include "FilterInternal.hxx" #include "FilterInternal.hxx"
#include "filter/ConvertFilterPlugin.hxx" #include "filter/ConvertFilterPlugin.hxx"

View File

@ -25,7 +25,7 @@
#ifndef MPD_OUTPUT_HTTPD_INTERNAL_H #ifndef MPD_OUTPUT_HTTPD_INTERNAL_H
#define MPD_OUTPUT_HTTPD_INTERNAL_H #define MPD_OUTPUT_HTTPD_INTERNAL_H
#include "output_internal.h" #include "OutputInternal.hxx"
#include "timer.h" #include "timer.h"
#include "thread/Mutex.hxx" #include "thread/Mutex.hxx"
#include "event/ServerSocket.hxx" #include "event/ServerSocket.hxx"

View File

@ -20,8 +20,8 @@
#ifndef MPD_OUTPUT_API_H #ifndef MPD_OUTPUT_API_H
#define MPD_OUTPUT_API_H #define MPD_OUTPUT_API_H
#include "output_plugin.h" #include "OutputPlugin.hxx"
#include "output_internal.h" #include "OutputInternal.hxx"
#include "audio_format.h" #include "audio_format.h"
#include "tag.h" #include "tag.h"
#include "conf.h" #include "conf.h"

View File

@ -19,6 +19,8 @@
#include "config.h" #include "config.h"
#include "OutputControl.hxx" #include "OutputControl.hxx"
#include "OutputInternal.hxx"
#include "OutputPlugin.hxx"
#include "conf.h" #include "conf.h"
#include "Idle.hxx" #include "Idle.hxx"
#include "Main.hxx" #include "Main.hxx"
@ -28,12 +30,6 @@
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include "AudioParser.hxx" #include "AudioParser.hxx"
#include "pcm/PcmConvert.hxx" #include "pcm/PcmConvert.hxx"
extern "C" {
#include "output_plugin.h"
#include "output_internal.h"
}
#include "FilterRegistry.hxx" #include "FilterRegistry.hxx"
#include "PlayerControl.hxx" #include "PlayerControl.hxx"
#include "stdbin.h" #include "stdbin.h"