aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs
diff options
context:
space:
mode:
authorstefan <stefan@hegedues.at>2018-09-12 19:26:21 +0200
committerstefan <stefan@hegedues.at>2018-09-12 19:26:21 +0200
commit48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch)
tree8dae77a31670a888d733484cb17dd4077d5444e8 /Emby.Server.Implementations/Library/ExclusiveLiveStream.cs
parentc32d8656382a0eacb301692e0084377fc433ae9b (diff)
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'Emby.Server.Implementations/Library/ExclusiveLiveStream.cs')
-rw-r--r--Emby.Server.Implementations/Library/ExclusiveLiveStream.cs42
1 files changed, 42 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs b/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs
new file mode 100644
index 000000000..186ec63da
--- /dev/null
+++ b/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using MediaBrowser.Model.Dto;
+using MediaBrowser.Controller.Library;
+
+namespace Emby.Server.Implementations.Library
+{
+ public class ExclusiveLiveStream : ILiveStream
+ {
+ public int ConsumerCount { get; set; }
+ public string OriginalStreamId { get; set; }
+
+ public string TunerHostId => null;
+
+ public bool EnableStreamSharing { get; set; }
+ public MediaSourceInfo MediaSource { get; set; }
+
+ public string UniqueId { get; private set; }
+
+ private Func<Task> _closeFn;
+
+ public ExclusiveLiveStream(MediaSourceInfo mediaSource, Func<Task> closeFn)
+ {
+ MediaSource = mediaSource;
+ EnableStreamSharing = false;
+ _closeFn = closeFn;
+ ConsumerCount = 1;
+ UniqueId = Guid.NewGuid().ToString("N");
+ }
+
+ public Task Close()
+ {
+ return _closeFn();
+ }
+
+ public Task Open(CancellationToken openCancellationToken)
+ {
+ return Task.CompletedTask;
+ }
+ }
+}