2020-08-22 19:56:24 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 20:01:16 +00:00
|
|
|
using System.Collections.Generic;
|
2018-12-27 23:27:57 +00:00
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using MediaBrowser.Controller.Library;
|
2019-01-13 19:25:32 +00:00
|
|
|
using MediaBrowser.Model.Dto;
|
|
|
|
using MediaBrowser.Model.LiveTv;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.LiveTv
|
|
|
|
{
|
|
|
|
public interface ITunerHost
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the name.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The name.</value>
|
|
|
|
string Name { get; }
|
2020-08-22 19:56:24 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the type.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The type.</value>
|
|
|
|
string Type { get; }
|
2020-08-22 19:56:24 +00:00
|
|
|
|
|
|
|
bool IsSupported { get; }
|
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the channels.
|
|
|
|
/// </summary>
|
|
|
|
/// <returns>Task<IEnumerable<ChannelInfo>>.</returns>
|
|
|
|
Task<List<ChannelInfo>> GetChannels(bool enableCache, CancellationToken cancellationToken);
|
2020-08-22 19:56:24 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the tuner infos.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <returns>Task<List<LiveTvTunerInfo>>.</returns>
|
|
|
|
Task<List<LiveTvTunerInfo>> GetTunerInfos(CancellationToken cancellationToken);
|
2020-08-22 19:56:24 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the channel stream.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="channelId">The channel identifier.</param>
|
|
|
|
/// <param name="streamId">The stream identifier.</param>
|
2020-08-22 19:56:24 +00:00
|
|
|
/// <param name="currentLiveStreams">The current live streams.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token to cancel operation.</param>
|
2018-12-27 23:27:57 +00:00
|
|
|
Task<ILiveStream> GetChannelStream(string channelId, string streamId, List<ILiveStream> currentLiveStreams, CancellationToken cancellationToken);
|
2020-08-22 19:56:24 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Gets the channel stream media sources.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="channelId">The channel identifier.</param>
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
/// <returns>Task<List<MediaSourceInfo>>.</returns>
|
|
|
|
Task<List<MediaSourceInfo>> GetChannelStreamMediaSources(string channelId, CancellationToken cancellationToken);
|
|
|
|
|
|
|
|
Task<List<TunerHostInfo>> DiscoverDevices(int discoveryDurationMs, CancellationToken cancellationToken);
|
2020-08-22 19:56:24 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
}
|
2020-06-15 21:43:52 +00:00
|
|
|
|
2018-12-27 23:27:57 +00:00
|
|
|
public interface IConfigurableTunerHost
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Validates the specified information.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="info">The information.</param>
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
Task Validate(TunerHostInfo info);
|
|
|
|
}
|
|
|
|
}
|