Add MPV cache advanced settings

This commit is contained in:
Arkadiusz Fal
2022-07-02 12:49:57 +02:00
parent 394980fe73
commit 41fb021b64
3 changed files with 44 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
import CoreMedia
import Defaults
import Foundation
import Logging
#if !os(macOS)
@@ -46,8 +47,8 @@ final class MPVClient: ObservableObject {
#endif
checkError(mpv_set_option_string(mpv, "cache-pause-initial", "yes"))
checkError(mpv_set_option_string(mpv, "cache-secs", "20"))
checkError(mpv_set_option_string(mpv, "cache-pause-wait", "2"))
checkError(mpv_set_option_string(mpv, "cache-secs", Defaults[.mpvCacheSecs]))
checkError(mpv_set_option_string(mpv, "cache-pause-wait", Defaults[.mpvCachePauseWait]))
checkError(mpv_set_option_string(mpv, "keep-open", "yes"))
checkError(mpv_set_option_string(mpv, "hwdec", machine == "x86_64" ? "no" : "auto-safe"))
checkError(mpv_set_option_string(mpv, "vo", "libmpv"))