summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-01-05 08:49:31 +0100
committerwm4 <wm4@nowhere>2019-09-19 20:37:04 +0200
commitebf183eeec388d87a19415ee01970b21b6ef6832 (patch)
tree7b3d5ced6d0d590c46679eafa6c4b42dbb16ee27 /demux/demux.h
parent27a09b42ed04ecd73215ab73ac146b287c3fd9f6 (diff)
downloadmpv-ebf183eeec388d87a19415ee01970b21b6ef6832.tar.bz2
mpv-ebf183eeec388d87a19415ee01970b21b6ef6832.tar.xz
demux: slightly cleanup network speed reporting
It was an ugly hack, and the next commit will make it even uglier. Slightly reduce the ugliness to prevent death of too many brain cells, though it's still an ugly hack. The cleanup is really minor, but I guess the following commit would be much worse otherwise. In particular, this commit checks accesses (instead of having a public field with evil access rules), which should avoid misunderstandings and incorrect use. Strictly speaking, the added field is redundant, but the next commit complicates it a bit.
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/demux/demux.h b/demux/demux.h
index 156021007d..09f6895544 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -222,9 +222,6 @@ typedef struct demuxer {
// Triggered when ending demuxing forcefully. Usually bound to the stream too.
struct mp_cancel *cancel;
- // Demuxer thread only.
- uint64_t total_unbuffered_read_bytes;
-
// Since the demuxer can run in its own thread, and the stream is not
// thread-safe, only the demuxer is allowed to access the stream directly.
// Also note that the stream can get replaced if fully_read is set.
@@ -294,6 +291,8 @@ void demux_update(demuxer_t *demuxer);
void demux_disable_cache(demuxer_t *demuxer);
bool demux_is_network_cached(demuxer_t *demuxer);
+void demux_report_unbuffered_read_bytes(struct demuxer *demuxer, int64_t new);
+
struct sh_stream *demuxer_stream_by_demuxer_id(struct demuxer *d,
enum stream_type t, int id);