fix graphics engine with scaling behavior crop (#2398)
This commit is contained in:
@@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Fix scaling anamorphic content in locales that don't use period as a decimal separator (e.g. `,`)
|
||||
- Block schedules: fix playout build crash when empty collection uses random playback order
|
||||
- Fix watermarks and graphics elements on primary content split by mid-roll filler
|
||||
- Fix watermarks and graphics elements when `Scaling Behavior` is `Crop`
|
||||
|
||||
### Changed
|
||||
- **BREAKING CHANGE**: change how `Scripted Schedule` system works
|
||||
|
||||
@@ -490,11 +490,13 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
|
||||
{
|
||||
graphicsEngineInput = new GraphicsEngineInput();
|
||||
|
||||
FrameSize targetSize = await desiredState.CroppedSize.IfNoneAsync(desiredState.ScaledSize);
|
||||
|
||||
graphicsEngineContext = new GraphicsEngineContext(
|
||||
channel.Number,
|
||||
audioVersion.MediaItem,
|
||||
graphicsElementContexts,
|
||||
new Resolution { Width = desiredState.ScaledSize.Width, Height = desiredState.ScaledSize.Height },
|
||||
new Resolution { Width = targetSize.Width, Height = targetSize.Height },
|
||||
channel.FFmpegProfile.Resolution,
|
||||
await playbackSettings.FrameRate.IfNoneAsync(24),
|
||||
channelStartTime,
|
||||
|
||||
@@ -214,8 +214,10 @@ public abstract class PipelineBuilderBase : IPipelineBuilder
|
||||
|
||||
foreach (GraphicsEngineInput graphicsEngineInput in _graphicsEngineInput)
|
||||
{
|
||||
var targetSize = desiredState.CroppedSize.IfNone(desiredState.PaddedSize);
|
||||
|
||||
graphicsEngineInput.AddOption(
|
||||
new RawVideoInputOption(PixelFormat.BGRA, desiredState.PaddedSize, desiredState.FrameRate.IfNone(24)));
|
||||
new RawVideoInputOption(PixelFormat.BGRA, targetSize, desiredState.FrameRate.IfNone(24)));
|
||||
}
|
||||
|
||||
Debug.Assert(_videoInputFile.IsSome, "Pipeline builder requires exactly one video input file");
|
||||
|
||||
Reference in New Issue
Block a user