From ea72e7b6892b9d193ad0b8956c179f8eddaaa38a Mon Sep 17 00:00:00 2001 From: Jason Dove Date: Tue, 1 Mar 2022 14:29:47 -0600 Subject: [PATCH] use new transcoder logic by default (#664) --- .../Commands/UpdateFFmpegSettingsHandler.cs | 4 ++-- .../FFmpegProfiles/FFmpegSettingsViewModel.cs | 2 +- .../FFmpegProfiles/Queries/GetFFmpegSettingsHandler.cs | 6 +++--- ErsatzTV.Core/Domain/ConfigElementKey.cs | 2 +- ErsatzTV.Core/FFmpeg/FFmpegProcessServiceFactory.cs | 10 +++++----- ErsatzTV/Pages/Settings.razor | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ErsatzTV.Application/FFmpegProfiles/Commands/UpdateFFmpegSettingsHandler.cs b/ErsatzTV.Application/FFmpegProfiles/Commands/UpdateFFmpegSettingsHandler.cs index 8cce113b5..bd0bdc3b2 100644 --- a/ErsatzTV.Application/FFmpegProfiles/Commands/UpdateFFmpegSettingsHandler.cs +++ b/ErsatzTV.Application/FFmpegProfiles/Commands/UpdateFFmpegSettingsHandler.cs @@ -86,8 +86,8 @@ namespace ErsatzTV.Application.FFmpegProfiles.Commands } await _configElementRepository.Upsert( - ConfigElementKey.FFmpegUseExperimentalTranscoder, - request.Settings.UseExperimentalTranscoder.ToString()); + ConfigElementKey.FFmpegUseLegacyTranscoder, + request.Settings.UseLegacyTranscoder.ToString()); await _configElementRepository.Upsert( ConfigElementKey.FFmpegPreferredLanguageCode, diff --git a/ErsatzTV.Application/FFmpegProfiles/FFmpegSettingsViewModel.cs b/ErsatzTV.Application/FFmpegProfiles/FFmpegSettingsViewModel.cs index e76c0280e..b06ef54a6 100644 --- a/ErsatzTV.Application/FFmpegProfiles/FFmpegSettingsViewModel.cs +++ b/ErsatzTV.Application/FFmpegProfiles/FFmpegSettingsViewModel.cs @@ -12,6 +12,6 @@ public int HlsSegmenterIdleTimeout { get; set; } public int WorkAheadSegmenterLimit { get; set; } public int InitialSegmentCount { get; set; } - public bool UseExperimentalTranscoder { get; set; } + public bool UseLegacyTranscoder { get; set; } } } diff --git a/ErsatzTV.Application/FFmpegProfiles/Queries/GetFFmpegSettingsHandler.cs b/ErsatzTV.Application/FFmpegProfiles/Queries/GetFFmpegSettingsHandler.cs index 6242c9c2d..73694e2fe 100644 --- a/ErsatzTV.Application/FFmpegProfiles/Queries/GetFFmpegSettingsHandler.cs +++ b/ErsatzTV.Application/FFmpegProfiles/Queries/GetFFmpegSettingsHandler.cs @@ -36,8 +36,8 @@ namespace ErsatzTV.Application.FFmpegProfiles.Queries await _configElementRepository.GetValue(ConfigElementKey.FFmpegWorkAheadSegmenters); Option initialSegmentCount = await _configElementRepository.GetValue(ConfigElementKey.FFmpegInitialSegmentCount); - Option useExperimentalTranscoder = - await _configElementRepository.GetValue(ConfigElementKey.FFmpegUseExperimentalTranscoder); + Option useLegacyTranscoder = + await _configElementRepository.GetValue(ConfigElementKey.FFmpegUseLegacyTranscoder); var result = new FFmpegSettingsViewModel { @@ -49,7 +49,7 @@ namespace ErsatzTV.Application.FFmpegProfiles.Queries HlsSegmenterIdleTimeout = await hlsSegmenterIdleTimeout.IfNoneAsync(60), WorkAheadSegmenterLimit = await workAheadSegmenterLimit.IfNoneAsync(1), InitialSegmentCount = await initialSegmentCount.IfNoneAsync(1), - UseExperimentalTranscoder = await useExperimentalTranscoder.IfNoneAsync(false) + UseLegacyTranscoder = await useLegacyTranscoder.IfNoneAsync(false) }; foreach (int watermarkId in watermark) diff --git a/ErsatzTV.Core/Domain/ConfigElementKey.cs b/ErsatzTV.Core/Domain/ConfigElementKey.cs index 4ef6216f3..f1e97145e 100644 --- a/ErsatzTV.Core/Domain/ConfigElementKey.cs +++ b/ErsatzTV.Core/Domain/ConfigElementKey.cs @@ -17,7 +17,7 @@ public static ConfigElementKey FFmpegSegmenterTimeout => new("ffmpeg.segmenter.timeout_seconds"); public static ConfigElementKey FFmpegWorkAheadSegmenters => new("ffmpeg.segmenter.work_ahead_limit"); public static ConfigElementKey FFmpegInitialSegmentCount => new("ffmpeg.segmenter.initial_segment_count"); - public static ConfigElementKey FFmpegUseExperimentalTranscoder => new("ffmpeg.use_experimental_transcoder"); + public static ConfigElementKey FFmpegUseLegacyTranscoder => new("ffmpeg.use_legacy_transcoder"); public static ConfigElementKey SearchIndexVersion => new("search_index.version"); public static ConfigElementKey HDHRTunerCount => new("hdhr.tuner_count"); public static ConfigElementKey ChannelsPageSize => new("pages.channels.page_size"); diff --git a/ErsatzTV.Core/FFmpeg/FFmpegProcessServiceFactory.cs b/ErsatzTV.Core/FFmpeg/FFmpegProcessServiceFactory.cs index 6a99ef430..0ff3429e3 100644 --- a/ErsatzTV.Core/FFmpeg/FFmpegProcessServiceFactory.cs +++ b/ErsatzTV.Core/FFmpeg/FFmpegProcessServiceFactory.cs @@ -21,11 +21,11 @@ public class FFmpegProcessServiceFactory : IFFmpegProcessServiceFactory public async Task GetService() { - Option useExperimentalTranscoder = - await _configElementRepository.GetValue(ConfigElementKey.FFmpegUseExperimentalTranscoder); + Option useLegacyTranscoder = + await _configElementRepository.GetValue(ConfigElementKey.FFmpegUseLegacyTranscoder); - return await useExperimentalTranscoder.IfNoneAsync(false) - ? _serviceProvider.GetRequiredService() - : _serviceProvider.GetRequiredService(); + return await useLegacyTranscoder.IfNoneAsync(false) + ? _serviceProvider.GetRequiredService() + : _serviceProvider.GetRequiredService(); } } diff --git a/ErsatzTV/Pages/Settings.razor b/ErsatzTV/Pages/Settings.razor index 8a0bebf6a..14891fb5b 100644 --- a/ErsatzTV/Pages/Settings.razor +++ b/ErsatzTV/Pages/Settings.razor @@ -104,9 +104,9 @@ + @bind-Checked="@_ffmpegSettings.UseLegacyTranscoder"/>