2021-07-24 17:58:50 +00:00
|
|
|
#pragma warning disable CA1002, CS1591
|
2020-02-19 20:04:28 +00:00
|
|
|
|
2019-01-13 20:01:16 +00:00
|
|
|
using System.Collections.Generic;
|
2018-12-27 23:27:57 +00:00
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
2019-01-13 19:25:32 +00:00
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
using MediaBrowser.Model.Dto;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Library
|
|
|
|
{
|
|
|
|
public interface IMediaSourceProvider
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the media sources.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <returns>Task<IEnumerable<MediaSourceInfo>>.</returns>
|
|
|
|
Task<IEnumerable<MediaSourceInfo>> GetMediaSources(BaseItem item, CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Opens the media source.
|
|
|
|
/// </summary>
|
2021-07-24 17:58:50 +00:00
|
|
|
/// <param name="openToken">Token to use.</param>
|
|
|
|
/// <param name="currentLiveStreams">List of live streams.</param>
|
|
|
|
/// <param name="cancellationToken">CancellationToken to use for operation.</param>
|
|
|
|
/// <returns>The media source wrapped as an awaitable task.</returns>
|
2018-12-27 23:27:57 +00:00
|
|
|
Task<ILiveStream> OpenMediaSource(string openToken, List<ILiveStream> currentLiveStreams, CancellationToken cancellationToken);
|
|
|
|
}
|
|
|
|
}
|