decoder_api: convert to C++

This commit is contained in:
Max Kellermann 2013-07-28 13:18:48 +02:00
parent 2277d143fa
commit 43f613d9be
46 changed files with 61 additions and 73 deletions

View File

@ -58,10 +58,6 @@ mpd_headers = \
src/filter_internal.h \ src/filter_internal.h \
src/command.h \ src/command.h \
src/conf.h \ src/conf.h \
src/decoder_plugin.h \
src/decoder_command.h \
src/decoder_api.h \
src/decoder_plugin.h \
src/encoder_plugin.h \ src/encoder_plugin.h \
src/encoder_api.h \ src/encoder_api.h \
src/fd_util.h \ src/fd_util.h \
@ -129,10 +125,12 @@ src_mpd_SOURCES = \
src/CommandLine.cxx src/CommandLine.hxx \ src/CommandLine.cxx src/CommandLine.hxx \
src/CrossFade.cxx src/CrossFade.hxx \ src/CrossFade.cxx src/CrossFade.hxx \
src/cue/CueParser.cxx src/cue/CueParser.hxx \ src/cue/CueParser.cxx src/cue/CueParser.hxx \
src/decoder_error.h \ src/DecoderError.hxx \
src/DecoderThread.cxx src/DecoderThread.hxx \ src/DecoderThread.cxx src/DecoderThread.hxx \
src/DecoderCommand.hxx \
src/DecoderControl.cxx src/DecoderControl.hxx \ src/DecoderControl.cxx src/DecoderControl.hxx \
src/DecoderAPI.cxx \ src/DecoderAPI.cxx src/DecoderAPI.hxx \
src/DecoderPlugin.hxx \
src/DecoderInternal.cxx src/DecoderInternal.hxx \ src/DecoderInternal.cxx src/DecoderInternal.hxx \
src/DecoderPrint.cxx src/DecoderPrint.hxx \ src/DecoderPrint.cxx src/DecoderPrint.hxx \
src/Directory.cxx src/Directory.hxx \ src/Directory.cxx src/Directory.hxx \

View File

@ -23,7 +23,7 @@
#include "Log.hxx" #include "Log.hxx"
#include "conf.h" #include "conf.h"
#include "DecoderList.hxx" #include "DecoderList.hxx"
#include "decoder_plugin.h" #include "DecoderPlugin.hxx"
#include "OutputList.hxx" #include "OutputList.hxx"
#include "OutputPlugin.hxx" #include "OutputPlugin.hxx"
#include "InputRegistry.hxx" #include "InputRegistry.hxx"

View File

