2015-03-07 23:43:53 +01:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
|
using MediaBrowser.Model.Dto;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
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(IHasMediaSources item, CancellationToken cancellationToken);
|
2015-03-28 21:22:27 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Opens the media source.
|
|
|
|
|
/// </summary>
|
2015-03-29 06:56:39 +02:00
|
|
|
|
/// <param name="openToken">The open token.</param>
|
2015-03-28 21:22:27 +01:00
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<MediaSourceInfo>.</returns>
|
2015-03-29 06:56:39 +02:00
|
|
|
|
Task<MediaSourceInfo> OpenMediaSource(string openToken, CancellationToken cancellationToken);
|
2015-03-28 21:22:27 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Closes the media source.
|
|
|
|
|
/// </summary>
|
2015-03-29 06:56:39 +02:00
|
|
|
|
/// <param name="liveStreamId">The live stream identifier.</param>
|
2015-03-28 21:22:27 +01:00
|
|
|
|
/// <returns>Task.</returns>
|
2016-09-29 14:55:49 +02:00
|
|
|
|
Task CloseMediaSource(string liveStreamId);
|
2015-03-07 23:43:53 +01:00
|
|
|
|
}
|
|
|
|
|
}
|