Class BaseTunerHost
Inheritance
System.Object
BaseTunerHost
Assembly: MediaBrowser.Controller.dll
public abstract class BaseTunerHost : ITunerHost
Constructors
Declaration
protected BaseTunerHost(IServerApplicationHost applicationHost)
Parameters
Fields
Declaration
protected readonly IServerApplicationHost AppHost
Field Value
Declaration
protected readonly IServerConfigurationManager Config
Field Value
Declaration
protected readonly IFileSystem FileSystem
Field Value
Declaration
protected readonly IJsonSerializer JsonSerializer
Field Value
Declaration
protected readonly ILiveTvManager LiveTvManager
Field Value
Declaration
protected readonly ILogger Logger
Field Value
Properties
Declaration
public virtual bool IsSupported { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Declaration
protected virtual string LegacyChannelIdPrefix { get; }
Property Value
| Type |
Description |
| System.String |
|
Declaration
public abstract string Name { get; }
Property Value
| Type |
Description |
| System.String |
|
Declaration
public virtual string SetupUrl { get; }
Property Value
| Type |
Description |
| System.String |
|
Declaration
public abstract string Type { get; }
Property Value
| Type |
Description |
| System.String |
|
Declaration
protected virtual bool UseTunerHostIdAsPrefix { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Methods
Declaration
protected string CreateEmbyChannelId(TunerHostInfo tuner, string tunerChannelId)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
tuner |
|
| System.String |
tunerChannelId |
|
Returns
| Type |
Description |
| System.String |
|
Declaration
protected virtual Task<List<ChannelInfo>> DeserializeChannelsFromFileAsync(string file)
Parameters
| Type |
Name |
Description |
| System.String |
file |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<ChannelInfo>> |
|
Declaration
public virtual Task<List<TunerHostInfo>> DiscoverDevices(int discoveryDurationMs, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| System.Int32 |
discoveryDurationMs |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<TunerHostInfo>> |
|
Declaration
public string GetChannelIdPrefix(TunerHostInfo tuner)
Parameters
Returns
| Type |
Description |
| System.String |
|
Declaration
public async Task<List<ChannelInfo>> GetChannels(TunerHostInfo host, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
host |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<ChannelInfo>> |
|
Declaration
protected abstract Task<List<ChannelInfo>> GetChannelsInternal(TunerHostInfo tuner, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
tuner |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<ChannelInfo>> |
|
Declaration
protected virtual async Task<ILiveStream> GetChannelStream(TunerHostInfo tuner, BaseItem dbChannnel, ChannelInfo tunerChannel, string mediaSourceId, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
tuner |
|
| BaseItem |
dbChannnel |
|
| ChannelInfo |
tunerChannel |
|
| System.String |
mediaSourceId |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<ILiveStream> |
|
Declaration
public async Task<ILiveStream> GetChannelStream(TunerHostInfo tuner, BaseItem dbChannnel, string tunerChannelId, string mediaSourceId, List<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
tuner |
|
| BaseItem |
dbChannnel |
|
| System.String |
tunerChannelId |
|
| System.String |
mediaSourceId |
|
| System.Collections.Generic.List<ILiveStream> |
currentLiveStreams |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<ILiveStream> |
|
Declaration
protected abstract Task<List<MediaSourceInfo>> GetChannelStreamMediaSources(TunerHostInfo tuner, BaseItem dbChannnel, ChannelInfo tunerChannel, CancellationToken cancellationToken)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<MediaSourceInfo>> |
|
Declaration
public async Task<List<MediaSourceInfo>> GetChannelStreamMediaSources(TunerHostInfo tuner, BaseItem dbChannnel, string tunerChannelId, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
tuner |
|
| BaseItem |
dbChannnel |
|
| System.String |
tunerChannelId |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<MediaSourceInfo>> |
|
Declaration
protected LiveTvOptions GetConfiguration()
Returns
Declaration
public virtual TunerHostInfo GetDefaultConfiguration()
Returns
GetProgramEntryId(String, DateTimeOffset, String)
Declaration
protected string GetProgramEntryId(string showId, DateTimeOffset startDateUtc, string channelId)
Parameters
| Type |
Name |
Description |
| System.String |
showId |
|
| System.DateTimeOffset |
startDateUtc |
|
| System.String |
channelId |
|
Returns
| Type |
Description |
| System.String |
|
Declaration
public async Task<List<ProgramInfo>> GetProgramsAsync(TunerHostInfo tuner, ChannelInfo tunerChannel, DateTimeOffset startDateUtc, DateTimeOffset endDateUtc, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
tuner |
|
| ChannelInfo |
tunerChannel |
|
| System.DateTimeOffset |
startDateUtc |
|
| System.DateTimeOffset |
endDateUtc |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<ProgramInfo>> |
|
Declaration
protected virtual Task<List<ProgramInfo>> GetProgramsInternal(TunerHostInfo tuner, string tunerChannelId, DateTimeOffset startDateUtc, DateTimeOffset endDateUtc, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
tuner |
|
| System.String |
tunerChannelId |
|
| System.DateTimeOffset |
startDateUtc |
|
| System.DateTimeOffset |
endDateUtc |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<ProgramInfo>> |
|
Declaration
protected T GetProviderOptions<T>(TunerHostInfo info)
where T : new()
Parameters
Returns
Type Parameters
Declaration
protected string GetTunerChannelIdFromEmbyChannelId(TunerHostInfo tuner, string channelId)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
tuner |
|
| System.String |
channelId |
|
Returns
| Type |
Description |
| System.String |
|
Declaration
public virtual Task OnDeleted(TunerHostInfo tuner, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
tuner |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Declaration
public virtual Task OnSaved(TunerHostInfo tuner, bool isNew, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
tuner |
|
| System.Boolean |
isNew |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Declaration
public async Task<List<ChannelInfo>> RefreshChannels(TunerHostInfo host, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
host |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.List<ChannelInfo>> |
|
Declaration
protected void SetCustomOptions<T>(TunerHostInfo info, T options)
Parameters
Type Parameters
Declaration
public virtual bool SupportsGuideData(TunerHostInfo tuner)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
public virtual bool SupportsRemappingGuideData(TunerHostInfo tuner)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
public virtual Task ValdidateOptions(TunerHostInfo tuner, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| TunerHostInfo |
tuner |
|
| System.Threading.CancellationToken |
cancellationToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Implements
Extension Methods