Commit 22f0a154 authored by Max Kellermann's avatar Max Kellermann

buffer, pipe: convert to C++

parent de0ab43b
...@@ -110,9 +110,6 @@ mpd_headers = \ ...@@ -110,9 +110,6 @@ mpd_headers = \
src/daemon.h \ src/daemon.h \
src/AudioCompress/config.h \ src/AudioCompress/config.h \
src/AudioCompress/compress.h \ src/AudioCompress/compress.h \
src/buffer.h \
src/pipe.h \
src/chunk.h \
src/path.h \ src/path.h \
src/open.h \ src/open.h \
src/output/httpd_client.h \ src/output/httpd_client.h \
...@@ -260,9 +257,9 @@ src_mpd_SOURCES = \ ...@@ -260,9 +257,9 @@ src_mpd_SOURCES = \
src/event_pipe.c \ src/event_pipe.c \
src/daemon.c \ src/daemon.c \
src/AudioCompress/compress.c \ src/AudioCompress/compress.c \
src/buffer.c \ src/MusicBuffer.cxx src/MusicBuffer.hxx \
src/pipe.c \ src/MusicPipe.cxx src/MusicPipe.hxx \
src/chunk.c \ src/MusicChunk.cxx src/MusicChunk.hxx \
src/path.c \ src/path.c \
src/Mapper.cxx src/Mapper.hxx \ src/Mapper.cxx src/Mapper.hxx \
src/page.c \ src/page.c \
......
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
extern "C" { extern "C" {
#include "decoder_api.h" #include "decoder_api.h"
#include "audio_config.h" #include "audio_config.h"
#include "buffer.h"
#include "pipe.h"
#include "chunk.h"
#include "replay_gain_config.h" #include "replay_gain_config.h"
} }
#include "MusicChunk.hxx"
#include "MusicBuffer.hxx"
#include "MusicPipe.hxx"
#include "DecoderControl.hxx" #include "DecoderControl.hxx"
#include "DecoderInternal.hxx" #include "DecoderInternal.hxx"
#include "song.h" #include "song.h"
......
...@@ -19,12 +19,9 @@ ...@@ -19,12 +19,9 @@
#include "config.h" #include "config.h"
#include "DecoderControl.hxx" #include "DecoderControl.hxx"
#include "MusicPipe.hxx"
#include "song.h" #include "song.h"
extern "C" {
#include "pipe.h"
}
#include <assert.h> #include <assert.h>
#undef G_LOG_DOMAIN #undef G_LOG_DOMAIN
......
...@@ -20,14 +20,11 @@ ...@@ -20,14 +20,11 @@
#include "config.h" #include "config.h"
#include "DecoderInternal.hxx" #include "DecoderInternal.hxx"
#include "DecoderControl.hxx" #include "DecoderControl.hxx"
#include "MusicPipe.hxx"
extern "C" { #include "MusicBuffer.hxx"
#include "pipe.h" #include "MusicChunk.hxx"
#include "buffer.h"
}
#include "input_stream.h" #include "input_stream.h"
#include "chunk.h"
#include <assert.h> #include <assert.h>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "CommandLine.hxx" #include "CommandLine.hxx"
#include "PlaylistFile.hxx" #include "PlaylistFile.hxx"
#include "UpdateGlue.hxx" #include "UpdateGlue.hxx"
#include "chunk.h" #include "MusicChunk.hxx"
#include "StateFile.hxx" #include "StateFile.hxx"
#include "PlayerThread.hxx" #include "PlayerThread.hxx"
#include "Mapper.hxx" #include "Mapper.hxx"
......
/* /*
* 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
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
*/ */
#include "config.h" #include "config.h"
#include "buffer.h" #include "MusicBuffer.hxx"
#include "chunk.h" #include "MusicChunk.hxx"
#include "poison.h" #include "poison.h"
#include <glib.h> #include <glib.h>
......
/* /*
* 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 @@ ...@@ -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_MUSIC_BUFFER_H #ifndef MPD_MUSIC_BUFFER_HXX
#define MPD_MUSIC_BUFFER_H #define MPD_MUSIC_BUFFER_HXX
/** /**
* An allocator for #music_chunk objects. * An allocator for #music_chunk objects.
......
/* /*
* 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
...@@ -18,9 +18,12 @@ ...@@ -18,9 +18,12 @@
*/ */
#include "config.h" #include "config.h"
#include "chunk.h" #include "MusicChunk.hxx"
#include "audio_format.h" #include "audio_format.h"
extern "C" {
#include "tag.h" #include "tag.h"
}
#include <assert.h> #include <assert.h>
......
/* /*
* 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 @@ ...@@ -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_CHUNK_H #ifndef MPD_MUSIC_CHUNK_HXX
#define MPD_CHUNK_H #define MPD_MUSIC_CHUNK_HXX
#include "replay_gain_info.h" #include "replay_gain_info.h"
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include "audio_format.h" #include "audio_format.h"
#endif #endif
#include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stddef.h> #include <stddef.h>
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
*/ */
#include "config.h" #include "config.h"
#include "pipe.h" #include "MusicPipe.hxx"
#include "buffer.h" #include "MusicBuffer.hxx"
#include "chunk.h" #include "MusicChunk.hxx"
#include <glib.h> #include <glib.h>
...@@ -137,7 +137,7 @@ music_pipe_shift(struct music_pipe *mp) ...@@ -137,7 +137,7 @@ music_pipe_shift(struct music_pipe *mp)
#ifndef NDEBUG #ifndef NDEBUG
/* poison the "next" reference */ /* poison the "next" reference */
chunk->next = (void*)0x01010101; chunk->next = (struct music_chunk *)(void *)0x01010101;
if (mp->size == 0) if (mp->size == 0)
audio_format_clear(&mp->audio_format); audio_format_clear(&mp->audio_format);
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include "gcc.h" #include "gcc.h"
#include <stdbool.h>
#ifndef NDEBUG #ifndef NDEBUG
struct audio_format; struct audio_format;
#endif #endif
......
...@@ -26,21 +26,17 @@ extern "C" { ...@@ -26,21 +26,17 @@ extern "C" {
#include "OutputControl.hxx" #include "OutputControl.hxx"
#include "OutputError.hxx" #include "OutputError.hxx"
#include "MusicBuffer.hxx"
#include "MusicPipe.hxx"
#include "MusicChunk.hxx"
#include "mpd_error.h" #include "mpd_error.h"
extern "C" { extern "C" {
#include "player_control.h" #include "player_control.h"
#include "conf.h" #include "conf.h"
#include "chunk.h"
#include "pipe.h"
#include "buffer.h"
#include "notify.h" #include "notify.h"
} }
#ifndef NDEBUG
#include "chunk.h"
#endif
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
extern "C" { extern "C" {
#include "output_api.h" #include "output_api.h"
#include "output_internal.h" #include "output_internal.h"
#include "chunk.h"
#include "pipe.h"
#include "player_control.h" #include "player_control.h"
#include "pcm_mix.h" #include "pcm_mix.h"
#include "filter_plugin.h" #include "filter_plugin.h"
...@@ -33,6 +31,9 @@ extern "C" { ...@@ -33,6 +31,9 @@ extern "C" {
#include "notify.h" #include "notify.h"
} }
#include "MusicPipe.hxx"
#include "MusicChunk.hxx"
#include "mpd_error.h" #include "mpd_error.h"
#include "gcc.h" #include "gcc.h"
......
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
#include "PlayerThread.hxx" #include "PlayerThread.hxx"
#include "DecoderThread.hxx" #include "DecoderThread.hxx"
#include "DecoderControl.hxx" #include "DecoderControl.hxx"
#include "MusicPipe.hxx"
#include "MusicBuffer.hxx"
#include "MusicChunk.hxx"
#include "song.h" #include "song.h"
#include "Main.hxx" #include "Main.hxx"
#include "mpd_error.h" #include "mpd_error.h"
...@@ -31,10 +34,7 @@ extern "C" { ...@@ -31,10 +34,7 @@ extern "C" {
#include "event_pipe.h" #include "event_pipe.h"
#include "crossfade.h" #include "crossfade.h"
#include "tag.h" #include "tag.h"
#include "pipe.h"
#include "chunk.h"
#include "idle.h" #include "idle.h"
#include "buffer.h"
} }
#include <glib.h> #include <glib.h>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "config.h" #include "config.h"
#include "crossfade.h" #include "crossfade.h"
#include "chunk.h" #include "MusicChunk.hxx"
#include "audio_format.h" #include "audio_format.h"
#include "tag.h" #include "tag.h"
......
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