diff options
Diffstat (limited to '')
-rw-r--r-- | src/InputStream.cxx (renamed from src/input_stream.c) | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/input_stream.c b/src/InputStream.cxx index e445dca6c..64f347555 100644 --- a/src/input_stream.c +++ b/src/InputStream.cxx @@ -19,9 +19,13 @@ #include "config.h" #include "input_stream.h" -#include "input_registry.h" +#include "InputRegistry.hxx" #include "input_plugin.h" + +extern "C" { #include "input/rewind_input_plugin.h" +#include "uri.h" +} #include <glib.h> #include <assert.h> @@ -115,6 +119,12 @@ input_stream_lock_wait_ready(struct input_stream *is) } bool +input_stream_cheap_seeking(const struct input_stream *is) +{ + return is->seekable && (is->uri == NULL || !uri_has_scheme(is->uri)); +} + +bool input_stream_seek(struct input_stream *is, goffset offset, int whence, GError **error_r) { @@ -165,7 +175,7 @@ input_stream_lock_tag(struct input_stream *is) assert(is->plugin != NULL); if (is->plugin->tag == NULL) - return false; + return nullptr; if (is->mutex == NULL) /* no locking */ |