aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/StreamState.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-28 13:47:05 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-28 13:47:05 -0500
commit3d22c486700f63034f6735bc6cf3efb2ad18af22 (patch)
tree9e4c9c4641cffffc018ff3d1ccc47f5714e04fc0 /MediaBrowser.Api/Playback/StreamState.cs
parent291727f624b0ec4f0476d26f915a93c3410104c7 (diff)
added IProcessManager
Diffstat (limited to 'MediaBrowser.Api/Playback/StreamState.cs')
-rw-r--r--MediaBrowser.Api/Playback/StreamState.cs24
1 files changed, 21 insertions, 3 deletions
diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs
index 40e765f1a..588d3b75c 100644
--- a/MediaBrowser.Api/Playback/StreamState.cs
+++ b/MediaBrowser.Api/Playback/StreamState.cs
@@ -1,17 +1,16 @@
-using MediaBrowser.Common.Net;
-using MediaBrowser.Controller.LiveTv;
+using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.MediaInfo;
+using MediaBrowser.Model.Net;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Threading;
-using MediaBrowser.Model.Net;
namespace MediaBrowser.Api.Playback
{
@@ -23,6 +22,7 @@ namespace MediaBrowser.Api.Playback
public string RequestedUrl { get; set; }
public StreamRequest Request { get; set; }
+ public TranscodingThrottler TranscodingThrottler { get; set; }
public VideoStreamRequest VideoRequest
{
@@ -125,6 +125,7 @@ namespace MediaBrowser.Api.Playback
public void Dispose()
{
+ DisposeTranscodingThrottler();
DisposeLiveStream();
DisposeLogStream();
DisposeIsoMount();
@@ -147,6 +148,23 @@ namespace MediaBrowser.Api.Playback
}
}
+ private void DisposeTranscodingThrottler()
+ {
+ if (TranscodingThrottler != null)
+ {
+ try
+ {
+ TranscodingThrottler.Dispose();
+ }
+ catch (Exception ex)
+ {
+ _logger.ErrorException("Error disposing TranscodingThrottler", ex);
+ }
+
+ TranscodingThrottler = null;
+ }
+ }
+
private void DisposeIsoMount()
{
if (IsoMount != null)