mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-10-20 15:54:38 +00:00
Merge pull request #16872 from psavarmattas/fix/priority-class-warning-spam
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Format / format-check (push) Waiting to run
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Artifact (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Format / format-check (push) Waiting to run
Tests / run-tests (macos-latest) (push) Waiting to run
Tests / run-tests (ubuntu-latest) (push) Waiting to run
Tests / run-tests (windows-latest) (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Artifact (push) Waiting to run
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Blocked by required conditions
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Blocked by required conditions
Project Automation / Project board (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
fix: suppress repeated PriorityClass warning in MediaEncoder
This commit is contained in:
commit
31f4ce93a6
1 changed files with 12 additions and 6 deletions
|
|
@ -85,6 +85,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
private bool _isVaapiDeviceSupportVulkanDrmModifier = false;
|
||||
private bool _isVaapiDeviceSupportVulkanDrmInterop = false;
|
||||
|
||||
private bool _canSetProcessPriority = true;
|
||||
|
||||
private bool _isVideoToolboxAv1DecodeAvailable = false;
|
||||
|
||||
private static string[] _vulkanImageDrmFmtModifierExts =
|
||||
|
|
@ -1123,13 +1125,17 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
{
|
||||
process.Process.Start();
|
||||
|
||||
try
|
||||
if (_canSetProcessPriority)
|
||||
{
|
||||
process.Process.PriorityClass = ProcessPriorityClass.BelowNormal;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Unable to set process priority to BelowNormal for {ProcessFileName}", process.Process.StartInfo.FileName);
|
||||
try
|
||||
{
|
||||
process.Process.PriorityClass = ProcessPriorityClass.BelowNormal;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_canSetProcessPriority = false;
|
||||
_logger.LogWarning(ex, "Unable to set process priority to BelowNormal for {ProcessFileName}. Further attempts will be skipped.", process.Process.StartInfo.FileName);
|
||||
}
|
||||
}
|
||||
|
||||
lock (_runningProcessesLock)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue