0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
mpv/player
wm4 c12d897a3a player: allow seeking in cached parts of unseekable streams
Before this change and before the seekable stream cache became a thing,
we could possibly seek using the stream cache. But we couldn't know
whether the seek would succeed. We knew the available byte range, but
could in general not tell whether a demuxer would stay within the range
when trying to seek to a specific time position. We preferred to have
safe defaults, so seeking in streams that were detected as unseekable
were not honored. We allowed overriding this via --force-seekable=yes,
in which case it depended on your luck whether the seek would work, or
the player crapped its pants.

With the demuxer packet cache, we can tell exactly whether a seek will
work (at least if there's only 1 seek range). We can just let seeks go
through. Everything to allow this is already in place, and this commit
just moves around some minor things.

Note that the demux_seek() return value was not used before, because low
level (i.e. network level) seeks are usually asynchronous, and if they
fail, the state is pretty much undefined. We simply repurpose the return
value to signal whether cache seeking worked. If it didn't, we can just
resume playback normally, because demuxing continues unaffected, and no
decoder are reset.

This should be particularly helpful to people who for some reason stream
data into stdin via streamlink and such.
2017-12-24 21:45:12 +01:00
..
javascript js: implement mp.msg.trace() 2017-12-16 02:25:24 -08:00
lua osc: show demuxer cache buffered amount in bytes 2017-12-23 00:32:59 +01:00
audio.c audio: fix missing volume update on init and reinit 2017-12-01 21:18:06 +01:00
client.c client: Allow "C.UTF-8" as LC_NUMERIC locale 2017-11-30 21:06:37 +02:00
client.h client API: turn mpv_suspend() and mpv_resume() into stubs 2016-11-22 15:54:44 +01:00
command.c command: use IEC symbols for file size formatting 2017-12-24 21:27:41 +01:00
command.h build: add preliminary LGPL mode 2017-09-21 13:56:27 +02:00
configfiles.c player: change default section when loading encoding-profiles.conf 2017-07-12 13:11:14 +02:00
core.h player: use start timestamp for ab-looping if --ab-loop-a is absent 2017-12-03 22:23:24 -05:00
external_files.c player: make track language matching case insensitive 2017-12-23 15:14:13 -07:00
external_files.h external_files: change license to LGPL 2017-06-20 14:22:10 +02:00
javascript.c lua+js: implement utils.file_info() 2017-12-13 21:55:28 +02:00
lavfi.c lavfi: fix warnings with newer libavfilter versions 2017-10-27 18:09:08 +02:00
lavfi.h audio: introduce a new type to hold audio frames 2017-08-16 21:10:54 +02:00
loadfile.c player: make track language matching case insensitive 2017-12-23 15:14:13 -07:00
lua.c msg: reinterpret a bunch of message levels 2017-12-15 22:28:47 -08:00
main.c player: log if NDEBUG is defined 2017-11-04 17:48:30 +01:00
misc.c player/misc.c: allow both --length and --end to control play endpoint 2017-12-04 12:34:02 -05:00
osd.c player: show demuxer cache buffered amount in bytes in the status line 2017-12-23 00:32:59 +01:00
playloop.c player: allow seeking in cached parts of unseekable streams 2017-12-24 21:45:12 +01:00
screenshot.c screenshot: create directories from template 2017-11-02 17:07:35 +01:00
screenshot.h player: make screenshot commands honor the async flag 2017-04-01 20:47:23 +02:00
scripting.c msg: reinterpret a bunch of message levels 2017-12-15 22:28:47 -08:00
sub.c player: change license of most core files to LGPL 2017-06-23 16:55:02 +02:00
video.c msg: reinterpret a bunch of message levels 2017-12-15 22:28:47 -08:00