mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-04 10:15:22 +03:00
Add logging info
This commit is contained in:
parent
2c1a6673f3
commit
2516de92d7
@ -1,5 +1,6 @@
|
||||
"""Handles inserting and maintaining ffmpeg presets."""
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
from typing import Any
|
||||
@ -12,6 +13,9 @@ TIMEOUT_PARAM = "-timeout" if os.path.exists(BTBN_PATH) else "-stimeout"
|
||||
GPU_DEVICE_PARAM = None
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_gpu_device() -> str:
|
||||
"""Gets the appropriate Intel/AMD GPU device."""
|
||||
if GPU_DEVICE_PARAM:
|
||||
@ -26,6 +30,8 @@ def get_gpu_device() -> str:
|
||||
for device in devices:
|
||||
check = vainfo_hwaccel(device_name=device)
|
||||
|
||||
logger.debug(f"{device} return vainfo status code: {check.returncode}")
|
||||
|
||||
if check.returncode == 0:
|
||||
GPU_DEVICE_PARAM = device
|
||||
return GPU_DEVICE_PARAM
|
||||
|
||||
Loading…
Reference in New Issue
Block a user