aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Playback/Hls/BaseHlsService.cs')
-rw-r--r--MediaBrowser.Api/Playback/Hls/BaseHlsService.cs29
1 files changed, 2 insertions, 27 deletions
diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
index 5d377366a..036397b4f 100644
--- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs
@@ -90,12 +90,12 @@ namespace MediaBrowser.Api.Playback.Hls
TranscodingJob job = null;
var playlist = state.OutputFilePath;
- if (!File.Exists(playlist))
+ if (!FileSystem.FileExists(playlist))
{
await ApiEntryPoint.Instance.TranscodingStartLock.WaitAsync(cancellationTokenSource.Token).ConfigureAwait(false);
try
{
- if (!File.Exists(playlist))
+ if (!FileSystem.FileExists(playlist))
{
// If the playlist doesn't already exist, startup ffmpeg
try
@@ -312,31 +312,6 @@ namespace MediaBrowser.Api.Playback.Hls
return 0;
}
- protected override bool CanStreamCopyVideo(VideoStreamRequest request, MediaStream videoStream)
- {
- if (videoStream.KeyFrames == null || videoStream.KeyFrames.Count == 0)
- {
- Logger.Debug("Cannot stream copy video due to missing keyframe info");
- return false;
- }
-
- var previousSegment = 0;
- foreach (var frame in videoStream.KeyFrames)
- {
- var length = frame - previousSegment;
-
- // Don't allow really long segments because this could result in long download times
- if (length > 10000)
- {
- Logger.Debug("Cannot stream copy video due to long segment length of {0}ms", length);
- return false;
- }
- previousSegment = frame;
- }
-
- return base.CanStreamCopyVideo(request, videoStream);
- }
-
protected override bool CanStreamCopyAudio(VideoStreamRequest request, MediaStream audioStream, List<string> supportedAudioCodecs)
{
return false;