mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 22:32:01 +00:00
Add tvOS A/V sync diagnostics on its own settings page
Surface audio-delay (±10/±100 ms) and video-sync-mode controls behind an "A/V Sync" navigation row in Advanced settings rather than inline, keeping the Advanced page uncluttered. Audio delay applies live to the running MPV instance; sync mode takes effect on next playback.
This commit is contained in:
@@ -902,6 +902,12 @@ final class MPVBackend: PlayerBackend {
|
||||
mpvClient?.updateSubtitleSettings()
|
||||
}
|
||||
|
||||
/// Push the current tvOS audio-delay setting into the running MPV instance.
|
||||
/// Caller passes milliseconds; MPVClient converts to seconds.
|
||||
func updateAudioDelay(milliseconds: Double) {
|
||||
mpvClient?.updateAudioDelay(milliseconds: milliseconds)
|
||||
}
|
||||
|
||||
/// Get the actual video track dimensions from MPV.
|
||||
/// Returns (width, height) or nil if not available.
|
||||
func getVideoSize() -> (width: Int, height: Int)? {
|
||||
@@ -963,6 +969,14 @@ final class MPVBackend: PlayerBackend {
|
||||
stats.audioSpeedCorrection = props.audioSpeedCorrection
|
||||
stats.framedrop = props.framedrop
|
||||
stats.displayLinkFps = renderView?.displayLinkTargetFPS
|
||||
stats.audioDelay = props.audioDelay
|
||||
stats.currentVo = props.currentVo
|
||||
stats.currentAo = props.currentAo
|
||||
stats.audioDevice = props.audioDevice
|
||||
stats.displayWidth = props.displayWidth
|
||||
stats.displayHeight = props.displayHeight
|
||||
stats.displayNames = props.displayNames
|
||||
stats.decoderFrameDropCount = props.decoderFrameDropCount
|
||||
#endif
|
||||
|
||||
return stats
|
||||
|
||||
Reference in New Issue
Block a user