Add logging info

This commit is contained in:
Nick Mowen 2023-02-06 14:26:33 -07:00
parent 2c1a6673f3
commit 2516de92d7

View File

@ -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