aboutsummaryrefslogtreecommitdiffstats
path: root/src/input
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/input/CdioParanoiaInputPlugin.cxx1
-rw-r--r--src/input/CurlInputPlugin.cxx3
-rw-r--r--src/input/DespotifyInputPlugin.cxx1
-rw-r--r--src/input/FfmpegInputPlugin.cxx1
-rw-r--r--src/input/FileInputPlugin.cxx1
-rw-r--r--src/input/MmsInputPlugin.cxx1
-rw-r--r--src/input/RewindInputPlugin.cxx1
-rw-r--r--src/input/SoupInputPlugin.cxx1
-rw-r--r--src/input_stream.h93
9 files changed, 30 insertions, 73 deletions
diff --git a/src/input/CdioParanoiaInputPlugin.cxx b/src/input/CdioParanoiaInputPlugin.cxx
index e8dabd88f..19001fbe9 100644
--- a/src/input/CdioParanoiaInputPlugin.cxx
+++ b/src/input/CdioParanoiaInputPlugin.cxx
@@ -24,6 +24,7 @@
#include "config.h"
#include "CdioParanoiaInputPlugin.hxx"
#include "InputInternal.hxx"
+#include "InputStream.hxx"
#include "InputPlugin.hxx"
#include "refcount.h"
diff --git a/src/input/CurlInputPlugin.cxx b/src/input/CurlInputPlugin.cxx
index ed70de072..a2ad20b15 100644
--- a/src/input/CurlInputPlugin.cxx
+++ b/src/input/CurlInputPlugin.cxx
@@ -19,12 +19,13 @@
#include "config.h"
#include "CurlInputPlugin.hxx"
+#include "InputInternal.hxx"
+#include "InputStream.hxx"
#include "InputPlugin.hxx"
#include "conf.h"
#include "tag.h"
#include "IcyMetaDataParser.hxx"
#include "event/MultiSocketMonitor.hxx"
-#include "InputInternal.hxx"
#include "event/Loop.hxx"
#include "IOThread.hxx"
#include "glib_compat.h"
diff --git a/src/input/DespotifyInputPlugin.cxx b/src/input/DespotifyInputPlugin.cxx
index af550cab5..e17bbb663 100644
--- a/src/input/DespotifyInputPlugin.cxx
+++ b/src/input/DespotifyInputPlugin.cxx
@@ -21,6 +21,7 @@
#include "DespotifyInputPlugin.hxx"
#include "DespotifyUtils.hxx"
#include "InputInternal.hxx"
+#include "InputStream.hxx"
#include "InputPlugin.hxx"
#include "tag.h"
diff --git a/src/input/FfmpegInputPlugin.cxx b/src/input/FfmpegInputPlugin.cxx
index 3e59bca9c..1893a01e7 100644
--- a/src/input/FfmpegInputPlugin.cxx
+++ b/src/input/FfmpegInputPlugin.cxx
@@ -23,6 +23,7 @@
#include "config.h"
#include "FfmpegInputPlugin.hxx"
#include "InputInternal.hxx"
+#include "InputStream.hxx"
#include "InputPlugin.hxx"
extern "C" {
diff --git a/src/input/FileInputPlugin.cxx b/src/input/FileInputPlugin.cxx
index 8d3ef7510..2d0bfcbbb 100644
--- a/src/input/FileInputPlugin.cxx
+++ b/src/input/FileInputPlugin.cxx
@@ -20,6 +20,7 @@
#include "config.h" /* must be first for large file support */
#include "FileInputPlugin.hxx"
#include "InputInternal.hxx"
+#include "InputStream.hxx"
#include "InputPlugin.hxx"
#include "fd_util.h"
#include "open.h"
diff --git a/src/input/MmsInputPlugin.cxx b/src/input/MmsInputPlugin.cxx
index 719aca29d..934521708 100644
--- a/src/input/MmsInputPlugin.cxx
+++ b/src/input/MmsInputPlugin.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "MmsInputPlugin.hxx"
#include "InputInternal.hxx"
+#include "InputStream.hxx"
#include "InputPlugin.hxx"
#include <glib.h>
diff --git a/src/input/RewindInputPlugin.cxx b/src/input/RewindInputPlugin.cxx
index 241a5fb5a..d77bb1207 100644
--- a/src/input/RewindInputPlugin.cxx
+++ b/src/input/RewindInputPlugin.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "RewindInputPlugin.hxx"
#include "InputInternal.hxx"
+#include "InputStream.hxx"
#include "InputPlugin.hxx"
#include "tag.h"
diff --git a/src/input/SoupInputPlugin.cxx b/src/input/SoupInputPlugin.cxx
index 44c26be5a..be4892629 100644
--- a/src/input/SoupInputPlugin.cxx
+++ b/src/input/SoupInputPlugin.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "SoupInputPlugin.hxx"
#include "InputPlugin.hxx"
+#include "InputStream.hxx"
#include "InputInternal.hxx"
#include "IOThread.hxx"
#include "event/Loop.hxx"
diff --git a/src/input_stream.h b/src/input_stream.h
index d5b1dae2e..0d32c0742 100644
--- a/src/input_stream.h
+++ b/src/input_stream.h
@@ -29,64 +29,7 @@
#include <stdbool.h>
#include <sys/types.h>
-struct input_stream {
- /**
- * the plugin which implements this input stream
- */
- const struct input_plugin *plugin;
-
- /**
- * The absolute URI which was used to open this stream. May
- * be NULL if this is unknown.
- */
- char *uri;
-
- /**
- * A mutex that protects the mutable attributes of this object
- * and its implementation. It must be locked before calling
- * any of the public methods.
- *
- * This object is allocated by the client, and the client is
- * responsible for freeing it.
- */
- GMutex *mutex;
-
- /**
- * A cond that gets signalled when the state of this object
- * changes from the I/O thread. The client of this object may
- * wait on it. Optional, may be NULL.
- *
- * This object is allocated by the client, and the client is
- * responsible for freeing it.
- */
- GCond *cond;
-
- /**
- * indicates whether the stream is ready for reading and
- * whether the other attributes in this struct are valid
- */
- bool ready;
-
- /**
- * if true, then the stream is fully seekable
- */
- bool seekable;
-
- /**
- * the size of the resource, or -1 if unknown
- */
- goffset size;
-
- /**
- * the current offset within the stream
- */
- goffset offset;
-
- /**
- * the MIME content type of the resource, or NULL if unknown
- */
- char *mime;
-};
+struct input_stream;
#ifdef __cplusplus
extern "C" {
@@ -119,20 +62,6 @@ gcc_nonnull(1)
void
input_stream_close(struct input_stream *is);
-gcc_nonnull(1)
-static inline void
-input_stream_lock(struct input_stream *is)
-{
- g_mutex_lock(is->mutex);
-}
-
-gcc_nonnull(1)
-static inline void
-input_stream_unlock(struct input_stream *is)
-{
- g_mutex_unlock(is->mutex);
-}
-
/**
* Check for errors that may have occurred in the I/O thread.
*
@@ -167,6 +96,26 @@ gcc_nonnull(1)
void
input_stream_lock_wait_ready(struct input_stream *is);
+gcc_nonnull_all gcc_pure
+const char *
+input_stream_get_mime_type(const struct input_stream *is);
+
+gcc_nonnull_all
+void
+input_stream_override_mime_type(struct input_stream *is, const char *mime);
+
+gcc_nonnull_all gcc_pure
+goffset
+input_stream_get_size(const struct input_stream *is);
+
+gcc_nonnull_all gcc_pure
+goffset
+input_stream_get_offset(const struct input_stream *is);
+
+gcc_nonnull_all gcc_pure
+bool
+input_stream_is_seekable(const struct input_stream *is);
+
/**
* Determines whether seeking is cheap. This is true for local files.
*/