mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-04 10:15:22 +03:00
Fix access
This commit is contained in:
parent
2516de92d7
commit
f4abe67309
@ -10,7 +10,7 @@ from frigate.const import BTBN_PATH
|
|||||||
from frigate.util import vainfo_hwaccel
|
from frigate.util import vainfo_hwaccel
|
||||||
|
|
||||||
TIMEOUT_PARAM = "-timeout" if os.path.exists(BTBN_PATH) else "-stimeout"
|
TIMEOUT_PARAM = "-timeout" if os.path.exists(BTBN_PATH) else "-stimeout"
|
||||||
GPU_DEVICE_PARAM = None
|
GPU_DEVICE_PARAM = ""
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -18,6 +18,11 @@ 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 not os.path.exists("/dev/dri"):
|
||||||
|
return ""
|
||||||
|
|
||||||
|
global GPU_DEVICE_PARAM
|
||||||
|
|
||||||
if GPU_DEVICE_PARAM:
|
if GPU_DEVICE_PARAM:
|
||||||
return GPU_DEVICE_PARAM
|
return GPU_DEVICE_PARAM
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user