summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h41
1 files changed, 38 insertions, 3 deletions
diff --git a/demux/demux.h b/demux/demux.h
index ed414f1816..401f1d146c 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -36,12 +36,17 @@ struct demux_seek_range {
double start, end;
};
+struct demux_ctrl_ts_info {
+ double duration;
+ double reader; // approx. timestamp of decoder position
+ double end; // approx. timestamp of end of buffered range
+};
+
struct demux_reader_state {
bool eof, underrun, idle;
bool bof_cached, eof_cached;
- double ts_duration;
- double ts_reader; // approx. timerstamp of decoder position
- double ts_end; // approx. timestamp of end of buffered range
+ struct demux_ctrl_ts_info ts_info;
+ struct demux_ctrl_ts_info ts_per_stream[STREAM_TYPE_COUNT];
int64_t total_bytes;
int64_t fw_bytes;
int64_t file_cache_bytes;
@@ -56,6 +61,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 +237,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;