* fix formatting rules * reformat ersatztv * reformat ersatztv.application * reformat ersatztv.core * refactor ersatztv.core.tests * reformat ersatztv.ffmpeg * reformat ersatztv.ffmpeg.tests * reformat ersatztv.infrastructure * cleanup infra mysql * cleanup infra sqlite * cleanup infra tests * cleanup ersatztv.scanner * cleanup ersatztv.scanner.tests * sln cleanup * update dependencies
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
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,
|
|
Resolution SquarePixelFrameSize,
|
|
Resolution FrameSize,
|
|
int FrameRate,
|
|
DateTimeOffset ChannelStartTime,
|
|
DateTimeOffset ContentStartTime,
|
|
TimeSpan Seek,
|
|
TimeSpan Duration);
|
|
|
|
public abstract record GraphicsElementContext;
|
|
|
|
public record WatermarkElementContext(WatermarkOptions Options) : GraphicsElementContext;
|
|
|
|
public record TextElementDataContext(TextGraphicsElement TextElement, Dictionary<string, string> Variables)
|
|
: GraphicsElementContext, ITemplateDataContext
|
|
{
|
|
public int EpgEntries => TextElement.EpgEntries;
|
|
}
|
|
|
|
public record ImageElementContext(ImageGraphicsElement ImageElement) : GraphicsElementContext;
|
|
|
|
public record SubtitleElementDataContext(
|
|
SubtitlesGraphicsElement SubtitlesElement,
|
|
Dictionary<string, string> Variables)
|
|
: GraphicsElementContext, ITemplateDataContext
|
|
{
|
|
public int EpgEntries => SubtitlesElement.EpgEntries;
|
|
}
|
|
|
|
public interface ITemplateDataContext
|
|
{
|
|
int EpgEntries { get; }
|
|
}
|