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.
 
 
 

56 lines
1.6 KiB

using CliWrap;
using ErsatzTV.Core.Interfaces.Streaming;
namespace ErsatzTV.Application.Streaming;
public class PlayoutItemProcessModel
{
public PlayoutItemProcessModel(
Command process,
Option<GraphicsEngineContext> graphicsEngineContext,
Option<TimeSpan> maybeDuration,
DateTimeOffset until,
bool isComplete,
Option<long> segmentKey,
Option<int> mediaItemId,
Option<TimeSpan> playoutOffset,
bool isWorkingAhead)
{
Process = process;
GraphicsEngineContext = graphicsEngineContext;
MaybeDuration = maybeDuration;
Until = until;
IsComplete = isComplete;
SegmentKey = segmentKey;
MediaItemId = mediaItemId;
IsWorkingAhead = isWorkingAhead;
// undo the offset applied in FFmpegProcessHandler
// so we don't continually walk backward/forward in time by the offset amount
foreach (TimeSpan offset in playoutOffset)
{
foreach (long key in SegmentKey)
{
SegmentKey = key + (long)offset.TotalSeconds;
}
Until += offset;
}
}
public Command Process { get; init; }
public Option<GraphicsEngineContext> GraphicsEngineContext { get; init; }
public Option<TimeSpan> MaybeDuration { get; init; }
public DateTimeOffset Until { get; init; }
public bool IsComplete { get; init; }
public Option<long> SegmentKey { get; init; }
public Option<int> MediaItemId { get; init; }
public bool IsWorkingAhead { get; init; }
}