Fix naming

This commit is contained in:
Nick Mowen 2022-11-13 14:44:20 -07:00
parent 1cedf057e6
commit 35288ecf75
2 changed files with 8 additions and 8 deletions

View File

@ -31,7 +31,7 @@ from frigate.const import CLIPS_DIR
from frigate.models import Event, Recordings from frigate.models import Event, Recordings
from frigate.object_processing import TrackedObject from frigate.object_processing import TrackedObject
from frigate.stats import stats_snapshot from frigate.stats import stats_snapshot
from frigate.util import clean_camera_user_pass, ffprobe_stream, vainfo from frigate.util import clean_camera_user_pass, ffprobe_stream, vainfo_hwaccel
from frigate.version import VERSION from frigate.version import VERSION
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -1001,15 +1001,15 @@ def ffprobe():
@bp.route("/vainfo", methods=["GET"]) @bp.route("/vainfo", methods=["GET"])
def vainfo(): def vainfo():
vainfo_output = vainfo() vainfo = vainfo_hwaccel()
return jsonify( return jsonify(
{ {
"return_code": vainfo_output.returncode, "return_code": vainfo.returncode,
"stderr": json.loads(vainfo_output.stderr.decode("unicode_escape").strip()) "stderr": json.loads(vainfo.stderr.decode("unicode_escape").strip())
if vainfo_output.stderr.decode() if vainfo.stderr.decode()
else {}, else {},
"stdout": json.loads(vainfo_output.stdout.decode("unicode_escape").strip()) "stdout": json.loads(vainfo.stdout.decode("unicode_escape").strip())
if vainfo_output.stdout.decode() if vainfo.stdout.decode()
else {}, else {},
} }
) )

View File

@ -880,7 +880,7 @@ def ffprobe_stream(path: str) -> sp.CompletedProcess:
return sp.run(ffprobe_cmd, capture_output=True) return sp.run(ffprobe_cmd, capture_output=True)
def vainfo() -> sp.CompletedProcess: def vainfo_hwaccel() -> sp.CompletedProcess:
"""Run vainfo.""" """Run vainfo."""
ffprobe_cmd = ["vainfo"] ffprobe_cmd = ["vainfo"]
return sp.run(ffprobe_cmd, capture_output=True) return sp.run(ffprobe_cmd, capture_output=True)