-
Notifications
You must be signed in to change notification settings - Fork 812
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3287 from MediaBrowser/dev
update live stream management
- Loading branch information
Showing
24 changed files
with
273 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
Emby.Server.Implementations/Library/ExclusiveLiveStream.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using MediaBrowser.Controller; | ||
using MediaBrowser.Controller.IO; | ||
using MediaBrowser.Controller.LiveTv; | ||
using MediaBrowser.Model.Dto; | ||
using MediaBrowser.Model.IO; | ||
using MediaBrowser.Model.Logging; | ||
using MediaBrowser.Model.System; | ||
using MediaBrowser.Model.LiveTv; | ||
using System.Linq; | ||
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 => throw new NotImplementedException(); | ||
|
||
private ILiveTvService _liveTvService; | ||
private string _openedId; | ||
|
||
public ExclusiveLiveStream(MediaSourceInfo mediaSource, ILiveTvService liveTvService, string openedId) | ||
{ | ||
MediaSource = mediaSource; | ||
EnableStreamSharing = false; | ||
_liveTvService = liveTvService; | ||
_openedId = openedId; | ||
} | ||
|
||
public Task Close() | ||
{ | ||
return _liveTvService.CloseLiveStream(_openedId, CancellationToken.None); | ||
} | ||
|
||
public Task Open(CancellationToken openCancellationToken) | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.