Stream custom live channels using your own media
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
651 B

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();
}
}
}
}