* rework hls segmenter to start more quickly * don't use realtime encoding for hls until we're at least a minute ahead * ugly but functional playlist filtering
24 lines
651 B
C#
24 lines
651 B
C#
using System.Collections.Concurrent;
|
|
using ErsatzTV.Core.Interfaces.FFmpeg;
|
|
|
|
namespace ErsatzTV.Core.FFmpeg
|
|
{
|
|
public class FFmpegSegmenterService : IFFmpegSegmenterService
|
|
{
|
|
public FFmpegSegmenterService()
|
|
{
|
|
SessionWorkers = new ConcurrentDictionary<string, IHlsSessionWorker>();
|
|
}
|
|
|
|
public ConcurrentDictionary<string, IHlsSessionWorker> SessionWorkers { get; }
|
|
|
|
public void TouchChannel(string channelNumber)
|
|
{
|
|
if (SessionWorkers.TryGetValue(channelNumber, out IHlsSessionWorker worker))
|
|
{
|
|
worker?.Touch();
|
|
}
|
|
}
|
|
}
|
|
}
|