diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-10-05 11:20:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-05 11:20:48 -0400 |
| commit | a2fa7c475404347aaf675bdd708a69c451f5af2e (patch) | |
| tree | e9aa273f5d6d77473d3d1f345e2890c864a0e481 /MediaBrowser.Controller/Library | |
| parent | 0a87046736843dfa983213ae1e661d499a6d1df9 (diff) | |
| parent | 83606d82d57604f9796455640d2e93367783f69e (diff) | |
Merge pull request #2210 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Controller/Library')
| -rw-r--r-- | MediaBrowser.Controller/Library/IMediaSourceManager.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Library/IMediaSourceProvider.cs | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Library/IMediaSourceManager.cs b/MediaBrowser.Controller/Library/IMediaSourceManager.cs index c06470c5e..1ab0e4cb0 100644 --- a/MediaBrowser.Controller/Library/IMediaSourceManager.cs +++ b/MediaBrowser.Controller/Library/IMediaSourceManager.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using System.IO; namespace MediaBrowser.Controller.Library { @@ -79,6 +80,8 @@ namespace MediaBrowser.Controller.Library /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task<MediaSourceInfo>.</returns> Task<MediaSourceInfo> GetLiveStream(string id, CancellationToken cancellationToken); + + Task<Tuple<MediaSourceInfo, IDirectStreamProvider>> GetLiveStreamWithDirectStreamProvider(string id, CancellationToken cancellationToken); /// <summary> /// Pings the media source. @@ -95,4 +98,9 @@ namespace MediaBrowser.Controller.Library /// <returns>Task.</returns> Task CloseLiveStream(string id); } + + public interface IDirectStreamProvider + { + Task CopyToAsync(Stream stream, CancellationToken cancellationToken); + } } diff --git a/MediaBrowser.Controller/Library/IMediaSourceProvider.cs b/MediaBrowser.Controller/Library/IMediaSourceProvider.cs index 56366e5a8..b0881ba7c 100644 --- a/MediaBrowser.Controller/Library/IMediaSourceProvider.cs +++ b/MediaBrowser.Controller/Library/IMediaSourceProvider.cs @@ -3,6 +3,7 @@ using MediaBrowser.Model.Dto; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using System; namespace MediaBrowser.Controller.Library { @@ -22,7 +23,7 @@ namespace MediaBrowser.Controller.Library /// <param name="openToken">The open token.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task<MediaSourceInfo>.</returns> - Task<MediaSourceInfo> OpenMediaSource(string openToken, CancellationToken cancellationToken); + Task<Tuple<MediaSourceInfo,IDirectStreamProvider>> OpenMediaSource(string openToken, CancellationToken cancellationToken); /// <summary> /// Closes the media source. |
