2017-02-23 20:13:07 +01:00
|
|
|
|
using MediaBrowser.Model.Dto;
|
2015-07-20 20:32:55 +02:00
|
|
|
|
using MediaBrowser.Model.LiveTv;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.LiveTv
|
|
|
|
|
{
|
|
|
|
|
public interface ITunerHost
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the name.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The name.</value>
|
|
|
|
|
string Name { get; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the type.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The type.</value>
|
|
|
|
|
string Type { get; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channels.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>Task<IEnumerable<ChannelInfo>>.</returns>
|
2017-02-23 20:13:07 +01:00
|
|
|
|
Task<List<ChannelInfo>> GetChannels(bool enableCache, CancellationToken cancellationToken);
|
2015-07-20 20:32:55 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the tuner infos.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<List<LiveTvTunerInfo>>.</returns>
|
2015-08-19 18:43:23 +02:00
|
|
|
|
Task<List<LiveTvTunerInfo>> GetTunerInfos(CancellationToken cancellationToken);
|
2015-07-20 20:32:55 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the channel stream.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="channelId">The channel identifier.</param>
|
|
|
|
|
/// <param name="streamId">The stream identifier.</param>
|
|
|
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
|
|
|
/// <returns>Task<MediaSourceInfo>.</returns>
|
2017-09-28 19:04:06 +02:00
|
|
|
|
Task<ILiveStream> GetChannelStream(string channelId, string streamId, CancellationToken cancellationToken);
|
2015-07-23 15:23:22 +02:00
|
|
|
|
/// <summary>
|
2015-07-24 01:40:54 +02:00
|
|
|
|
/// 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>
|
2015-08-19 21:25:18 +02:00
|
|
|
|
Task<List<MediaSourceInfo>> GetChannelStreamMediaSources(string channelId, CancellationToken cancellationToken);
|
2017-03-13 05:08:23 +01:00
|
|
|
|
|
2017-03-13 05:49:10 +01:00
|
|
|
|
Task<List<TunerHostInfo>> DiscoverDevices(int discoveryDurationMs, CancellationToken cancellationToken);
|
2017-12-03 23:12:46 +01:00
|
|
|
|
bool IsSupported
|
|
|
|
|
{
|
|
|
|
|
get;
|
|
|
|
|
}
|
2016-02-19 07:20:18 +01:00
|
|
|
|
}
|
|
|
|
|
public interface IConfigurableTunerHost
|
|
|
|
|
{
|
2015-07-24 01:40:54 +02:00
|
|
|
|
/// <summary>
|
2015-07-23 15:23:22 +02:00
|
|
|
|
/// Validates the specified information.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="info">The information.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task Validate(TunerHostInfo info);
|
2015-07-20 20:32:55 +02:00
|
|
|
|
}
|
2017-09-28 19:04:06 +02:00
|
|
|
|
|
|
|
|
|
public interface ILiveStream
|
|
|
|
|
{
|
2017-10-23 21:14:11 +02:00
|
|
|
|
Task Open(CancellationToken openCancellationToken);
|
|
|
|
|
void Close();
|
2017-09-28 19:04:06 +02:00
|
|
|
|
int ConsumerCount { get; }
|
|
|
|
|
string OriginalStreamId { get; set; }
|
2017-11-17 22:54:33 +01:00
|
|
|
|
string TunerHostId { get; }
|
2017-09-28 19:04:06 +02:00
|
|
|
|
bool EnableStreamSharing { get; set; }
|
|
|
|
|
MediaSourceInfo OpenedMediaSource { get; set; }
|
|
|
|
|
string UniqueId { get; }
|
|
|
|
|
List<string> SharedStreamIds { get; }
|
|
|
|
|
}
|
2015-07-20 20:32:55 +02:00
|
|
|
|
}
|