From 960b9a966450f4870a14c81170e3b625f9c13a8a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 7 Jan 2013 23:23:58 +0100 Subject: input_stream: add method _cheap_seeking() Move code from the Vorbis decoder plugin. --- src/input_stream.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/input_stream.c') diff --git a/src/input_stream.c b/src/input_stream.c index e445dca6c..c82788f39 100644 --- a/src/input_stream.c +++ b/src/input_stream.c @@ -22,6 +22,7 @@ #include "input_registry.h" #include "input_plugin.h" #include "input/rewind_input_plugin.h" +#include "uri.h" #include #include @@ -114,6 +115,12 @@ input_stream_lock_wait_ready(struct input_stream *is) g_mutex_unlock(is->mutex); } +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) -- cgit v1.2.3