mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-04 18:25: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."""
|
"""Handles inserting and maintaining ffmpeg presets."""
|
||||||
|
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
@ -12,6 +13,9 @@ TIMEOUT_PARAM = "-timeout" if os.path.exists(BTBN_PATH) else "-stimeout"
|
|||||||
GPU_DEVICE_PARAM = None
|
GPU_DEVICE_PARAM = None
|
||||||
|
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def get_gpu_device() -> str:
|
def get_gpu_device() -> str:
|
||||||
"""Gets the appropriate Intel/AMD GPU device."""
|
"""Gets the appropriate Intel/AMD GPU device."""
|
||||||
if GPU_DEVICE_PARAM:
|
if GPU_DEVICE_PARAM:
|
||||||
@ -26,6 +30,8 @@ def get_gpu_device() -> str:
|
|||||||
for device in devices:
|
for device in devices:
|
||||||
check = vainfo_hwaccel(device_name=device)
|
check = vainfo_hwaccel(device_name=device)
|
||||||
|
|
||||||
|
logger.debug(f"{device} return vainfo status code: {check.returncode}")
|
||||||
|
|
||||||
if check.returncode == 0:
|
if check.returncode == 0:
|
||||||
GPU_DEVICE_PARAM = device
|
GPU_DEVICE_PARAM = device
|
||||||
return GPU_DEVICE_PARAM
|
return GPU_DEVICE_PARAM
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user