diff options
Diffstat (limited to 'MediaBrowser.Api')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 24 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/BaseHlsService.cs | 5 |
2 files changed, 7 insertions, 22 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 9609d8c29..5cae4c3f7 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -607,7 +607,7 @@ namespace MediaBrowser.Api.Playback } } - // TODO: Perhaps also use original_size=1920x800 + // TODO: Perhaps also use original_size=1920x800 ?? return string.Format("subtitles=filename='{0}'{1},setpts=PTS -{2}/TB", subtitlePath.Replace('\\', '/').Replace(":/", "\\:/"), charsetParam, @@ -817,7 +817,7 @@ namespace MediaBrowser.Api.Playback state.MediaPath = streamInfo.Path; state.InputProtocol = MediaProtocol.File; - await Task.Delay(1000, cancellationTokenSource.Token).ConfigureAwait(false); + await Task.Delay(1500, cancellationTokenSource.Token).ConfigureAwait(false); } else if (!string.IsNullOrEmpty(streamInfo.Url)) { @@ -838,7 +838,7 @@ namespace MediaBrowser.Api.Playback state.MediaPath = streamInfo.Path; state.InputProtocol = MediaProtocol.File; - await Task.Delay(1000, cancellationTokenSource.Token).ConfigureAwait(false); + await Task.Delay(1500, cancellationTokenSource.Token).ConfigureAwait(false); } else if (!string.IsNullOrEmpty(streamInfo.Url)) { @@ -943,19 +943,6 @@ namespace MediaBrowser.Api.Playback { await Task.Delay(100, cancellationTokenSource.Token).ConfigureAwait(false); } - - // Allow a small amount of time to buffer a little - // But not with HLS because it already has it's own wait - if (state.IsInputVideo && TranscodingJobType != TranscodingJobType.Hls) - { - await Task.Delay(500, cancellationTokenSource.Token).ConfigureAwait(false); - } - - // This is arbitrary, but add a little buffer time when internet streaming - if (state.InputProtocol != MediaProtocol.File) - { - await Task.Delay(2500, cancellationTokenSource.Token).ConfigureAwait(false); - } } private async void StartStreamingLog(StreamState state, Stream source, Stream target) @@ -1458,11 +1445,6 @@ namespace MediaBrowser.Api.Playback state.RunTimeTicks = recording.RunTimeTicks; - if (recording.RecordingInfo.Status == RecordingStatus.InProgress) - { - await Task.Delay(1000, cancellationToken).ConfigureAwait(false); - } - state.OutputAudioSync = "1000"; state.InputVideoSync = "-1"; state.InputAudioSync = "1"; diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs index 8eff75533..317c4455a 100644 --- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs @@ -104,7 +104,10 @@ namespace MediaBrowser.Api.Playback.Hls } else { - await ApiEntryPoint.Instance.KillTranscodingJobs(state.Request.DeviceId, TranscodingJobType.Hls, p => true, false).ConfigureAwait(false); + if (!string.IsNullOrWhiteSpace(state.Request.DeviceId)) + { + await ApiEntryPoint.Instance.KillTranscodingJobs(state.Request.DeviceId, TranscodingJobType.Hls, p => true, false).ConfigureAwait(false); + } // If the playlist doesn't already exist, startup ffmpeg try |
