mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 01:52:19 +00:00
demux: enable thread by default
And change the defaults for the other queue options to reduce latency.
This commit is contained in:
parent
b822faa6cf
commit
925c431ff7
@ -2046,7 +2046,9 @@ Demuxer
|
||||
|
||||
``--demuxer-thread=<yes|no>``
|
||||
Run the demuxer in a separate thread, and let it prefetch a certain amount
|
||||
of packets (default: no).
|
||||
of packets (default: yes). Having this enabled may lead to smoother
|
||||
playback, but on the other hand can add delays to seeking or track
|
||||
switching.
|
||||
|
||||
``--demuxer-readahead-secs=N``
|
||||
If ``--demuxer-thread`` is enabled, this controls how much the demuxer
|
||||
|
@ -35,11 +35,6 @@
|
||||
// and the demuxer pretends EOF was reached.
|
||||
#define MAX_PACKS 16000
|
||||
#define MAX_PACK_BYTES (400 * 1024 * 1024)
|
||||
// Minimum total size of packets queued - the demuxer thread will read more
|
||||
// packets, until either number or total size of the packets exceed the minimum.
|
||||
// This can actually be configured with command line options.
|
||||
#define MIN_PACKS 64
|
||||
#define MIN_PACK_BYTES (5 * 1024 * 1024)
|
||||
|
||||
enum demuxer_type {
|
||||
DEMUXER_TYPE_GENERIC = 0,
|
||||
|
@ -598,9 +598,9 @@ const struct MPOpts mp_default_opts = {
|
||||
},
|
||||
.stream_cache_pause = 50,
|
||||
.stream_cache_unpause = 100,
|
||||
.demuxer_thread = 0,
|
||||
.demuxer_min_packs = MIN_PACKS,
|
||||
.demuxer_min_bytes = MIN_PACK_BYTES,
|
||||
.demuxer_thread = 1,
|
||||
.demuxer_min_packs = 0,
|
||||
.demuxer_min_bytes = 0,
|
||||
.demuxer_min_secs = 0.2,
|
||||
.network_rtsp_transport = 2,
|
||||
.chapterrange = {-1, -1},
|
||||
|
Loading…
Reference in New Issue
Block a user