From 1cac7d1a659faffd1514a3269edf9fcae4d357c1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 20 Feb 2015 21:56:55 +0100 Subject: demux: add a demux_open_url() function Often stream and a demuxer are opened at the same time. Provide a function for this and replace most of its uses. --- demux/demux.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'demux/demux.h') diff --git a/demux/demux.h b/demux/demux.h index b76fb8fedc..b6aa4af517 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -172,6 +172,7 @@ struct demuxer_params { int matroska_wanted_segment; bool *matroska_was_valid; bool expect_subtitle; + bool disable_cache; // demux_open_url() only }; typedef struct demuxer { @@ -259,6 +260,12 @@ struct sh_stream *new_sh_stream(struct demuxer *demuxer, enum stream_type type); struct demuxer *demux_open(struct stream *stream, struct demuxer_params *params, struct mpv_global *global); +struct mp_cancel; +struct demuxer *demux_open_url(const char *url, + struct demuxer_params *params, + struct mp_cancel *cancel, + struct mpv_global *global); + void demux_start_thread(struct demuxer *demuxer); void demux_stop_thread(struct demuxer *demuxer); void demux_set_wakeup_cb(struct demuxer *demuxer, void (*cb)(void *ctx), void *ctx); -- cgit v1.2.3