From 8e50dc1b4dda5d15ddf0b1cc28b907356b956512 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 10 Nov 2017 16:43:09 +0100 Subject: demux: export demuxer cache sizes in bytes Plus sort of document them, together with the already existing undocumented fields. (This is mostly for debugging, so use is discouraged.) --- demux/demux.c | 2 ++ demux/demux.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'demux') diff --git a/demux/demux.c b/demux/demux.c index b66ed9abbb..342eb7fb56 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -2639,6 +2639,8 @@ static int cached_demux_control(struct demux_internal *in, int cmd, void *arg) .ts_reader = MP_NOPTS_VALUE, .ts_end = MP_NOPTS_VALUE, .ts_duration = -1, + .total_bytes = in->total_bytes, + .fw_bytes = in->fw_bytes, }; bool any_packets = false; for (int n = 0; n < in->num_streams; n++) { diff --git a/demux/demux.h b/demux/demux.h index 95e0f77c7c..9224ca3a98 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -51,6 +51,8 @@ struct demux_ctrl_reader_state { double ts_duration; double ts_reader; // approx. timerstamp of decoder position double ts_end; // approx. timestamp of end of buffered range + int64_t total_bytes; + int64_t fw_bytes; // Positions that can be seeked to without incurring the latency of a low // level seek. int num_seek_ranges; -- cgit v1.2.3