input_stream: convert to C++ (internally)
This commit is contained in:
parent
06e0741a52
commit
d5516dee00
14
Makefile.am
14
Makefile.am
@ -78,9 +78,7 @@ mpd_headers = \
|
|||||||
src/gcc.h \
|
src/gcc.h \
|
||||||
src/decoder_list.h \
|
src/decoder_list.h \
|
||||||
src/decoder/pcm_decoder_plugin.h \
|
src/decoder/pcm_decoder_plugin.h \
|
||||||
src/input_init.h \
|
|
||||||
src/input_plugin.h \
|
src/input_plugin.h \
|
||||||
src/input_registry.h \
|
|
||||||
src/input_stream.h \
|
src/input_stream.h \
|
||||||
src/input/file_input_plugin.h \
|
src/input/file_input_plugin.h \
|
||||||
src/input/ffmpeg_input_plugin.h \
|
src/input/ffmpeg_input_plugin.h \
|
||||||
@ -708,9 +706,9 @@ endif
|
|||||||
#
|
#
|
||||||
|
|
||||||
libinput_a_SOURCES = \
|
libinput_a_SOURCES = \
|
||||||
src/input_init.c \
|
src/InputInit.cxx src/InputInit.hxx \
|
||||||
src/input_registry.c \
|
src/InputRegistry.cxx src/InputRegistry.hxx \
|
||||||
src/input_stream.c \
|
src/InputStream.cxx \
|
||||||
src/input_internal.c src/input_internal.h \
|
src/input_internal.c src/input_internal.h \
|
||||||
src/input/rewind_input_plugin.c \
|
src/input/rewind_input_plugin.c \
|
||||||
src/input/file_input_plugin.c
|
src/input/file_input_plugin.c
|
||||||
@ -1078,7 +1076,7 @@ test_dump_text_file_LDADD = \
|
|||||||
$(INPUT_LIBS) \
|
$(INPUT_LIBS) \
|
||||||
$(ARCHIVE_LIBS) \
|
$(ARCHIVE_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
test_dump_text_file_SOURCES = test/dump_text_file.c \
|
test_dump_text_file_SOURCES = test/dump_text_file.cxx \
|
||||||
test/stdbin.h \
|
test/stdbin.h \
|
||||||
src/io_thread.c src/io_thread.h \
|
src/io_thread.c src/io_thread.h \
|
||||||
src/conf.c src/tokenizer.c src/utils.c src/string_util.c\
|
src/conf.c src/tokenizer.c src/utils.c src/string_util.c\
|
||||||
@ -1122,7 +1120,7 @@ test_run_decoder_LDADD = \
|
|||||||
$(TAG_LIBS) \
|
$(TAG_LIBS) \
|
||||||
libutil.a \
|
libutil.a \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
test_run_decoder_SOURCES = test/run_decoder.c \
|
test_run_decoder_SOURCES = test/run_decoder.cxx \
|
||||||
test/stdbin.h \
|
test/stdbin.h \
|
||||||
src/io_thread.c src/io_thread.h \
|
src/io_thread.c src/io_thread.h \
|
||||||
src/conf.c src/tokenizer.c src/utils.c src/string_util.c \
|
src/conf.c src/tokenizer.c src/utils.c src/string_util.c \
|
||||||
@ -1145,7 +1143,7 @@ test_read_tags_LDADD = \
|
|||||||
$(TAG_LIBS) \
|
$(TAG_LIBS) \
|
||||||
libutil.a \
|
libutil.a \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
test_read_tags_SOURCES = test/read_tags.c \
|
test_read_tags_SOURCES = test/read_tags.cxx \
|
||||||
src/io_thread.c src/io_thread.h \
|
src/io_thread.c src/io_thread.h \
|
||||||
src/conf.c src/tokenizer.c src/utils.c src/string_util.c \
|
src/conf.c src/tokenizer.c src/utils.c src/string_util.c \
|
||||||
src/Tag.cxx src/TagNames.c src/TagPool.cxx src/tag_handler.c \
|
src/Tag.cxx src/TagNames.c src/TagPool.cxx src/tag_handler.c \
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "decoder_plugin.h"
|
#include "decoder_plugin.h"
|
||||||
#include "OutputList.hxx"
|
#include "OutputList.hxx"
|
||||||
#include "output_plugin.h"
|
#include "output_plugin.h"
|
||||||
#include "input_registry.h"
|
#include "InputRegistry.hxx"
|
||||||
#include "input_plugin.h"
|
#include "input_plugin.h"
|
||||||
#include "playlist_list.h"
|
#include "playlist_list.h"
|
||||||
#include "playlist_plugin.h"
|
#include "playlist_plugin.h"
|
||||||
|
@ -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
|
||||||
@ -18,9 +18,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "input_init.h"
|
#include "InputInit.hxx"
|
||||||
|
#include "InputRegistry.hxx"
|
||||||
#include "input_plugin.h"
|
#include "input_plugin.h"
|
||||||
#include "input_registry.h"
|
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
@ -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,13 +17,11 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_INPUT_INIT_H
|
#ifndef MPD_INPUT_INIT_HXX
|
||||||
#define MPD_INPUT_INIT_H
|
#define MPD_INPUT_INIT_HXX
|
||||||
|
|
||||||
#include "gerror.h"
|
#include "gerror.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes this library and all input_stream implementations.
|
* Initializes this library and all input_stream implementations.
|
||||||
*
|
*
|
@ -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
|
||||||
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "input_registry.h"
|
#include "InputRegistry.hxx"
|
||||||
#include "input/file_input_plugin.h"
|
#include "input/file_input_plugin.h"
|
||||||
|
|
||||||
#ifdef ENABLE_ARCHIVE
|
#ifdef ENABLE_ARCHIVE
|
@ -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,13 +17,11 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_INPUT_REGISTRY_H
|
#ifndef MPD_INPUT_REGISTRY_HXX
|
||||||
#define MPD_INPUT_REGISTRY_H
|
#define MPD_INPUT_REGISTRY_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NULL terminated list of all input plugins which were enabled at
|
* NULL terminated list of all input plugins which were enabled at
|
||||||
* compile time.
|
* compile time.
|
@ -19,10 +19,13 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "input_stream.h"
|
#include "input_stream.h"
|
||||||
#include "input_registry.h"
|
#include "InputRegistry.hxx"
|
||||||
#include "input_plugin.h"
|
#include "input_plugin.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
#include "input/rewind_input_plugin.h"
|
#include "input/rewind_input_plugin.h"
|
||||||
#include "uri.h"
|
#include "uri.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@ -172,7 +175,7 @@ input_stream_lock_tag(struct input_stream *is)
|
|||||||
assert(is->plugin != NULL);
|
assert(is->plugin != NULL);
|
||||||
|
|
||||||
if (is->plugin->tag == NULL)
|
if (is->plugin->tag == NULL)
|
||||||
return false;
|
return nullptr;
|
||||||
|
|
||||||
if (is->mutex == NULL)
|
if (is->mutex == NULL)
|
||||||
/* no locking */
|
/* no locking */
|
@ -44,6 +44,7 @@
|
|||||||
#include "SignalHandlers.hxx"
|
#include "SignalHandlers.hxx"
|
||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
#include "GlobalEvents.hxx"
|
#include "GlobalEvents.hxx"
|
||||||
|
#include "InputInit.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "daemon.h"
|
#include "daemon.h"
|
||||||
@ -53,7 +54,6 @@ extern "C" {
|
|||||||
#include "audio_config.h"
|
#include "audio_config.h"
|
||||||
#include "pcm_resample.h"
|
#include "pcm_resample.h"
|
||||||
#include "decoder_list.h"
|
#include "decoder_list.h"
|
||||||
#include "input_init.h"
|
|
||||||
#include "playlist_list.h"
|
#include "playlist_list.h"
|
||||||
#include "zeroconf.h"
|
#include "zeroconf.h"
|
||||||
}
|
}
|
||||||
|
@ -24,10 +24,10 @@
|
|||||||
#include "input_stream.h"
|
#include "input_stream.h"
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
#include "decoder_api.h"
|
#include "decoder_api.h"
|
||||||
|
#include "InputInit.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "io_thread.h"
|
#include "io_thread.h"
|
||||||
#include "input_init.h"
|
|
||||||
#include "decoder_list.h"
|
#include "decoder_list.h"
|
||||||
#include "playlist_list.h"
|
#include "playlist_list.h"
|
||||||
#include "playlist_plugin.h"
|
#include "playlist_plugin.h"
|
||||||
|
@ -18,16 +18,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "io_thread.h"
|
#include "InputInit.hxx"
|
||||||
#include "input_init.h"
|
|
||||||
#include "input_stream.h"
|
#include "input_stream.h"
|
||||||
#include "text_input_stream.h"
|
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
#include "stdbin.h"
|
#include "stdbin.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include "io_thread.h"
|
||||||
|
#include "text_input_stream.h"
|
||||||
|
|
||||||
#ifdef ENABLE_ARCHIVE
|
#ifdef ENABLE_ARCHIVE
|
||||||
#include "archive_list.h"
|
#include "archive_list.h"
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
@ -18,14 +18,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
extern "C" {
|
||||||
#include "io_thread.h"
|
#include "io_thread.h"
|
||||||
#include "decoder_list.h"
|
#include "decoder_list.h"
|
||||||
|
}
|
||||||
#include "decoder_api.h"
|
#include "decoder_api.h"
|
||||||
#include "input_init.h"
|
#include "InputInit.hxx"
|
||||||
#include "input_stream.h"
|
#include "input_stream.h"
|
||||||
#include "audio_format.h"
|
#include "audio_format.h"
|
||||||
|
extern "C" {
|
||||||
#include "tag_ape.h"
|
#include "tag_ape.h"
|
||||||
#include "tag_id3.h"
|
#include "tag_id3.h"
|
||||||
|
}
|
||||||
#include "tag_handler.h"
|
#include "tag_handler.h"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
@ -133,9 +137,9 @@ print_pair(const char *name, const char *value, G_GNUC_UNUSED void *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct tag_handler print_handler = {
|
static const struct tag_handler print_handler = {
|
||||||
.duration = print_duration,
|
print_duration,
|
||||||
.tag = print_tag,
|
print_tag,
|
||||||
.pair = print_pair,
|
print_pair,
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
@ -18,10 +18,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
extern "C" {
|
||||||
#include "io_thread.h"
|
#include "io_thread.h"
|
||||||
#include "decoder_list.h"
|
#include "decoder_list.h"
|
||||||
|
}
|
||||||
#include "decoder_api.h"
|
#include "decoder_api.h"
|
||||||
#include "input_init.h"
|
#include "InputInit.hxx"
|
||||||
#include "input_stream.h"
|
#include "input_stream.h"
|
||||||
#include "audio_format.h"
|
#include "audio_format.h"
|
||||||
#include "stdbin.h"
|
#include "stdbin.h"
|
@ -23,10 +23,10 @@
|
|||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
#include "input_stream.h"
|
#include "input_stream.h"
|
||||||
|
#include "InputInit.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "io_thread.h"
|
#include "io_thread.h"
|
||||||
#include "input_init.h"
|
|
||||||
|
|
||||||
#ifdef ENABLE_ARCHIVE
|
#ifdef ENABLE_ARCHIVE
|
||||||
#include "archive_list.h"
|
#include "archive_list.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user