diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-05-25 13:32:22 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-05-25 13:32:22 -0400 |
| commit | 541d0c2ce174fc587a07ceb88df0d65656ef122a (patch) | |
| tree | 92927ffcbbf481e8dce48cfceb849c0dffead4ac /MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs | |
| parent | 5048914445c371ced2f060b9bcd1d43945bcf8c0 (diff) | |
3.0.5621.2
Diffstat (limited to 'MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs index 72d903a0a..d2b276ba5 100644 --- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs @@ -889,7 +889,7 @@ namespace MediaBrowser.Api.Playback.Hls var startNumberParam = isEncoding ? GetStartNumber(state).ToString(UsCulture) : "0"; var toTimeParam = string.Empty; - if (state.RunTimeTicks.HasValue && state.IsOutputVideo && ApiEntryPoint.Instance.GetEncodingOptions().EnableThrottling) + if (EnableSplitTranscoding(state)) { var startTime = state.Request.StartTimeTicks ?? 0; var durationSeconds = ApiEntryPoint.Instance.GetEncodingOptions().ThrottleThresholdInSeconds; @@ -945,12 +945,19 @@ namespace MediaBrowser.Api.Playback.Hls ).Trim(); } - protected override bool EnableThrottling + protected override bool EnableThrottling(StreamState state) { - get + return !EnableSplitTranscoding(state); + } + + private bool EnableSplitTranscoding(StreamState state) + { + if (string.Equals(Request.QueryString["EnableSplitTranscoding"], "false", StringComparison.OrdinalIgnoreCase)) { return false; } + + return state.RunTimeTicks.HasValue && state.IsOutputVideo; } protected override bool EnableStreamCopy |
