Add perf tradeoff mode to image extractor (#12744)

This commit is contained in:
gnattu
2024-09-30 10:21:46 +08:00
committed by GitHub
parent 77420739e6
commit 9ef7ccfc12
3 changed files with 22 additions and 1 deletions

View File

@@ -39,6 +39,11 @@ namespace MediaBrowser.Controller.Extensions
/// </summary>
public const string FfmpegAnalyzeDurationKey = "FFmpeg:analyzeduration";
/// <summary>
/// The key for the FFmpeg image extraction performance tradeoff option.
/// </summary>
public const string FfmpegImgExtractPerfTradeoffKey = "FFmpeg:imgExtractPerfTradeoff";
/// <summary>
/// The key for the FFmpeg path option.
/// </summary>
@@ -107,6 +112,14 @@ namespace MediaBrowser.Controller.Extensions
public static bool GetFFmpegSkipValidation(this IConfiguration configuration)
=> configuration.GetValue<bool>(FfmpegSkipValidationKey);
/// <summary>
/// Gets a value indicating whether the server should trade off for performance during FFmpeg image extraction.
/// </summary>
/// <param name="configuration">The configuration to read the setting from.</param>
/// <returns><c>true</c> if the server should trade off for performance during FFmpeg image extraction, otherwise <c>false</c>.</returns>
public static bool GetFFmpegImgExtractPerfTradeoff(this IConfiguration configuration)
=> configuration.GetValue<bool>(FfmpegImgExtractPerfTradeoffKey);
/// <summary>
/// Gets a value indicating whether playlists should allow duplicate entries from the <see cref="IConfiguration"/>.
/// </summary>