mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-13 06:35:24 +03:00
sr test
This commit is contained in:
parent
1085886f97
commit
9e3708f500
@ -26,7 +26,7 @@ services:
|
||||
YOLO_MODELS: yolov7-320
|
||||
devices:
|
||||
- /dev/bus/usb:/dev/bus/usb
|
||||
# - /dev/dri:/dev/dri # for intel hwaccel, needs to be updated for your hardware
|
||||
#- /dev/dri:/dev/dri # for intel hwaccel, needs to be updated for your hardware
|
||||
volumes:
|
||||
- .:/workspace/frigate:cached
|
||||
- ./web/dist:/opt/frigate/web:cached
|
||||
|
||||
@ -30,3 +30,4 @@ ws4py == 0.5.*
|
||||
unidecode == 1.3.*
|
||||
onnxruntime == 1.18.*
|
||||
openvino == 2024.1.*
|
||||
flask-cors == 1.10.*
|
||||
@ -36,6 +36,8 @@ from frigate.util.builtin import (
|
||||
)
|
||||
from frigate.util.services import ffprobe_stream, restart_frigate, vainfo_hwaccel
|
||||
from frigate.version import VERSION
|
||||
from flask_cors import CORS, cross_origin
|
||||
from flask_cors import CORS, cross_origin
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -60,13 +62,7 @@ def create_app(
|
||||
stats_emitter: StatsEmitter,
|
||||
):
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.before_request
|
||||
def check_csrf():
|
||||
if request.method in ["GET", "HEAD", "OPTIONS", "TRACE"]:
|
||||
pass
|
||||
if "origin" in request.headers and "x-csrf-token" not in request.headers:
|
||||
return jsonify({"success": False, "message": "Missing CSRF header"}), 401
|
||||
CORS(app)
|
||||
|
||||
@app.before_request
|
||||
def _db_connect():
|
||||
|
||||
@ -548,6 +548,7 @@ def vod_ts(camera_name, start_ts, end_ts):
|
||||
|
||||
if 0 < duration < max_duration_ms:
|
||||
clip["keyFrameDurations"] = [duration]
|
||||
clip["id"] = "san"
|
||||
clips.append(clip)
|
||||
durations.append(duration)
|
||||
else:
|
||||
|
||||
@ -21,14 +21,12 @@ class TestConfig(unittest.TestCase):
|
||||
"back": {
|
||||
"ffmpeg": {
|
||||
"inputs": [
|
||||
{"path": "rtsp://10.0.0.1:554/video", "roles": ["detect"]}
|
||||
{
|
||||
"path": "rtsp://admin:12publico34@elpinarfutbol.ddns.net:554/cam/realmonitor?channel=1&subtype=0",
|
||||
"roles": ["record"],
|
||||
}
|
||||
]
|
||||
},
|
||||
"detect": {
|
||||
"height": 1080,
|
||||
"width": 1920,
|
||||
"fps": 5,
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user