@ -18,7 +18,7 @@
*/ */
#include "config.h" #include "config.h"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "AudioConfig.hxx" #include "AudioConfig.hxx"
#include "replay_gain_config.h" #include "replay_gain_config.h"
#include "MusicChunk.hxx" #include "MusicChunk.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
@ -24,24 +24,18 @@
* communicate with the mpd core. * communicate with the mpd core.
*/ */
#ifndef MPD_DECODER_API_H #ifndef MPD_DECODER_API_HXX
#define MPD_DECODER_API_H #define MPD_DECODER_API_HXX
#include "check.h" #include "check.h"
#include "decoder_command.h" #include "DecoderCommand.hxx"
#include "decoder_plugin.h" #include "DecoderPlugin.hxx"
#include "input_stream.h" #include "input_stream.h"
#include "replay_gain_info.h" #include "replay_gain_info.h"
#include "tag.h" #include "tag.h"
#include "audio_format.h" #include "audio_format.h"
#include "conf.h" #include "conf.h"
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* Notify the player thread that it has finished initialization and * Notify the player thread that it has finished initialization and
* that it has read the song's meta data. * that it has read the song's meta data.
@ -172,8 +166,4 @@ void
decoder_mixramp(struct decoder *decoder, decoder_mixramp(struct decoder *decoder,
char *mixramp_start, char *mixramp_end); char *mixramp_start, char *mixramp_end);
#ifdef __cplusplus
}
#endif
#endif #endif

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "DecoderBuffer.hxx" #include "DecoderBuffer.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include <glib.h> #include <glib.h>

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_DECODER_COMMAND_H #ifndef MPD_DECODER_COMMAND_HXX
#define MPD_DECODER_COMMAND_H #define MPD_DECODER_COMMAND_HXX
enum decoder_command { enum decoder_command {
DECODE_COMMAND_NONE = 0, DECODE_COMMAND_NONE = 0,

View File

@ -20,7 +20,7 @@
#ifndef MPD_DECODER_CONTROL_HXX #ifndef MPD_DECODER_CONTROL_HXX
#define MPD_DECODER_CONTROL_HXX #define MPD_DECODER_CONTROL_HXX
#include "decoder_command.h" #include "DecoderCommand.hxx"
#include "audio_format.h" #include "audio_format.h"
#include "thread/Mutex.hxx" #include "thread/Mutex.hxx"
#include "thread/Cond.hxx" #include "thread/Cond.hxx"

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2003-2012 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_DECODER_ERROR_H #ifndef MPD_DECODER_ERROR_HXX
#define MPD_DECODER_ERROR_H #define MPD_DECODER_ERROR_HXX
#include <glib.h> #include <glib.h>

View File

@ -20,7 +20,7 @@
#ifndef MPD_DECODER_INTERNAL_HXX #ifndef MPD_DECODER_INTERNAL_HXX
#define MPD_DECODER_INTERNAL_HXX #define MPD_DECODER_INTERNAL_HXX
#include "decoder_command.h" #include "DecoderCommand.hxx"
#include "pcm/PcmConvert.hxx" #include "pcm/PcmConvert.hxx"
#include "replay_gain_info.h" #include "replay_gain_info.h"

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "DecoderList.hxx" #include "DecoderList.hxx"
#include "decoder_plugin.h" #include "DecoderPlugin.hxx"
#include "conf.h" #include "conf.h"
#include "mpd_error.h" #include "mpd_error.h"
#include "decoder/AudiofileDecoderPlugin.hxx" #include "decoder/AudiofileDecoderPlugin.hxx"

View File

@ -18,7 +18,7 @@
*/ */
#include "config.h" #include "config.h"
#include "decoder_plugin.h" #include "DecoderPlugin.hxx"
#include "util/StringUtil.hxx" #include "util/StringUtil.hxx"
#include <assert.h> #include <assert.h>

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_DECODER_PLUGIN_H #ifndef MPD_DECODER_PLUGIN_HXX
#define MPD_DECODER_PLUGIN_H #define MPD_DECODER_PLUGIN_HXX
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>

View File

@ -20,7 +20,7 @@
#include "config.h" #include "config.h"
#include "DecoderPrint.hxx" #include "DecoderPrint.hxx"
#include "DecoderList.hxx" #include "DecoderList.hxx"
#include "decoder_plugin.h" #include "DecoderPlugin.hxx"
#include "Client.hxx" #include "Client.hxx"
#include <assert.h> #include <assert.h>

View File

@ -21,13 +21,13 @@
#include "DecoderThread.hxx" #include "DecoderThread.hxx"
#include "DecoderControl.hxx" #include "DecoderControl.hxx"
#include "DecoderInternal.hxx" #include "DecoderInternal.hxx"
#include "decoder_error.h" #include "DecoderError.hxx"
#include "decoder_plugin.h" #include "DecoderPlugin.hxx"
#include "song.h" #include "song.h"
#include "mpd_error.h" #include "mpd_error.h"
#include "Mapper.hxx" #include "Mapper.hxx"
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "tag.h" #include "tag.h"
#include "InputStream.hxx" #include "InputStream.hxx"
#include "DecoderList.hxx" #include "DecoderList.hxx"

View File

@ -30,7 +30,7 @@ extern "C" {
#include "fs/FileSystem.hxx" #include "fs/FileSystem.hxx"
#include "tag.h" #include "tag.h"
#include "input_stream.h" #include "input_stream.h"
#include "decoder_plugin.h" #include "DecoderPlugin.hxx"
#include "DecoderList.hxx" #include "DecoderList.hxx"
extern "C" { extern "C" {

View File

@ -21,7 +21,7 @@
#include "TagFile.hxx" #include "TagFile.hxx"
#include "util/UriUtil.hxx" #include "util/UriUtil.hxx"
#include "DecoderList.hxx" #include "DecoderList.hxx"
#include "decoder_plugin.h" #include "DecoderPlugin.hxx"
#include "input_stream.h" #include "input_stream.h"
#include <assert.h> #include <assert.h>

View File

@ -24,7 +24,7 @@
#include "DatabaseLock.hxx" #include "DatabaseLock.hxx"
#include "Directory.hxx" #include "Directory.hxx"
#include "song.h" #include "song.h"
#include "decoder_plugin.h" #include "DecoderPlugin.hxx"
#include "Mapper.hxx" #include "Mapper.hxx"
#include "fs/Path.hxx" #include "fs/Path.hxx"

View File

@ -26,7 +26,7 @@
#include "DatabaseLock.hxx" #include "DatabaseLock.hxx"
#include "Directory.hxx" #include "Directory.hxx"
#include "song.h" #include "song.h"
#include "decoder_plugin.h" #include "DecoderPlugin.hxx"
#include "DecoderList.hxx" #include "DecoderList.hxx"
#include <glib.h> #include <glib.h>

View File

@ -20,7 +20,7 @@
#include "config.h" #include "config.h"
#include "AdPlugDecoderPlugin.h" #include "AdPlugDecoderPlugin.h"
#include "tag_handler.h" #include "tag_handler.h"
#include "decoder_api.h" #include "DecoderAPI.hxx"
extern "C" { extern "C" {
#include "audio_check.h" #include "audio_check.h"

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "AudiofileDecoderPlugin.hxx" #include "AudiofileDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "audio_check.h" #include "audio_check.h"
#include "tag_handler.h" #include "tag_handler.h"

View File

@ -25,7 +25,7 @@
#include "config.h" #include "config.h"
#include "DsdLib.hxx" #include "DsdLib.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "util/bit_reverse.h" #include "util/bit_reverse.h"
#include "tag_handler.h" #include "tag_handler.h"

View File

@ -28,7 +28,7 @@
#include "config.h" #include "config.h"
#include "DsdiffDecoderPlugin.hxx" #include "DsdiffDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "audio_check.h" #include "audio_check.h"
#include "util/bit_reverse.h" #include "util/bit_reverse.h"
#include "tag_handler.h" #include "tag_handler.h"

View File

@ -29,7 +29,7 @@
#include "config.h" #include "config.h"
#include "DsfDecoderPlugin.hxx" #include "DsfDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "audio_check.h" #include "audio_check.h"
#include "util/bit_reverse.h" #include "util/bit_reverse.h"
#include "DsdLib.hxx" #include "DsdLib.hxx"

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "FaadDecoderPlugin.hxx" #include "FaadDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "DecoderBuffer.hxx" #include "DecoderBuffer.hxx"
#include "audio_check.h" #include "audio_check.h"
#include "tag_handler.h" #include "tag_handler.h"

View File

@ -22,7 +22,7 @@
#include "config.h" #include "config.h"
#include "FfmpegDecoderPlugin.hxx" #include "FfmpegDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "FfmpegMetaData.hxx" #include "FfmpegMetaData.hxx"
#include "tag_handler.h" #include "tag_handler.h"
#include "InputStream.hxx" #include "InputStream.hxx"

View File

@ -25,7 +25,7 @@
#define MPD_FLAC_COMMON_HXX #define MPD_FLAC_COMMON_HXX
#include "FlacInput.hxx" #include "FlacInput.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
extern "C" { extern "C" {
#include "pcm/pcm_buffer.h" #include "pcm/pcm_buffer.h"

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "FlacInput.hxx" #include "FlacInput.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "gcc.h" #include "gcc.h"
#include "InputStream.hxx" #include "InputStream.hxx"

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "FluidsynthDecoderPlugin.hxx" #include "FluidsynthDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "audio_check.h" #include "audio_check.h"
#include "conf.h" #include "conf.h"

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "GmeDecoderPlugin.hxx" #include "GmeDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "audio_check.h" #include "audio_check.h"
#include "tag_handler.h" #include "tag_handler.h"
#include "util/UriUtil.hxx" #include "util/UriUtil.hxx"

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "MadDecoderPlugin.hxx" #include "MadDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "conf.h" #include "conf.h"
extern "C" { extern "C" {

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "MikmodDecoderPlugin.hxx" #include "MikmodDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "mpd_error.h" #include "mpd_error.h"
#include "tag_handler.h" #include "tag_handler.h"

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "ModplugDecoderPlugin.hxx" #include "ModplugDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "tag_handler.h" #include "tag_handler.h"
#include <glib.h> #include <glib.h>

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "MpcdecDecoderPlugin.hxx" #include "MpcdecDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "audio_check.h" #include "audio_check.h"
#include "tag_handler.h" #include "tag_handler.h"

View File

@ -19,7 +19,7 @@
#include "config.h" /* must be first for large file support */ #include "config.h" /* must be first for large file support */
#include "Mpg123DecoderPlugin.hxx" #include "Mpg123DecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "audio_check.h" #include "audio_check.h"
#include "tag_handler.h" #include "tag_handler.h"

View File

@ -24,7 +24,7 @@
#ifndef MPD_OGG_CODEC_HXX #ifndef MPD_OGG_CODEC_HXX
#define MPD_OGG_CODEC_HXX #define MPD_OGG_CODEC_HXX
#include "decoder_api.h" #include "DecoderAPI.hxx"
enum ogg_codec { enum ogg_codec {
OGG_CODEC_UNKNOWN, OGG_CODEC_UNKNOWN,

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "OggUtil.hxx" #include "OggUtil.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
bool bool
OggFeed(ogg_sync_state &oy, struct decoder *decoder, OggFeed(ogg_sync_state &oy, struct decoder *decoder,

View File

@ -24,7 +24,7 @@
#include "OggUtil.hxx" #include "OggUtil.hxx"
#include "OggFind.hxx" #include "OggFind.hxx"
#include "OggSyncState.hxx" #include "OggSyncState.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "OggCodec.hxx" #include "OggCodec.hxx"
#include "audio_check.h" #include "audio_check.h"
#include "tag_handler.h" #include "tag_handler.h"

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "decoder/PcmDecoderPlugin.hxx" #include "decoder/PcmDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
extern "C" { extern "C" {
#include "util/byte_reverse.h" #include "util/byte_reverse.h"

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "SndfileDecoderPlugin.hxx" #include "SndfileDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "audio_check.h" #include "audio_check.h"
#include "tag_handler.h" #include "tag_handler.h"

View File

@ -20,7 +20,7 @@
#include "config.h" #include "config.h"
#include "VorbisDecoderPlugin.h" #include "VorbisDecoderPlugin.h"
#include "VorbisComments.hxx" #include "VorbisComments.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "InputStream.hxx" #include "InputStream.hxx"
#include "OggCodec.hxx" #include "OggCodec.hxx"
#include "util/UriUtil.hxx" #include "util/UriUtil.hxx"

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "WavpackDecoderPlugin.hxx" #include "WavpackDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "InputStream.hxx" #include "InputStream.hxx"
extern "C" { extern "C" {

View File

@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "WildmidiDecoderPlugin.hxx" #include "WildmidiDecoderPlugin.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "tag_handler.h" #include "tag_handler.h"
#include "glib_compat.h" #include "glib_compat.h"

View File

@ -18,7 +18,7 @@
*/ */
#include "config.h" #include "config.h"
#include "../decoder_api.h" #include "../DecoderAPI.hxx"
extern "C" { extern "C" {
#include "tag_handler.h" #include "tag_handler.h"

View File

@ -23,7 +23,7 @@
#include "Directory.hxx" #include "Directory.hxx"
#include "input_stream.h" #include "input_stream.h"
#include "conf.h" #include "conf.h"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "DecoderList.hxx" #include "DecoderList.hxx"
#include "InputInit.hxx" #include "InputInit.hxx"
#include "IOThread.hxx" #include "IOThread.hxx"

View File

@ -20,7 +20,7 @@
#include "config.h" #include "config.h"
#include "IOThread.hxx" #include "IOThread.hxx"
#include "DecoderList.hxx" #include "DecoderList.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "InputInit.hxx" #include "InputInit.hxx"
#include "InputStream.hxx" #include "InputStream.hxx"
#include "audio_format.h" #include "audio_format.h"

View File

@ -20,7 +20,7 @@
#include "config.h" #include "config.h"
#include "IOThread.hxx" #include "IOThread.hxx"
#include "DecoderList.hxx" #include "DecoderList.hxx"
#include "decoder_api.h" #include "DecoderAPI.hxx"
#include "InputInit.hxx" #include "InputInit.hxx"
#include "input_stream.h" #include "input_stream.h"
#include "audio_format.h" #include "audio_format.h"