Browse Source

allow clearing (omitting) video profile setting (#1706)

pull/1708/head
Jason Dove 2 years ago committed by GitHub
parent
commit
ef6c8b0816
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs
  2. 3
      ErsatzTV/Pages/FFmpegEditor.razor

4
ErsatzTV.Core/FFmpeg/FFmpegLibraryProcessService.cs

@ -449,7 +449,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService @@ -449,7 +449,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
AudioFilter.None);
var videoFormat = GetVideoFormat(playbackSettings);
var desiredState = new FrameState(
playbackSettings.RealtimeOutput,
false,
@ -998,7 +998,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService @@ -998,7 +998,7 @@ public class FFmpegLibraryProcessService : IFFmpegProcessService
};
private static Option<string> GetVideoProfile(string videoFormat, string videoProfile) =>
(videoFormat, videoProfile.ToLowerInvariant()) switch
(videoFormat, (videoProfile ?? string.Empty).ToLowerInvariant()) switch
{
(VideoFormat.H264, VideoProfile.Main) => VideoProfile.Main,
(VideoFormat.H264, VideoProfile.High) => VideoProfile.High,

3
ErsatzTV/Pages/FFmpegEditor.razor

@ -63,7 +63,8 @@ @@ -63,7 +63,8 @@
<MudSelect Label="Profile"
@bind-Value="_model.VideoProfile"
For="@(() => _model.VideoProfile)"
Disabled="@(_model.VideoFormat != FFmpegProfileVideoFormat.H264 || (_model.HardwareAcceleration != HardwareAccelerationKind.Nvenc && _model.HardwareAcceleration != HardwareAccelerationKind.Qsv && _model.HardwareAcceleration != HardwareAccelerationKind.None))">
Disabled="@(_model.VideoFormat != FFmpegProfileVideoFormat.H264 || (_model.HardwareAcceleration != HardwareAccelerationKind.Nvenc && _model.HardwareAcceleration != HardwareAccelerationKind.Qsv && _model.HardwareAcceleration != HardwareAccelerationKind.None))"
Clearable="true">
<MudSelectItem Value="@VideoProfile.Main">main</MudSelectItem>
<MudSelectItem Value="@VideoProfile.High">high</MudSelectItem>
</MudSelect>

Loading…
Cancel
Save