using MediaBrowser.Model.Dto; using MediaBrowser.Model.LiveTv; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace MediaBrowser.Controller.LiveTv { public interface ITunerHost { /// /// Gets the name. /// /// The name. string Name { get; } /// /// Gets the type. /// /// The type. string Type { get; } /// /// Gets the channels. /// /// Task<IEnumerable<ChannelInfo>>. Task> GetChannels(bool enableCache, CancellationToken cancellationToken); /// /// Gets the tuner infos. /// /// The cancellation token. /// Task<List<LiveTvTunerInfo>>. Task> GetTunerInfos(CancellationToken cancellationToken); /// /// Gets the channel stream. /// /// The channel identifier. /// The stream identifier. /// The cancellation token. /// Task<MediaSourceInfo>. Task GetChannelStream(string channelId, string streamId, CancellationToken cancellationToken); /// /// Gets the channel stream media sources. /// /// The channel identifier. /// The cancellation token. /// Task<List<MediaSourceInfo>>. Task> GetChannelStreamMediaSources(string channelId, CancellationToken cancellationToken); Task> DiscoverDevices(int discoveryDurationMs, CancellationToken cancellationToken); } public interface IConfigurableTunerHost { /// /// Validates the specified information. /// /// The information. /// Task. Task Validate(TunerHostInfo info); } public interface ILiveStream { Task Open(CancellationToken openCancellationToken); void Close(); int ConsumerCount { get; } string OriginalStreamId { get; set; } bool EnableStreamSharing { get; set; } ITunerHost TunerHost { get; set; } MediaSourceInfo OpenedMediaSource { get; set; } string UniqueId { get; } List SharedStreamIds { get; } } }