diff options
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 9c147379a..10ef902d9 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1059,9 +1059,10 @@ namespace MediaBrowser.Api.Playback } //state.RunTimeTicks = recording.RunTimeTicks; - state.SendInputOverStandardInput = recording.RecordingInfo.Status == RecordingStatus.InProgress; + state.ReadInputAtNativeFramerate = recording.RecordingInfo.Status == RecordingStatus.InProgress; state.AudioSync = 1000; state.DeInterlace = true; + state.InputFormat = "mpegts"; } else if (item is LiveTvChannel) { @@ -1087,8 +1088,10 @@ namespace MediaBrowser.Api.Playback } state.SendInputOverStandardInput = true; + state.ReadInputAtNativeFramerate = true; state.AudioSync = 1000; state.DeInterlace = true; + state.InputFormat = "mpegts"; } else { @@ -1140,6 +1143,33 @@ namespace MediaBrowser.Api.Playback return state; } + protected string GetInputModifier(StreamState state) + { + var inputModifier = string.Empty; + + if (!string.IsNullOrEmpty(state.InputFormat)) + { + inputModifier += " -f " + state.InputFormat; + } + + if (!string.IsNullOrEmpty(state.InputVideoCodec)) + { + inputModifier += " -vcodec " + state.InputVideoCodec; + } + + if (!string.IsNullOrEmpty(state.InputAudioCodec)) + { + inputModifier += " -acodec " + state.InputAudioCodec; + } + + if (state.ReadInputAtNativeFramerate) + { + inputModifier += " -re"; + } + + return inputModifier; + } + /// <summary> /// Infers the audio codec based on the url /// </summary> |
