#nullable disable
#pragma warning disable CA1002, CS1591
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Data.Entities;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.MediaInfo;
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>.
List GetMediaStreams(Guid itemId);
///
/// Gets the media streams.
///
/// The query.
/// IEnumerable<MediaStream>.
List GetMediaStreams(MediaStreamQuery query);
///
/// Gets the media attachments.
///
/// The item identifier.
/// IEnumerable<MediaAttachment>.
List GetMediaAttachments(Guid itemId);
///
/// Gets the media attachments.
///
/// The query.
/// IEnumerable<MediaAttachment>.
List GetMediaAttachments(MediaAttachmentQuery query);
///
/// Gets the playack media sources.
///
/// Item to use.
/// User to use for operation.
/// Option to allow media probe.
/// Option to enable path substitution.
/// CancellationToken to use for operation.
/// List of media sources wrapped in an awaitable task.
Task> GetPlaybackMediaSources(BaseItem item, User user, bool allowMediaProbe, bool enablePathSubstitution, CancellationToken cancellationToken);
///
/// Gets the static media sources.
///
/// Item to use.
/// Option to enable path substitution.
/// User to use for operation.
/// List of media sources.
List GetStaticMediaSources(BaseItem item, bool enablePathSubstitution, User user = null);
///
/// Gets the static media source.
///
/// Item to use.
/// Media source to get.
/// Live stream to use.
/// Option to enable path substitution.
/// CancellationToken to use for operation.
/// The static media source wrapped in an awaitable task.
Task GetMediaSource(BaseItem item, string mediaSourceId, string liveStreamId, bool enablePathSubstitution, CancellationToken cancellationToken);
///
/// Opens the media source.
///
/// The request.
/// The cancellation token.
/// Task<MediaSourceInfo>.
Task OpenLiveStream(LiveStreamRequest request, CancellationToken cancellationToken);
Task> OpenLiveStreamInternal(LiveStreamRequest request, CancellationToken cancellationToken);
///
/// Gets the live stream.
///
/// The identifier.
/// The cancellation token.
/// Task<MediaSourceInfo>.
Task GetLiveStream(string id, CancellationToken cancellationToken);
Task> GetLiveStreamWithDirectStreamProvider(string id, CancellationToken cancellationToken);
///
/// Gets the live stream info.
///
/// The identifier.
/// An instance of .
public ILiveStream GetLiveStreamInfo(string id);
///
/// Gets the live stream info using the stream's unique id.
///
/// The unique identifier.
/// An instance of .
public ILiveStream GetLiveStreamInfoByUniqueId(string uniqueId);
///
/// Gets the media sources for an active recording.
///
/// The .
/// The .
/// A task containing the 's for the recording.
Task> GetRecordingStreamMediaSources(ActiveRecordingInfo info, CancellationToken cancellationToken);
///
/// Closes the media source.
///
/// The live stream identifier.
/// Task.
Task CloseLiveStream(string id);
Task GetLiveStreamMediaInfo(string id, CancellationToken cancellationToken);
bool SupportsDirectStream(string path, MediaProtocol protocol);
MediaProtocol GetPathProtocol(string path);
void SetDefaultAudioAndSubtitleStreamIndexes(BaseItem item, MediaSourceInfo source, User user);
Task AddMediaInfoWithProbe(MediaSourceInfo mediaSource, bool isAudio, string cacheKey, bool addProbeDelay, bool isLiveStream, CancellationToken cancellationToken);
}
}