1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 23:32:26 +00:00
mpv/DOCS
wm4 1301a90761 demux: add a demuxer thread
This adds a thread to the demuxer which reads packets asynchronously.
It will do so until a configurable minimum packet queue size is
reached. (See options.rst additions.)

For now, the thread is disabled by default. There are some corner cases
that have to be fixed, such as fixing cache behavior with webradios.

Note that most interaction with the demuxer is still blocking, so if
e.g. network dies, the player will still freeze. But this change will
make it possible to remove most causes for freezing.

Most of the new code in demux.c actually consists of weird caches to
compensate for thread-safety issues (with the previously single-threaded
design), or to avoid blocking by having to wait on the demuxer thread.

Most of the changes in the player are due to the fact that we must not
access the source stream directly. the demuxer thread already accesses
it, and the stream stuff is not thread-safe.

For timeline stuff (like ordered chapters), we enable the thread for the
current segment only. We also clear its packet queue on seek, so that
the remaining (unconsumed) readahead buffer doesn't waste memory.

Keep in mind that insane subtitles (such as ASS typesetting muxed into
mkv files) will practically disable the readahead, because the total
queue size is considered when checking whether the minimum queue size
was reached.
2014-07-16 23:25:56 +02:00
..
client_api_examples DOCS/client_api_examples: add a Qt example 2014-07-04 02:24:49 +02:00
lua_examples options: rename msg-related options 2014-05-04 02:46:11 +02:00
man demux: add a demuxer thread 2014-07-16 23:25:56 +02:00
client-api-changes.rst Remove stream_pts stuff 2014-07-06 19:05:59 +02:00
contribute.md DOCS/contribute.md: move instructions for sending patches to the top 2014-06-17 23:18:13 +02:00
crosscompile-mingw.md DOCS: fix an external link 2014-03-09 15:02:28 +01:00
edl-mpv.rst edl: extend with chapter timestamps 2014-02-19 00:06:00 +01:00
encoding.rst manpage: update config file locations 2014-06-28 15:55:09 +02:00
release-policy.md DOCS/release-policy: mention the release version in the RELEASE_NOTES template 2014-07-13 15:03:47 +02:00
tech-overview.txt DOCS/tech-overview: minor updates 2014-07-09 02:14:23 +02:00
waf-buildsystem.rst DOCS/waf-buildsystem: add link to the Waf book 2014-02-06 13:45:35 +01:00