summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-09-19 15:26:10 -0500
committerDudemanguy <random342@airmail.cc>2023-09-22 14:20:38 +0000
commita343666ab5121e7a3388be9aa2d8731d6d1f2f64 (patch)
treec80d00c50fbe4bf39141b9d8b4c5b16d2c9688ad /demux/demux.h
parenta703dc10c88f42cc4b4033721b03d2ac63800f39 (diff)
downloadmpv-a343666ab5121e7a3388be9aa2d8731d6d1f2f64.tar.bz2
mpv-a343666ab5121e7a3388be9aa2d8731d6d1f2f64.tar.xz
demux: make demux opts public
Several parts of the code need to access options here. There's no point in hiding it demux.c so just expose it in the demux.h header. This means pulling it out of demux_internal and putting it in the demuxer struct instead.
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/demux/demux.h b/demux/demux.h
index ed414f1816..08904f26cc 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -56,6 +56,33 @@ struct demux_reader_state {
struct demux_seek_range seek_ranges[MAX_SEEK_RANGES];
};
+extern const struct m_sub_options demux_conf;
+
+struct demux_opts {
+ int enable_cache;
+ bool disk_cache;
+ int64_t max_bytes;
+ int64_t max_bytes_bw;
+ bool donate_fw;
+ double min_secs;
+ double hyst_secs;
+ bool force_seekable;
+ double min_secs_cache;
+ bool access_references;
+ int seekable_cache;
+ int index_mode;
+ double mf_fps;
+ char *mf_type;
+ bool create_ccs;
+ char *record_file;
+ int video_back_preroll;
+ int audio_back_preroll;
+ int back_batch[STREAM_TYPE_COUNT];
+ double back_seek_size;
+ char *meta_cp;
+ bool force_retry_eof;
+};
+
#define SEEK_FACTOR (1 << 1) // argument is in range [0,1]
#define SEEK_FORWARD (1 << 2) // prefer later time if not exact
// (if unset, prefer earlier time)
@@ -205,6 +232,9 @@ typedef struct demuxer {
int stream_origin; // any STREAM_ORIGIN_* (set from source stream)
bool access_references; // allow opening other files/URLs
+ struct demux_opts *opts;
+ struct m_config_cache *opts_cache;
+
// Bitmask of DEMUX_EVENT_*
int events;