using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Persistence; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace MediaBrowser.Controller.Library { public interface IMediaSourceManager { /// /// Adds the parts. /// /// The providers. void AddParts(IEnumerable providers); /// /// Gets the media streams. /// /// The item identifier. /// IEnumerable<MediaStream>. IEnumerable GetMediaStreams(Guid itemId); /// /// Gets the media streams. /// /// The media source identifier. /// IEnumerable<MediaStream>. IEnumerable GetMediaStreams(string mediaSourceId); /// /// Gets the media streams. /// /// The query. /// IEnumerable<MediaStream>. IEnumerable GetMediaStreams(MediaStreamQuery query); /// /// Gets the playack media sources. /// /// The identifier. /// The user identifier. /// if set to true [enable path substitution]. /// The cancellation token. /// IEnumerable<MediaSourceInfo>. Task> GetPlayackMediaSources(string id, string userId, bool enablePathSubstitution, CancellationToken cancellationToken); /// /// Gets the playack media sources. /// /// The identifier. /// if set to true [enable path substitution]. /// The cancellation token. /// Task<IEnumerable<MediaSourceInfo>>. Task> GetPlayackMediaSources(string id, bool enablePathSubstitution, CancellationToken cancellationToken); /// /// Gets the static media sources. /// /// The item. /// if set to true [enable path substitution]. /// The user. /// IEnumerable<MediaSourceInfo>. IEnumerable GetStaticMediaSources(IHasMediaSources item, bool enablePathSubstitution, User user); /// /// Gets the static media sources. /// /// The item. /// if set to true [enable path substitution]. /// IEnumerable<MediaSourceInfo>. IEnumerable GetStaticMediaSources(IHasMediaSources item, bool enablePathSubstitution); /// /// Gets the static media source. /// /// The item. /// The media source identifier. /// if set to true [enable path substitution]. /// MediaSourceInfo. MediaSourceInfo GetStaticMediaSource(IHasMediaSources item, string mediaSourceId, bool enablePathSubstitution); /// /// Opens the media source. /// /// The open token. /// if set to true [enable automatic close]. /// The cancellation token. /// Task<MediaSourceInfo>. Task OpenLiveStream(string openToken, bool enableAutoClose, CancellationToken cancellationToken); /// /// Gets the live stream. /// /// The identifier. /// The cancellation token. /// Task<MediaSourceInfo>. Task GetLiveStream(string id, CancellationToken cancellationToken); /// /// Pings the media source. /// /// The live stream identifier. /// The cancellation token. /// Task. Task PingLiveStream(string id, CancellationToken cancellationToken); /// /// Closes the media source. /// /// The live stream identifier. /// The cancellation token. /// Task. Task CloseLiveStream(string id, CancellationToken cancellationToken); } }