aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-07-02 14:34:08 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-07-02 14:34:08 -0400
commit59dc591f66c20b6417aa2baa9503a154585386f9 (patch)
tree68ee71de2e4162550bb95f5e661ef413ddf1e046 /MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
parent9bab99d4d8659e69478722d72028e84b64575ab2 (diff)
update to jquery mobile 1.4.3
Diffstat (limited to 'MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs')
-rw-r--r--MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index 5bb610686..0af336c55 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -65,7 +65,6 @@ namespace MediaBrowser.Api.Playback.Hls
return GetDynamicSegment(request).Result;
}
- private static readonly SemaphoreSlim FfmpegStartLock = new SemaphoreSlim(1, 1);
private async Task<object> GetDynamicSegment(GetDynamicHlsVideoSegment request)
{
if ((request.StartTimeTicks ?? 0) > 0)
@@ -90,7 +89,7 @@ namespace MediaBrowser.Api.Playback.Hls
return await GetSegmentResult(playlistPath, segmentPath, index, cancellationToken).ConfigureAwait(false);
}
- await FfmpegStartLock.WaitAsync(cancellationTokenSource.Token).ConfigureAwait(false);
+ await ApiEntryPoint.Instance.TranscodingStartLock.WaitAsync(cancellationTokenSource.Token).ConfigureAwait(false);
try
{
if (File.Exists(segmentPath))
@@ -107,10 +106,11 @@ namespace MediaBrowser.Api.Playback.Hls
// If the playlist doesn't already exist, startup ffmpeg
try
{
+ // TODO: Delete files from other jobs, but not this one
+ await ApiEntryPoint.Instance.KillTranscodingJobs(state.Request.DeviceId, TranscodingJobType.Hls, FileDeleteMode.None, false).ConfigureAwait(false);
+
if (currentTranscodingIndex.HasValue)
{
- ApiEntryPoint.Instance.KillTranscodingJobs(state.Request.DeviceId, playlistPath, FileDeleteMode.None);
-
DeleteLastFile(playlistPath, 0);
}
@@ -131,7 +131,7 @@ namespace MediaBrowser.Api.Playback.Hls
}
finally
{
- FfmpegStartLock.Release();
+ ApiEntryPoint.Instance.TranscodingStartLock.Release();
}
Logger.Info("waiting for {0}", segmentPath);