mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 10:29:01 -07:00
57 lines
2.3 KiB
C#
57 lines
2.3 KiB
C#
using System;
|
|
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
|
|
{
|
|
/// <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>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task<IEnumerable<ChannelInfo>>.</returns>
|
|
Task<IEnumerable<ChannelInfo>> GetChannels(CancellationToken cancellationToken);
|
|
/// <summary>
|
|
/// Gets the tuner infos.
|
|
/// </summary>
|
|
/// <param name="cancellationToken">The cancellation token.</param>
|
|
/// <returns>Task<List<LiveTvTunerInfo>>.</returns>
|
|
Task<List<LiveTvTunerInfo>> GetTunerInfos(CancellationToken cancellationToken);
|
|
/// <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>
|
|
Task<Tuple<MediaSourceInfo,SemaphoreSlim>> GetChannelStream(string channelId, string streamId, CancellationToken cancellationToken);
|
|
/// <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);
|
|
/// <summary>
|
|
/// Validates the specified information.
|
|
/// </summary>
|
|
/// <param name="info">The information.</param>
|
|
/// <returns>Task.</returns>
|
|
Task Validate(TunerHostInfo info);
|
|
}
|
|
}
|