mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 09:45:22 +03:00
Fix naming
This commit is contained in:
parent
1cedf057e6
commit
35288ecf75
@ -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 {},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user