From 6ef57587133f3fbfee235bbd588c27e506fe92d8 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 21 Mar 2014 00:52:28 -0400 Subject: [PATCH] add support for input audio/video sync --- MediaBrowser.Api/Playback/BaseStreamingService.cs | 10 ++++++++++ MediaBrowser.Api/Playback/StreamState.cs | 3 +++ 2 files changed, 13 insertions(+) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 3993866cf5..624c3eb0e6 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1503,6 +1503,16 @@ namespace MediaBrowser.Api.Playback inputModifier += " -acodec " + state.InputAudioCodec; } + if (!string.IsNullOrEmpty(state.InputAudioSync)) + { + inputModifier += " -async " + state.InputAudioSync; + } + + if (!string.IsNullOrEmpty(state.InputVideoSync)) + { + inputModifier += " -vsync " + state.InputVideoSync; + } + if (state.ReadInputAtNativeFramerate) { inputModifier += " -re"; diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs index 961ac0a2a2..88daf9f623 100644 --- a/MediaBrowser.Api/Playback/StreamState.cs +++ b/MediaBrowser.Api/Playback/StreamState.cs @@ -64,6 +64,9 @@ namespace MediaBrowser.Api.Playback public string AudioSync = "1"; public string VideoSync = "vfr"; + public string InputAudioSync { get; set; } + public string InputVideoSync { get; set; } + public bool DeInterlace { get; set; } public bool ReadInputAtNativeFramerate { get; set; }