summaryrefslogtreecommitdiffstats
path: root/stream/stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream.h')
-rw-r--r--stream/stream.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/stream/stream.h b/stream/stream.h
index 1009a2a7b0..6f389ceb04 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -57,12 +57,16 @@ enum streamtype {
#define STREAM_READ 0
#define STREAM_WRITE 1
+// flags for stream_open_ext (this includes STREAM_READ and STREAM_WRITE)
+#define STREAM_NO_FILTERS 2
+
// stream->flags
#define MP_STREAM_FAST_SKIPPING 1 // allow forward seeks by skipping
#define MP_STREAM_SEEK_BW 2
#define MP_STREAM_SEEK_FW 4
#define MP_STREAM_SEEK (MP_STREAM_SEEK_BW | MP_STREAM_SEEK_FW)
+#define STREAM_NO_MATCH -2
#define STREAM_UNSUPPORTED -1
#define STREAM_ERROR 0
#define STREAM_OK 1
@@ -116,6 +120,7 @@ typedef struct stream_info_st {
const void *priv_defaults;
const struct m_option *options;
const char **url_options;
+ bool stream_filter;
} stream_info_t;
typedef struct stream {
@@ -156,7 +161,8 @@ typedef struct stream {
FILE *capture_file;
char *capture_filename;
- struct stream *uncached_stream;
+ struct stream *uncached_stream; // underlying stream for cache wrapper
+ struct stream *source;
// Includes additional padding in case sizes get rounded up by sector size.
unsigned char buffer[];
@@ -234,6 +240,7 @@ struct bstr stream_read_complete(struct stream *s, void *talloc_ctx,
int stream_control(stream_t *s, int cmd, void *arg);
void stream_update_size(stream_t *s);
void free_stream(stream_t *s);
+struct stream *stream_create(const char *url, int flags, struct MPOpts *options);
struct stream *stream_open(const char *filename, struct MPOpts *options);
stream_t *open_output_stream(const char *filename, struct MPOpts *options);
stream_t *open_memory_stream(void *data, int len);