mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 20:25:26 +03:00
Fix formatting
This commit is contained in:
parent
f9b17d3f00
commit
fa59fb13f4
@ -15,7 +15,12 @@ import psutil
|
|||||||
import py3nvml.py3nvml as nvml
|
import py3nvml.py3nvml as nvml
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from frigate.const import DRIVER_AMD, DRIVER_ENV_VAR, FFMPEG_HWACCEL_NVIDIA, FFMPEG_HWACCEL_VAAPI
|
from frigate.const import (
|
||||||
|
DRIVER_AMD,
|
||||||
|
DRIVER_ENV_VAR,
|
||||||
|
FFMPEG_HWACCEL_NVIDIA,
|
||||||
|
FFMPEG_HWACCEL_VAAPI,
|
||||||
|
)
|
||||||
from frigate.util.builtin import clean_camera_user_pass, escape_special_characters
|
from frigate.util.builtin import clean_camera_user_pass, escape_special_characters
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -195,6 +200,7 @@ def get_bandwidth_stats(config) -> dict[str, dict]:
|
|||||||
|
|
||||||
return usages
|
return usages
|
||||||
|
|
||||||
|
|
||||||
def is_vaapi_amd_driver() -> bool:
|
def is_vaapi_amd_driver() -> bool:
|
||||||
driver = os.environ.get(DRIVER_ENV_VAR)
|
driver = os.environ.get(DRIVER_ENV_VAR)
|
||||||
if driver:
|
if driver:
|
||||||
@ -207,6 +213,7 @@ def is_vaapi_amd_driver() -> bool:
|
|||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
output = p.stdout.decode('unicode_escape').split("\n")
|
output = p.stdout.decode('unicode_escape').split("\n")
|
||||||
|
|
||||||
# VA Info will print out the friendly name of the driver
|
# VA Info will print out the friendly name of the driver
|
||||||
return any("AMD Radeon Graphics" in line for line in output)
|
return any("AMD Radeon Graphics" in line for line in output)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user