jellyfin-server/MediaBrowser.Controller/Library/IMediaSourceProvider.cs

33 lines
1.1 KiB
C#
Raw Normal View History

2015-03-07 22:43:53 +00:00
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Dto;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
2016-10-05 07:15:29 +00:00
using System;
2015-03-07 22:43:53 +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&lt;IEnumerable&lt;MediaSourceInfo&gt;&gt;.</returns>
Task<IEnumerable<MediaSourceInfo>> GetMediaSources(IHasMediaSources item, CancellationToken cancellationToken);
2015-03-28 20:22:27 +00:00
/// <summary>
/// Opens the media source.
/// </summary>
2017-07-02 18:58:56 +00:00
Task<Tuple<MediaSourceInfo,IDirectStreamProvider>> OpenMediaSource(string openToken, bool allowLiveStreamProbe, CancellationToken cancellationToken);
2015-03-28 20:22:27 +00:00
/// <summary>
/// Closes the media source.
/// </summary>
2015-03-29 04:56:39 +00:00
/// <param name="liveStreamId">The live stream identifier.</param>
2015-03-28 20:22:27 +00:00
/// <returns>Task.</returns>
2016-09-29 12:55:49 +00:00
Task CloseMediaSource(string liveStreamId);
2015-03-07 22:43:53 +00:00
}
}