aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-14 22:01:55 +0200
committerMax Kellermann <max@duempel.org>2011-09-14 22:01:55 +0200
commitdd33317f459f7dad954cb9d155a93339fe6d163c (patch)
treec0313532f3da6c858552d538ab25bf02fd830cf6
parentc344d63fb38c5d5aec4ad11815762e7ba1a13a31 (diff)
downloadmpd-dd33317f459f7dad954cb9d155a93339fe6d163c.tar.gz
mpd-dd33317f459f7dad954cb9d155a93339fe6d163c.tar.xz
mpd-dd33317f459f7dad954cb9d155a93339fe6d163c.zip
input_stream: move input_stream_init(), _deinit() to _internal.c
-rw-r--r--Makefile.am1
-rw-r--r--src/archive/bz2_archive_plugin.c1
-rw-r--r--src/archive/iso9660_archive_plugin.c1
-rw-r--r--src/archive/zzip_archive_plugin.c1
-rw-r--r--src/input/cdio_paranoia_input_plugin.c1
-rw-r--r--src/input/curl_input_plugin.c1
-rw-r--r--src/input/despotify_input_plugin.c1
-rw-r--r--src/input/ffmpeg_input_plugin.c1
-rw-r--r--src/input/file_input_plugin.c1
-rw-r--r--src/input/mms_input_plugin.c1
-rw-r--r--src/input/rewind_input_plugin.c1
-rw-r--r--src/input/soup_input_plugin.c1
-rw-r--r--src/input_internal.c42
-rw-r--r--src/input_internal.h35
-rw-r--r--src/input_stream.h20
15 files changed, 89 insertions, 20 deletions
diff --git a/Makefile.am b/Makefile.am
index b37799e2d..60aab2c5e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -658,6 +658,7 @@ INPUT_SRC = \
src/input_init.c \
src/input_registry.c \
src/input_stream.c \
+ src/input_internal.c src/input_internal.h \
src/input/rewind_input_plugin.c \
src/input/file_input_plugin.c
diff --git a/src/archive/bz2_archive_plugin.c b/src/archive/bz2_archive_plugin.c
index 7a3202015..90418720e 100644
--- a/src/archive/bz2_archive_plugin.c
+++ b/src/archive/bz2_archive_plugin.c
@@ -24,6 +24,7 @@
#include "config.h"
#include "archive/bz2_archive_plugin.h"
#include "archive_api.h"
+#include "input_internal.h"
#include "input_plugin.h"
#include "refcount.h"
diff --git a/src/archive/iso9660_archive_plugin.c b/src/archive/iso9660_archive_plugin.c
index 78f184262..da55feca2 100644
--- a/src/archive/iso9660_archive_plugin.c
+++ b/src/archive/iso9660_archive_plugin.c
@@ -24,6 +24,7 @@
#include "config.h"
#include "archive/iso9660_archive_plugin.h"
#include "archive_api.h"
+#include "input_internal.h"
#include "input_plugin.h"
#include "refcount.h"
diff --git a/src/archive/zzip_archive_plugin.c b/src/archive/zzip_archive_plugin.c
index 62af6e221..829fb6dd1 100644
--- a/src/archive/zzip_archive_plugin.c
+++ b/src/archive/zzip_archive_plugin.c
@@ -25,6 +25,7 @@
#include "archive/zzip_archive_plugin.h"
#include "archive_api.h"
#include "archive_api.h"
+#include "input_internal.h"
#include "input_plugin.h"
#include "refcount.h"
diff --git a/src/input/cdio_paranoia_input_plugin.c b/src/input/cdio_paranoia_input_plugin.c
index 400c66ef3..da2ed1096 100644
--- a/src/input/cdio_paranoia_input_plugin.c
+++ b/src/input/cdio_paranoia_input_plugin.c
@@ -23,6 +23,7 @@
#include "config.h"
#include "input/cdio_paranoia_input_plugin.h"
+#include "input_internal.h"
#include "input_plugin.h"
#include "refcount.h"
#include "pcm_buffer.h"
diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c
index a591c9272..354a85454 100644
--- a/src/input/curl_input_plugin.c
+++ b/src/input/curl_input_plugin.c
@@ -19,6 +19,7 @@
#include "config.h"
#include "input/curl_input_plugin.h"
+#include "input_internal.h"
#include "input_plugin.h"
#include "conf.h"
#include "tag.h"
diff --git a/src/input/despotify_input_plugin.c b/src/input/despotify_input_plugin.c
index b63663c50..ef78fb1e0 100644
--- a/src/input/despotify_input_plugin.c
+++ b/src/input/despotify_input_plugin.c
@@ -19,6 +19,7 @@
#include "config.h"
#include "input/despotify_input_plugin.h"
+#include "input_internal.h"
#include "input_plugin.h"
#include "tag.h"
#include "despotify_utils.h"
diff --git a/src/input/ffmpeg_input_plugin.c b/src/input/ffmpeg_input_plugin.c
index 24d80a379..6caa7ea04 100644
--- a/src/input/ffmpeg_input_plugin.c
+++ b/src/input/ffmpeg_input_plugin.c
@@ -19,6 +19,7 @@
#include "config.h"
#include "input/ffmpeg_input_plugin.h"
+#include "input_internal.h"
#include "input_plugin.h"
#include <libavformat/avio.h>
diff --git a/src/input/file_input_plugin.c b/src/input/file_input_plugin.c
index 82ce59e5e..dec8f63a3 100644
--- a/src/input/file_input_plugin.c
+++ b/src/input/file_input_plugin.c
@@ -19,6 +19,7 @@
#include "config.h" /* must be first for large file support */
#include "input/file_input_plugin.h"
+#include "input_internal.h"
#include "input_plugin.h"
#include "fd_util.h"
#include "open.h"
diff --git a/src/input/mms_input_plugin.c b/src/input/mms_input_plugin.c
index d74196574..eb3e5d26c 100644
--- a/src/input/mms_input_plugin.c
+++ b/src/input/mms_input_plugin.c
@@ -19,6 +19,7 @@
#include "config.h"
#include "input/mms_input_plugin.h"
+#include "input_internal.h"
#include "input_plugin.h"
#include <glib.h>
diff --git a/src/input/rewind_input_plugin.c b/src/input/rewind_input_plugin.c
index 5d2ccb093..f4c4fa606 100644
--- a/src/input/rewind_input_plugin.c
+++ b/src/input/rewind_input_plugin.c
@@ -19,6 +19,7 @@
#include "config.h"
#include "input/rewind_input_plugin.h"
+#include "input_internal.h"
#include "input_plugin.h"
#include "tag.h"
diff --git a/src/input/soup_input_plugin.c b/src/input/soup_input_plugin.c
index b732f2e15..81fe4a441 100644
--- a/src/input/soup_input_plugin.c
+++ b/src/input/soup_input_plugin.c
@@ -19,6 +19,7 @@
#include "config.h"
#include "input/soup_input_plugin.h"
+#include "input_internal.h"
#include "input_plugin.h"
#include "io_thread.h"
#include "conf.h"
diff --git a/src/input_internal.c b/src/input_internal.c
new file mode 100644
index 000000000..2ef66b260
--- /dev/null
+++ b/src/input_internal.c
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "input_internal.h"
+#include "input_stream.h"
+
+void
+input_stream_init(struct input_stream *is, const struct input_plugin *plugin,
+ const char *uri)
+{
+ is->plugin = plugin;
+ is->uri = g_strdup(uri);
+ is->ready = false;
+ is->seekable = false;
+ is->size = -1;
+ is->offset = 0;
+ is->mime = NULL;
+}
+
+void
+input_stream_deinit(struct input_stream *is)
+{
+ g_free(is->uri);
+ g_free(is->mime);
+}
diff --git a/src/input_internal.h b/src/input_internal.h
new file mode 100644
index 000000000..260ea12a6
--- /dev/null
+++ b/src/input_internal.h
@@ -0,0 +1,35 @@
+/*
+ * 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_INPUT_INTERNAL_H
+#define MPD_INPUT_INTERNAL_H
+
+#include "check.h"
+
+struct input_stream;
+struct input_plugin;
+
+void
+input_stream_init(struct input_stream *is, const struct input_plugin *plugin,
+ const char *uri);
+
+void
+input_stream_deinit(struct input_stream *is);
+
+#endif
diff --git a/src/input_stream.h b/src/input_stream.h
index 514512592..f9cb8dbf8 100644
--- a/src/input_stream.h
+++ b/src/input_stream.h
@@ -71,26 +71,6 @@ struct input_stream {
char *mime;
};
-static inline void
-input_stream_init(struct input_stream *is, const struct input_plugin *plugin,
- const char *uri)
-{
- is->plugin = plugin;
- is->uri = g_strdup(uri);
- is->ready = false;
- is->seekable = false;
- is->size = -1;
- is->offset = 0;
- is->mime = NULL;
-}
-
-static inline void
-input_stream_deinit(struct input_stream *is)
-{
- g_free(is->uri);
- g_free(is->mime);
-}
-
/**
* Opens a new input stream. You may not access it until the "ready"
* flag is set.