aboutsummaryrefslogtreecommitdiffhomepage
path: root/demux/demux.h
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2017-10-21 19:26:33 +0200
committerGravatar wm4 <wm4@nowhere>2017-10-21 19:26:33 +0200
commit719a435d3636c7b848b49f06e6a2ea55e7ee656a (patch)
tree43a62dbeda4ee45ed53e67ebcb2cfe180f8fd8e2 /demux/demux.h
parent83c9f169c411a60bc6e025ce4feb46742690dad3 (diff)
demux: add a back buffer and the ability to seek into it
This improves upon the previous commit, and partially rewrites it (and other code). It does: - disable the seeking within cache by default, and add an option to control it - mess with the buffer estimation reporting code, which will most likely lead to funny regressions even if the new features are not enabled - add a back buffer to the packet cache - enhance the seek code so you can seek into the back buffer - unnecessarily change a bunch of other stuff for no reason - fuck up everything and vomit ponies and rainbows This should actually be pretty usable. One thing we should add are some properties to report the proper buffer state. Then the OSC could show a nice buffer range. Also configuration of the buffers could be made simpler. Once this has been tested enough, it can be enabled by default, and might replace the stream cache's byte ringbuffer. In addition it may or may not be possible to keep other buffer ranges when seeking outside of the current range, but that would be much more complex.
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/demux/demux.h b/demux/demux.h
index 4fac2007a4..24a08ecff4 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -42,8 +42,14 @@ enum demux_ctrl {
struct demux_ctrl_reader_state {
bool eof, underrun, idle;
- double ts_range[2]; // start, end
double ts_duration;
+ double ts_reader; // approx. timerstamp of decoder position
+ double ts_start; // approx. timestamp for the earliest packet buffered
+ double ts_min; // timestamp of the earliest packet in backward cache
+ // that can be seeked to (i.e. all streams have such
+ // a packet for which SEEK_BACKWARD can be executed)
+ double ts_max; // timestamp of latest packet in forward cache that can be
+ // seeked to
};
struct demux_ctrl_stream_ctrl {