mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Merge pull request #689 from stonerl/more-mpv-settings
MPV: speed up playback start
This commit is contained in:
@@ -266,8 +266,10 @@ extension Defaults.Keys {
|
||||
static let mpvEnableLogging = Key<Bool>("mpvEnableLogging", default: false)
|
||||
static let mpvCacheSecs = Key<String>("mpvCacheSecs", default: "120")
|
||||
static let mpvCachePauseWait = Key<String>("mpvCachePauseWait", default: "3")
|
||||
static let mpvCachePauseInital = Key<Bool>("cache-pause-initial", default: true)
|
||||
static let mpvCachePauseInital = Key<Bool>("mpvCachePauseInitial", default: false)
|
||||
static let mpvDeinterlace = Key<Bool>("mpvDeinterlace", default: false)
|
||||
static let mpvHWdec = Key<String>("hwdec", default: "auto-safe")
|
||||
static let mpvDemuxerLavfProbeInfo = Key<String>("mpvDemuxerLavfProbeInfo", default: "no")
|
||||
|
||||
static let showCacheStatus = Key<Bool>("showCacheStatus", default: false)
|
||||
static let feedCacheSize = Key<String>("feedCacheSize", default: "50")
|
||||
|
@@ -8,6 +8,8 @@ struct AdvancedSettings: View {
|
||||
@Default(.mpvCachePauseInital) private var mpvCachePauseInital
|
||||
@Default(.mpvDeinterlace) private var mpvDeinterlace
|
||||
@Default(.mpvEnableLogging) private var mpvEnableLogging
|
||||
@Default(.mpvHWdec) private var mpvHWdec
|
||||
@Default(.mpvDemuxerLavfProbeInfo) private var mpvDemuxerLavfProbeInfo
|
||||
@Default(.showCacheStatus) private var showCacheStatus
|
||||
@Default(.feedCacheSize) private var feedCacheSize
|
||||
@Default(.showPlayNowInBackendContextMenu) private var showPlayNowInBackendContextMenu
|
||||
@@ -73,12 +75,14 @@ struct AdvancedSettings: View {
|
||||
HStack {
|
||||
Text("cache-pause-initial")
|
||||
#if !os(tvOS)
|
||||
Link(destination: URL(string: "https://mpv.io/manual/stable/#options-cache-pause-initial")!) {
|
||||
Image(systemName: "link")
|
||||
.font(.footnote)
|
||||
}
|
||||
Image(systemName: "link")
|
||||
.accessibilityAddTraits([.isButton, .isLink])
|
||||
.font(.footnote)
|
||||
.onTapGesture {
|
||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-pause-initial")!)
|
||||
}
|
||||
#if os(macOS)
|
||||
.onHover(perform: onHover(_:))
|
||||
.onHover(perform: onHover(_:))
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@@ -87,13 +91,16 @@ struct AdvancedSettings: View {
|
||||
HStack {
|
||||
Text("cache-secs")
|
||||
#if !os(tvOS)
|
||||
Link(destination: URL(string: "https://mpv.io/manual/stable/#options-cache-secs")!) {
|
||||
Image(systemName: "link")
|
||||
.font(.footnote)
|
||||
#if os(macOS)
|
||||
.onHover(perform: onHover(_:))
|
||||
#endif
|
||||
}
|
||||
Image(systemName: "link")
|
||||
.accessibilityAddTraits([.isButton, .isLink])
|
||||
.font(.footnote)
|
||||
.onTapGesture {
|
||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-secs")!)
|
||||
}
|
||||
#if os(macOS)
|
||||
.onHover(perform: onHover(_:))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
TextField("cache-secs", text: $mpvCacheSecs)
|
||||
#if !os(macOS)
|
||||
@@ -106,10 +113,12 @@ struct AdvancedSettings: View {
|
||||
Group {
|
||||
Text("cache-pause-wait")
|
||||
#if !os(tvOS)
|
||||
Link(destination: URL(string: "https://mpv.io/manual/stable/#options-cache-pause-wait")!) {
|
||||
Image(systemName: "link")
|
||||
}
|
||||
.font(.footnote)
|
||||
Image(systemName: "link")
|
||||
.accessibilityAddTraits([.isButton, .isLink])
|
||||
.font(.footnote)
|
||||
.onTapGesture {
|
||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-pause-wait")!)
|
||||
}
|
||||
#if os(macOS)
|
||||
.onHover(perform: onHover(_:))
|
||||
#endif
|
||||
@@ -127,17 +136,69 @@ struct AdvancedSettings: View {
|
||||
HStack {
|
||||
Text("deinterlace")
|
||||
#if !os(tvOS)
|
||||
Link(destination: URL(string: "https://mpv.io/manual/stable/#options-deinterlace")!) {
|
||||
Image(systemName: "link")
|
||||
.font(.footnote)
|
||||
}
|
||||
Image(systemName: "link")
|
||||
.accessibilityAddTraits([.isButton, .isLink])
|
||||
.font(.footnote)
|
||||
.onTapGesture {
|
||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-deinterlace")!)
|
||||
}
|
||||
#if os(macOS)
|
||||
.onHover(perform: onHover(_:))
|
||||
.onHover(perform: onHover(_:))
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
HStack {
|
||||
Text("hwdec")
|
||||
|
||||
#if !os(tvOS)
|
||||
Image(systemName: "link")
|
||||
.accessibilityAddTraits([.isButton, .isLink])
|
||||
.font(.footnote)
|
||||
.onTapGesture {
|
||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-hwdec")!)
|
||||
}
|
||||
#if os(macOS)
|
||||
.onHover( /* perform: onHover(_:) */ )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Picker("", selection: $mpvHWdec) {
|
||||
ForEach(["auto", "auto-safe", "auto-copy"], id: \.self) {
|
||||
Text($0)
|
||||
}
|
||||
}
|
||||
.pickerStyle(MenuPickerStyle())
|
||||
}
|
||||
|
||||
if mpvEnableLogging {
|
||||
logButton
|
||||
}
|
||||
|
||||
HStack {
|
||||
Text("demuxer-lavf-probe-info")
|
||||
|
||||
#if !os(tvOS)
|
||||
Image(systemName: "link")
|
||||
.accessibilityAddTraits([.isButton, .isLink])
|
||||
.font(.footnote)
|
||||
.onTapGesture {
|
||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-demuxer-lavf-probe-info")!)
|
||||
}
|
||||
#if os(macOS)
|
||||
.onHover( /* perform: onHover(_:) */ )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Picker("", selection: $mpvDemuxerLavfProbeInfo) {
|
||||
ForEach(["yes", "no", "auto", "nostreams"], id: \.self) {
|
||||
Text($0)
|
||||
}
|
||||
}
|
||||
.pickerStyle(MenuPickerStyle())
|
||||
}
|
||||
|
||||
if mpvEnableLogging {
|
||||
logButton
|
||||
}
|
||||
|
Reference in New Issue
Block a user