Browse Source

use new transcoder logic by default (#664)

pull/665/head
Jason Dove 3 years ago committed by GitHub
parent
commit
ea72e7b689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ErsatzTV.Application/FFmpegProfiles/Commands/UpdateFFmpegSettingsHandler.cs
  2. 2
      ErsatzTV.Application/FFmpegProfiles/FFmpegSettingsViewModel.cs
  3. 6
      ErsatzTV.Application/FFmpegProfiles/Queries/GetFFmpegSettingsHandler.cs
  4. 2
      ErsatzTV.Core/Domain/ConfigElementKey.cs
  5. 10
      ErsatzTV.Core/FFmpeg/FFmpegProcessServiceFactory.cs
  6. 4
      ErsatzTV/Pages/Settings.razor

4
ErsatzTV.Application/FFmpegProfiles/Commands/UpdateFFmpegSettingsHandler.cs

@ -86,8 +86,8 @@ namespace ErsatzTV.Application.FFmpegProfiles.Commands @@ -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,

2
ErsatzTV.Application/FFmpegProfiles/FFmpegSettingsViewModel.cs

@ -12,6 +12,6 @@ @@ -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; }
}
}

6
ErsatzTV.Application/FFmpegProfiles/Queries/GetFFmpegSettingsHandler.cs

@ -36,8 +36,8 @@ namespace ErsatzTV.Application.FFmpegProfiles.Queries @@ -36,8 +36,8 @@ namespace ErsatzTV.Application.FFmpegProfiles.Queries
await _configElementRepository.GetValue<int>(ConfigElementKey.FFmpegWorkAheadSegmenters);
Option<int> initialSegmentCount =
await _configElementRepository.GetValue<int>(ConfigElementKey.FFmpegInitialSegmentCount);
Option<bool> useExperimentalTranscoder =
await _configElementRepository.GetValue<bool>(ConfigElementKey.FFmpegUseExperimentalTranscoder);
Option<bool> useLegacyTranscoder =
await _configElementRepository.GetValue<bool>(ConfigElementKey.FFmpegUseLegacyTranscoder);
var result = new FFmpegSettingsViewModel
{
@ -49,7 +49,7 @@ namespace ErsatzTV.Application.FFmpegProfiles.Queries @@ -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)

2
ErsatzTV.Core/Domain/ConfigElementKey.cs

@ -17,7 +17,7 @@ @@ -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");

10
ErsatzTV.Core/FFmpeg/FFmpegProcessServiceFactory.cs

@ -21,11 +21,11 @@ public class FFmpegProcessServiceFactory : IFFmpegProcessServiceFactory @@ -21,11 +21,11 @@ public class FFmpegProcessServiceFactory : IFFmpegProcessServiceFactory
public async Task<IFFmpegProcessService> GetService()
{
Option<bool> useExperimentalTranscoder =
await _configElementRepository.GetValue<bool>(ConfigElementKey.FFmpegUseExperimentalTranscoder);
Option<bool> useLegacyTranscoder =
await _configElementRepository.GetValue<bool>(ConfigElementKey.FFmpegUseLegacyTranscoder);
return await useExperimentalTranscoder.IfNoneAsync(false)
? _serviceProvider.GetRequiredService<FFmpegLibraryProcessService>()
: _serviceProvider.GetRequiredService<FFmpegProcessService>();
return await useLegacyTranscoder.IfNoneAsync(false)
? _serviceProvider.GetRequiredService<FFmpegProcessService>()
: _serviceProvider.GetRequiredService<FFmpegLibraryProcessService>();
}
}

4
ErsatzTV/Pages/Settings.razor

@ -104,9 +104,9 @@ @@ -104,9 +104,9 @@
</MudElement>
<MudElement HtmlTag="div" Class="mt-3">
<MudSwitch T="bool"
Label="Use Experimental Transcoder Logic"
Label="Use Legacy Transcoder Logic"
Color="Color.Primary"
@bind-Checked="@_ffmpegSettings.UseExperimentalTranscoder"/>
@bind-Checked="@_ffmpegSettings.UseLegacyTranscoder"/>
</MudElement>
</MudForm>
</MudCardContent>

Loading…
Cancel
Save