mirror of https://github.com/ErsatzTV/ErsatzTV.git
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
56 lines
1.6 KiB
using ErsatzTV.Core.Domain; |
|
using ErsatzTV.Core.FFmpeg; |
|
using ErsatzTV.Core.Graphics; |
|
|
|
namespace ErsatzTV.Core.Interfaces.Streaming; |
|
|
|
public record GraphicsEngineContext( |
|
string ChannelNumber, |
|
MediaItem MediaItem, |
|
List<GraphicsElementContext> Elements, |
|
Dictionary<string, object> TemplateVariables, |
|
Resolution SquarePixelFrameSize, |
|
Resolution FrameSize, |
|
int FrameRate, |
|
DateTimeOffset ChannelStartTime, |
|
DateTimeOffset ContentStartTime, |
|
TimeSpan Seek, |
|
TimeSpan Duration, |
|
TimeSpan ContentTotalDuration); |
|
|
|
public abstract record GraphicsElementContext; |
|
|
|
public record WatermarkElementContext(WatermarkOptions Options) : GraphicsElementContext; |
|
|
|
public record TextElementDataContext(TextGraphicsElement TextElement) : GraphicsElementContext, ITemplateDataContext |
|
{ |
|
public int EpgEntries => TextElement.EpgEntries; |
|
} |
|
|
|
public record ImageElementContext(ImageGraphicsElement ImageElement) : GraphicsElementContext; |
|
|
|
public record MotionElementDataContext(MotionGraphicsElement MotionElement) |
|
: GraphicsElementContext, ITemplateDataContext |
|
{ |
|
public int EpgEntries => MotionElement.EpgEntries; |
|
} |
|
|
|
public record SubtitleElementDataContext( |
|
SubtitleGraphicsElement SubtitleElement, |
|
Dictionary<string, string> Variables) |
|
: GraphicsElementContext, ITemplateDataContext |
|
{ |
|
public int EpgEntries => SubtitleElement.EpgEntries; |
|
} |
|
|
|
public record ScriptElementDataContext(ScriptGraphicsElement ScriptElement) |
|
: GraphicsElementContext, ITemplateDataContext |
|
{ |
|
public int EpgEntries => ScriptElement.EpgEntries; |
|
} |
|
|
|
|
|
public interface ITemplateDataContext |
|
{ |
|
int EpgEntries { get; } |
|
}
|
|
|