Backend plumbing for the SPA transcoding editors (#143 blocker): - FFmpeg profile response DTO round-trip: add NormalizeAudio, NormalizeVideo, PadMode, TargetLoudness, NormalizeColors, ResolutionId (keep Resolution name for compat); DeinterlaceVideo now bool (was bool?). #nullable enable on the DTO. - New GET /api/ffmpeg/hardware-acceleration-kinds wrapping GetSupportedHardwareAccelerationKinds (returns enum names as strings). - Filler preset CRUD: GET-by-id/POST/PUT/DELETE on FillerPresetController with full request/response DTOs; new FillerPresetFullResponseModel + GetFillerPresetByIdForApi. CreateFillerPreset now returns the new id (CreateFillerPresetResult) to match sibling Create commands and enable a 201+Location; updated the one Blazor call site. - Watermark CRUD: GET-by-id/POST/PUT/DELETE on WatermarkController with full DTOs (path+contentType, all 15 fields); new WatermarkFullResponseModel + GetWatermarkByIdForApi. - Startup: register WatermarkLocation/WatermarkSize as OpenAPI string enums (they live in ErsatzTV.FFmpeg.State and were documented as ints, mismatching the Newtonsoft StringEnumConverter runtime serialization). - Tests: full CRUD controller tests for filler + watermark; contract-test entries (404/401/422) for the new mutating endpoints; regenerated v1.json. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
#nullable enable
|
|
using ErsatzTV.Core.Domain;
|
|
using ErsatzTV.Core.FFmpeg;
|
|
|
|
namespace ErsatzTV.Core.Api.FFmpegProfiles;
|
|
|
|
public record FFmpegFullProfileResponseModel(
|
|
int Id,
|
|
string Name,
|
|
int ThreadCount,
|
|
bool NormalizeAudio,
|
|
bool NormalizeVideo,
|
|
HardwareAccelerationKind HardwareAcceleration,
|
|
string VaapiDisplay,
|
|
VaapiDriver VaapiDriver,
|
|
string VaapiDevice,
|
|
int? QsvExtraHardwareFrames,
|
|
int ResolutionId,
|
|
string Resolution,
|
|
ScalingBehavior ScalingBehavior,
|
|
FilterMode PadMode,
|
|
FFmpegProfileVideoFormat VideoFormat,
|
|
string VideoProfile,
|
|
string VideoPreset,
|
|
bool AllowBFrames,
|
|
FFmpegProfileBitDepth BitDepth,
|
|
int VideoBitrate,
|
|
int VideoBufferSize,
|
|
FFmpegProfileTonemapAlgorithm TonemapAlgorithm,
|
|
FFmpegProfileAudioFormat AudioFormat,
|
|
int AudioBitrate,
|
|
int AudioBufferSize,
|
|
NormalizeLoudnessMode NormalizeLoudnessMode,
|
|
double? TargetLoudness,
|
|
int AudioChannels,
|
|
int AudioSampleRate,
|
|
bool NormalizeFramerate,
|
|
bool NormalizeColors,
|
|
bool DeinterlaceVideo);
|